From 57ac766ee995d717dc032ba35c9100bc7aa77652 Mon Sep 17 00:00:00 2001 From: Adam Nemet Date: Thu, 19 Feb 2015 19:15:21 +0000 Subject: [LoopAccesses] Change LAA:getInfo to return a constant reference As expected, this required a few more const-correctness fixes. Based on Hal's feedback on D7684. llvm-svn: 229899 --- llvm/lib/Transforms/Vectorize/LoopVectorize.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'llvm/lib/Transforms/Vectorize/LoopVectorize.cpp') diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp index 3b3cd5e1389..61423063f46 100644 --- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp +++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp @@ -735,11 +735,11 @@ public: bool isUniformAfterVectorization(Instruction* I) { return Uniforms.count(I); } /// Returns the information that we collected about runtime memory check. - LoopAccessInfo::RuntimePointerCheck *getRuntimePointerCheck() { + const LoopAccessInfo::RuntimePointerCheck *getRuntimePointerCheck() const { return LAI->getRuntimePointerCheck(); } - LoopAccessInfo *getLAI() { + const LoopAccessInfo *getLAI() const { return LAI; } @@ -856,7 +856,7 @@ private: LoopAccessAnalysis *LAA; // And the loop-accesses info corresponding to this loop. This pointer is // null until canVectorizeMemory sets it up. - LoopAccessInfo *LAI; + const LoopAccessInfo *LAI; // --- vectorization state --- // -- cgit v1.2.3