[EarlyCSE] Constify ParseMemoryInst methods (NFC).

llvm-svn: 249400
This commit is contained in:
Arnaud A. de Grandmaison 2015-10-06 13:35:30 +00:00
parent aaa4080d21
commit 6fd488b156
1 changed files with 9 additions and 9 deletions

View File

@ -410,17 +410,17 @@ private:
Ptr = SI->getPointerOperand(); Ptr = SI->getPointerOperand();
} }
} }
bool isLoad() { return Load; } bool isLoad() const { return Load; }
bool isStore() { return Store; } bool isStore() const { return Store; }
bool isVolatile() { return Vol; } bool isVolatile() const { return Vol; }
bool isMatchingMemLoc(const ParseMemoryInst &Inst) { bool isMatchingMemLoc(const ParseMemoryInst &Inst) const {
return Ptr == Inst.Ptr && MatchingId == Inst.MatchingId; return Ptr == Inst.Ptr && MatchingId == Inst.MatchingId;
} }
bool isValid() { return Ptr != nullptr; } bool isValid() const { return Ptr != nullptr; }
int getMatchingId() { return MatchingId; } int getMatchingId() const { return MatchingId; }
Value *getPtr() { return Ptr; } Value *getPtr() const { return Ptr; }
bool mayReadFromMemory() { return MayReadFromMemory; } bool mayReadFromMemory() const { return MayReadFromMemory; }
bool mayWriteToMemory() { return MayWriteToMemory; } bool mayWriteToMemory() const { return MayWriteToMemory; }
private: private:
bool Load; bool Load;