mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-28 03:25:23 +00:00
[PM] Move the LoopInfo analysis pointer into the InstCombiner class
along with the other analyses. The most obvious reason why is because eventually I need to separate out the pass layer from the rest of the instcombiner. However, it is also probably a compile time win as every query through the pass manager layer is pretty slow these days. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226550 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -799,9 +799,7 @@ Instruction *InstCombiner::FoldOpIntoPhi(Instruction &I) {
|
||||
// If the incoming non-constant value is in I's block, we will remove one
|
||||
// instruction, but insert another equivalent one, leading to infinite
|
||||
// instcombine.
|
||||
auto *LIWP = getAnalysisIfAvailable<LoopInfoWrapperPass>();
|
||||
if (isPotentiallyReachable(I.getParent(), NonConstBB, DT,
|
||||
LIWP ? &LIWP->getLoopInfo() : nullptr))
|
||||
if (isPotentiallyReachable(I.getParent(), NonConstBB, DT, LI))
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -2975,6 +2973,8 @@ bool InstCombiner::runOnFunction(Function &F) {
|
||||
DataLayoutPass *DLP = getAnalysisIfAvailable<DataLayoutPass>();
|
||||
DL = DLP ? &DLP->getDataLayout() : nullptr;
|
||||
DT = &getAnalysis<DominatorTreeWrapperPass>().getDomTree();
|
||||
auto *LIWP = getAnalysisIfAvailable<LoopInfoWrapperPass>();
|
||||
LI = LIWP ? &LIWP->getLoopInfo() : nullptr;
|
||||
TLI = &getAnalysis<TargetLibraryInfoWrapperPass>().getTLI();
|
||||
|
||||
// Minimizing size?
|
||||
|
Reference in New Issue
Block a user