Skip to content

Commit 13c8cf2

Browse files
author
Johannes Doerfert
committed
[Refactor] Remove const keyword from access instruction
llvm-svn: 215309
1 parent e87be8f commit 13c8cf2

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

polly/include/polly/ScopInfo.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,8 @@ class MemoryAccess {
136136
/// could allow us to handle the above example.
137137
ReductionType RedType = RT_NONE;
138138

139-
const Instruction *Inst;
139+
/// @brief The access instruction of this memory access.
140+
Instruction *Inst;
140141

141142
/// Updated access relation read from JSCOP file.
142143
isl_map *newAccessRelation;
@@ -149,7 +150,7 @@ class MemoryAccess {
149150
/// @param Access The memory access.
150151
/// @param Statement The statement that contains the access.
151152
/// @param SE The ScalarEvolution analysis.
152-
MemoryAccess(const IRAccess &Access, const Instruction *AccInst,
153+
MemoryAccess(const IRAccess &Access, Instruction *AccInst,
153154
ScopStmt *Statement);
154155

155156
~MemoryAccess();
@@ -194,7 +195,8 @@ class MemoryAccess {
194195

195196
const std::string &getBaseName() const { return BaseName; }
196197

197-
const Instruction *getAccessInstruction() const { return Inst; }
198+
/// @brief Return the access instruction of this memory access.
199+
Instruction *getAccessInstruction() const { return Inst; }
198200

199201
/// @brief Get the new access function imported from JSCOP file
200202
isl_map *getNewAccessRelation() const;

polly/lib/Analysis/ScopInfo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ void MemoryAccess::assumeNoOutOfBound(const IRAccess &Access) {
414414
isl_space_free(Space);
415415
}
416416

417-
MemoryAccess::MemoryAccess(const IRAccess &Access, const Instruction *AccInst,
417+
MemoryAccess::MemoryAccess(const IRAccess &Access, Instruction *AccInst,
418418
ScopStmt *Statement)
419419
: Statement(Statement), Inst(AccInst), newAccessRelation(nullptr) {
420420

0 commit comments

Comments
 (0)