[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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229634 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Adam Nemet
2015-02-18 03:44:33 +00:00
parent f367b60abe
commit 5934863461
3 changed files with 16 additions and 12 deletions

View 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 --- //