projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[LIR] Re-instate r244880, reverted in r244884, factoring the handling of
[oota-llvm.git]
/
lib
/
Transforms
/
Scalar
/
LoopIdiomRecognize.cpp
diff --git
a/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
b/lib/Transforms/Scalar/LoopIdiomRecognize.cpp
index e3fe2530c2b8e5d61878b3531eeea115070b62a3..ee5203105201f791815302dafe72402785f30867 100644
(file)
--- a/
lib/Transforms/Scalar/LoopIdiomRecognize.cpp
+++ b/
lib/Transforms/Scalar/LoopIdiomRecognize.cpp
@@
-69,6
+69,7
@@
namespace {
class LoopIdiomRecognize : public LoopPass {
Loop *CurLoop;
class LoopIdiomRecognize : public LoopPass {
Loop *CurLoop;
+ AliasAnalysis *AA;
DominatorTree *DT;
LoopInfo *LI;
ScalarEvolution *SE;
DominatorTree *DT;
LoopInfo *LI;
ScalarEvolution *SE;
@@
-188,6
+189,7
@@
bool LoopIdiomRecognize::runOnLoop(Loop *L, LPPassManager &LPM) {
if (Name == "memset" || Name == "memcpy")
return false;
if (Name == "memset" || Name == "memcpy")
return false;
+ AA = &getAnalysis<AliasAnalysis>();
DT = &getAnalysis<DominatorTreeWrapperPass>().getDomTree();
LI = &getAnalysis<LoopInfoWrapperPass>().getLoopInfo();
SE = &getAnalysis<ScalarEvolution>();
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,
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);
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,
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);
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,
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);
Expander.clear();
// If we generated new code for the base pointer, clean up.
RecursivelyDeleteTriviallyDeadInstructions(LoadBasePtr, TLI);