diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2015-08-13 10:00:53 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2015-08-13 10:00:53 +0000 |
commit | c2af09823f3a3e3e5c4ff36929ea3f4f4f6d592c (patch) | |
tree | 6f7ee3c1a0c878fbe8e8d01690566a2097e4378d /llvm/lib/Transforms/Scalar | |
parent | 8ae7b81559125ba6e144dcc61c4c13ba0981e01f (diff) | |
download | bcm5719-llvm-c2af09823f3a3e3e5c4ff36929ea3f4f4f6d592c.tar.gz bcm5719-llvm-c2af09823f3a3e3e5c4ff36929ea3f4f4f6d592c.zip |
[LIR] Handle access to AliasAnalysis the same way as the other analysis
in LoopIdiomRecognize. This is what started me staring at this code. Now
migrating it with the new AA stuff will be trivial.
llvm-svn: 244880
Diffstat (limited to 'llvm/lib/Transforms/Scalar')
-rw-r--r-- | llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp b/llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp index f2f37eec53b..0a4a7bb51e0 100644 --- a/llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp +++ b/llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp @@ -69,6 +69,7 @@ namespace { class LoopIdiomRecognize : public LoopPass { Loop *CurLoop; + AliasAnalysis *AA; DominatorTree *DT; LoopInfo *LI; ScalarEvolution *SE; @@ -188,6 +189,7 @@ bool LoopIdiomRecognize::runOnLoop(Loop *L, LPPassManager &LPM) { if (Name == "memset" || Name == "memcpy") return false; + AA = &getAnalysis<AliasAnalysis>(); DT = &getAnalysis<DominatorTreeWrapperPass>().getDomTree(); LI = &getAnalysis<LoopInfoWrapperPass>().getLoopInfo(); SE = &getAnalysis<ScalarEvolution>(); @@ -505,7 +507,7 @@ bool LoopIdiomRecognize::processLoopStridedStore( Preheader->getTerminator()); if (mayLoopAccessLocation(BasePtr, MRI_ModRef, CurLoop, BECount, StoreSize, - getAnalysis<AliasAnalysis>(), TheStore)) { + *AA, TheStore)) { Expander.clear(); // If we generated new code for the base pointer, clean up. RecursivelyDeleteTriviallyDeadInstructions(BasePtr, TLI); @@ -594,7 +596,7 @@ bool LoopIdiomRecognize::processLoopStoreOfLoopLoad( Preheader->getTerminator()); if (mayLoopAccessLocation(StoreBasePtr, MRI_ModRef, CurLoop, BECount, - StoreSize, getAnalysis<AliasAnalysis>(), SI)) { + StoreSize, *AA, SI)) { Expander.clear(); // If we generated new code for the base pointer, clean up. RecursivelyDeleteTriviallyDeadInstructions(StoreBasePtr, TLI); @@ -608,7 +610,7 @@ bool LoopIdiomRecognize::processLoopStoreOfLoopLoad( Preheader->getTerminator()); if (mayLoopAccessLocation(LoadBasePtr, MRI_Mod, CurLoop, BECount, StoreSize, - getAnalysis<AliasAnalysis>(), SI)) { + *AA, SI)) { Expander.clear(); // If we generated new code for the base pointer, clean up. RecursivelyDeleteTriviallyDeadInstructions(LoadBasePtr, TLI); |