summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
335fc61)
really in breaking pattern just for this analysis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244878
91177308-0d34-0410-b5e6-
96231b3b80d8
class LoopIdiomRecognize : public LoopPass {
Loop *CurLoop;
DominatorTree *DT;
class LoopIdiomRecognize : public LoopPass {
Loop *CurLoop;
DominatorTree *DT;
ScalarEvolution *SE;
TargetLibraryInfo *TLI;
const TargetTransformInfo *TTI;
ScalarEvolution *SE;
TargetLibraryInfo *TLI;
const TargetTransformInfo *TTI;
return false;
DT = &getAnalysis<DominatorTreeWrapperPass>().getDomTree();
return false;
DT = &getAnalysis<DominatorTreeWrapperPass>().getDomTree();
+ LI = &getAnalysis<LoopInfoWrapperPass>().getLoopInfo();
SE = &getAnalysis<ScalarEvolution>();
TLI = &getAnalysis<TargetLibraryInfoWrapperPass>().getTLI();
TTI = &getAnalysis<TargetTransformInfoWrapperPass>().getTTI(
SE = &getAnalysis<ScalarEvolution>();
TLI = &getAnalysis<TargetLibraryInfoWrapperPass>().getTLI();
TTI = &getAnalysis<TargetTransformInfoWrapperPass>().getTTI(
if (BECst->getValue()->getValue() == 0)
return false;
if (BECst->getValue()->getValue() == 0)
return false;
- LoopInfo &LI = getAnalysis<LoopInfoWrapperPass>().getLoopInfo();
-
SmallVector<BasicBlock *, 8> ExitBlocks;
CurLoop->getUniqueExitBlocks(ExitBlocks);
SmallVector<BasicBlock *, 8> ExitBlocks;
CurLoop->getUniqueExitBlocks(ExitBlocks);
// Scan all the blocks in the loop that are not in subloops.
for (auto *BB : CurLoop->getBlocks()) {
// Ignore blocks in subloops.
// Scan all the blocks in the loop that are not in subloops.
for (auto *BB : CurLoop->getBlocks()) {
// Ignore blocks in subloops.
- if (LI.getLoopFor(BB) != CurLoop)
+ if (LI->getLoopFor(BB) != CurLoop)
continue;
MadeChange |= runOnLoopBlock(BB, BECount, ExitBlocks);
continue;
MadeChange |= runOnLoopBlock(BB, BECount, ExitBlocks);