[llvm] r244884 - Revert "[LIR] Handle access to AliasAnalysis the same way as the other analysis in LoopIdiomRecognize."

Renato Golin via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 13 04:25:35 PDT 2015


Author: rengolin
Date: Thu Aug 13 06:25:35 2015
New Revision: 244884

URL: http://llvm.org/viewvc/llvm-project?rev=244884&view=rev
Log:
Revert "[LIR] Handle access to AliasAnalysis the same way as the other analysis in LoopIdiomRecognize."

This reverts commit r244880, as it broke the test-suite on
SingleSource/Regression/C/2004-03-15-IndirectGoto in AArch64.

Modified:
    llvm/trunk/lib/Transforms/Scalar/LoopIdiomRecognize.cpp

Modified: llvm/trunk/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopIdiomRecognize.cpp?rev=244884&r1=244883&r2=244884&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopIdiomRecognize.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopIdiomRecognize.cpp Thu Aug 13 06:25:35 2015
@@ -69,7 +69,6 @@ namespace {
 
 class LoopIdiomRecognize : public LoopPass {
   Loop *CurLoop;
-  AliasAnalysis *AA;
   DominatorTree *DT;
   LoopInfo *LI;
   ScalarEvolution *SE;
@@ -189,7 +188,6 @@ bool LoopIdiomRecognize::runOnLoop(Loop
   if (Name == "memset" || Name == "memcpy")
     return false;
 
-  AA = &getAnalysis<AliasAnalysis>();
   DT = &getAnalysis<DominatorTreeWrapperPass>().getDomTree();
   LI = &getAnalysis<LoopInfoWrapperPass>().getLoopInfo();
   SE = &getAnalysis<ScalarEvolution>();
@@ -507,7 +505,7 @@ bool LoopIdiomRecognize::processLoopStri
                                           Preheader->getTerminator());
 
   if (mayLoopAccessLocation(BasePtr, MRI_ModRef, CurLoop, BECount, StoreSize,
-                            *AA, TheStore)) {
+                            getAnalysis<AliasAnalysis>(), TheStore)) {
     Expander.clear();
     // If we generated new code for the base pointer, clean up.
     RecursivelyDeleteTriviallyDeadInstructions(BasePtr, TLI);
@@ -596,7 +594,7 @@ bool LoopIdiomRecognize::processLoopStor
       Preheader->getTerminator());
 
   if (mayLoopAccessLocation(StoreBasePtr, MRI_ModRef, CurLoop, BECount,
-                            StoreSize, *AA, SI)) {
+                            StoreSize, getAnalysis<AliasAnalysis>(), SI)) {
     Expander.clear();
     // If we generated new code for the base pointer, clean up.
     RecursivelyDeleteTriviallyDeadInstructions(StoreBasePtr, TLI);
@@ -610,7 +608,7 @@ bool LoopIdiomRecognize::processLoopStor
       Preheader->getTerminator());
 
   if (mayLoopAccessLocation(LoadBasePtr, MRI_Mod, CurLoop, BECount, StoreSize,
-                            *AA, SI)) {
+                            getAnalysis<AliasAnalysis>(), SI)) {
     Expander.clear();
     // If we generated new code for the base pointer, clean up.
     RecursivelyDeleteTriviallyDeadInstructions(LoadBasePtr, TLI);




More information about the llvm-commits mailing list