[LoopAccesses] Change LAA:getInfo to return a constant reference
[oota-llvm.git] / lib / Transforms / Vectorize / LoopVectorize.cpp
index ed4210b5bcf0b65dca9c8f351184f9ac2d4f0c9a..d75eead0683a35c3f3fa27f882eff99f314008e2 100644 (file)
@@ -756,11 +756,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;
   }
 
@@ -877,7 +877,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 --- //