From: Arnaud A. de Grandmaison Date: Tue, 6 Oct 2015 13:35:30 +0000 (+0000) Subject: [EarlyCSE] Constify ParseMemoryInst methods (NFC). X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=45d998b38c08a84aed83b273f8b832b76e1cd996;p=oota-llvm.git [EarlyCSE] Constify ParseMemoryInst methods (NFC). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249400 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Scalar/EarlyCSE.cpp b/lib/Transforms/Scalar/EarlyCSE.cpp index 017b9cafe62..9ac3c2cdab2 100644 --- a/lib/Transforms/Scalar/EarlyCSE.cpp +++ b/lib/Transforms/Scalar/EarlyCSE.cpp @@ -410,17 +410,17 @@ private: Ptr = SI->getPointerOperand(); } } - bool isLoad() { return Load; } - bool isStore() { return Store; } - bool isVolatile() { return Vol; } - bool isMatchingMemLoc(const ParseMemoryInst &Inst) { + bool isLoad() const { return Load; } + bool isStore() const { return Store; } + bool isVolatile() const { return Vol; } + bool isMatchingMemLoc(const ParseMemoryInst &Inst) const { return Ptr == Inst.Ptr && MatchingId == Inst.MatchingId; } - bool isValid() { return Ptr != nullptr; } - int getMatchingId() { return MatchingId; } - Value *getPtr() { return Ptr; } - bool mayReadFromMemory() { return MayReadFromMemory; } - bool mayWriteToMemory() { return MayWriteToMemory; } + bool isValid() const { return Ptr != nullptr; } + int getMatchingId() const { return MatchingId; } + Value *getPtr() const { return Ptr; } + bool mayReadFromMemory() const { return MayReadFromMemory; } + bool mayWriteToMemory() const { return MayWriteToMemory; } private: bool Load;