mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-25 00:33:15 +00:00
Switch LoopIdiom pass to directly require target transform information.
I'm sorry for duplicating bad style here, but I wanted to keep consistency. I've pinged the code review thread where this style was reviewed and changes were requested. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171714 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a90a99a82b
commit
d12aae6c05
@ -177,6 +177,7 @@ namespace {
|
|||||||
AU.addPreserved<DominatorTree>();
|
AU.addPreserved<DominatorTree>();
|
||||||
AU.addRequired<DominatorTree>();
|
AU.addRequired<DominatorTree>();
|
||||||
AU.addRequired<TargetLibraryInfo>();
|
AU.addRequired<TargetLibraryInfo>();
|
||||||
|
AU.addRequired<TargetTransformInfo>();
|
||||||
}
|
}
|
||||||
|
|
||||||
const DataLayout *getDataLayout() {
|
const DataLayout *getDataLayout() {
|
||||||
@ -196,9 +197,7 @@ namespace {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const TargetTransformInfo *getTargetTransformInfo() {
|
const TargetTransformInfo *getTargetTransformInfo() {
|
||||||
if (!TTI)
|
return TTI ? TTI : (TTI = &getAnalysis<TargetTransformInfo>());
|
||||||
TTI = getAnalysisIfAvailable<TargetTransformInfo>();
|
|
||||||
return TTI;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Loop *getLoop() const { return CurLoop; }
|
Loop *getLoop() const { return CurLoop; }
|
||||||
@ -219,6 +218,7 @@ INITIALIZE_PASS_DEPENDENCY(LCSSA)
|
|||||||
INITIALIZE_PASS_DEPENDENCY(ScalarEvolution)
|
INITIALIZE_PASS_DEPENDENCY(ScalarEvolution)
|
||||||
INITIALIZE_PASS_DEPENDENCY(TargetLibraryInfo)
|
INITIALIZE_PASS_DEPENDENCY(TargetLibraryInfo)
|
||||||
INITIALIZE_AG_DEPENDENCY(AliasAnalysis)
|
INITIALIZE_AG_DEPENDENCY(AliasAnalysis)
|
||||||
|
INITIALIZE_AG_DEPENDENCY(TargetTransformInfo)
|
||||||
INITIALIZE_PASS_END(LoopIdiomRecognize, "loop-idiom", "Recognize loop idioms",
|
INITIALIZE_PASS_END(LoopIdiomRecognize, "loop-idiom", "Recognize loop idioms",
|
||||||
false, false)
|
false, false)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user