From b260fa8a14e51504a11a7219fde727fc6cec0e65 Mon Sep 17 00:00:00 2001 From: Renato Golin Date: Thu, 13 Aug 2015 11:25:35 +0000 Subject: [PATCH] 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244884 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Scalar/LoopIdiomRecognize.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/Transforms/Scalar/LoopIdiomRecognize.cpp b/lib/Transforms/Scalar/LoopIdiomRecognize.cpp index 0a4a7bb51e0..f2f37eec53b 100644 --- a/lib/Transforms/Scalar/LoopIdiomRecognize.cpp +++ b/lib/Transforms/Scalar/LoopIdiomRecognize.cpp @@ -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 *L, LPPassManager &LPM) { if (Name == "memset" || Name == "memcpy") return false; - AA = &getAnalysis(); DT = &getAnalysis().getDomTree(); LI = &getAnalysis().getLoopInfo(); SE = &getAnalysis(); @@ -507,7 +505,7 @@ bool LoopIdiomRecognize::processLoopStridedStore( Preheader->getTerminator()); if (mayLoopAccessLocation(BasePtr, MRI_ModRef, CurLoop, BECount, StoreSize, - *AA, TheStore)) { + getAnalysis(), TheStore)) { Expander.clear(); // If we generated new code for the base pointer, clean up. RecursivelyDeleteTriviallyDeadInstructions(BasePtr, TLI); @@ -596,7 +594,7 @@ bool LoopIdiomRecognize::processLoopStoreOfLoopLoad( Preheader->getTerminator()); if (mayLoopAccessLocation(StoreBasePtr, MRI_ModRef, CurLoop, BECount, - StoreSize, *AA, SI)) { + StoreSize, getAnalysis(), SI)) { Expander.clear(); // If we generated new code for the base pointer, clean up. RecursivelyDeleteTriviallyDeadInstructions(StoreBasePtr, TLI); @@ -610,7 +608,7 @@ bool LoopIdiomRecognize::processLoopStoreOfLoopLoad( Preheader->getTerminator()); if (mayLoopAccessLocation(LoadBasePtr, MRI_Mod, CurLoop, BECount, StoreSize, - *AA, SI)) { + getAnalysis(), SI)) { Expander.clear(); // If we generated new code for the base pointer, clean up. RecursivelyDeleteTriviallyDeadInstructions(LoadBasePtr, TLI); -- 2.34.1