summaryrefslogtreecommitdiff
path: root/lib/Transforms/IPO/LoopExtractor.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2007-04-07 05:31:27 +0000
committerOwen Anderson <resistor@mac.com>2007-04-07 05:31:27 +0000
commitc6fcf29e81f54b68146fb8d375c347d2c689566d (patch)
tree6b39820875bf2d2fe9c814bd178f06bb1d5f1e1d /lib/Transforms/IPO/LoopExtractor.cpp
parentb5fda757040eedffe50ba4c694cfe7e26eb5e4f1 (diff)
downloadllvm-c6fcf29e81f54b68146fb8d375c347d2c689566d.tar.gz
llvm-c6fcf29e81f54b68146fb8d375c347d2c689566d.tar.bz2
llvm-c6fcf29e81f54b68146fb8d375c347d2c689566d.tar.xz
Expunge DomSet from CodeExtractor. This is part of the continuing work
on PR1171. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35726 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/IPO/LoopExtractor.cpp')
-rw-r--r--lib/Transforms/IPO/LoopExtractor.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/Transforms/IPO/LoopExtractor.cpp b/lib/Transforms/IPO/LoopExtractor.cpp
index e99fa78a7d..c5f4fca12a 100644
--- a/lib/Transforms/IPO/LoopExtractor.cpp
+++ b/lib/Transforms/IPO/LoopExtractor.cpp
@@ -43,7 +43,8 @@ namespace {
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
AU.addRequiredID(BreakCriticalEdgesID);
AU.addRequiredID(LoopSimplifyID);
- AU.addRequired<DominatorSet>();
+ AU.addRequired<ETForest>();
+ AU.addRequired<DominatorTree>();
AU.addRequired<LoopInfo>();
}
};
@@ -72,7 +73,8 @@ bool LoopExtractor::runOnFunction(Function &F) {
if (LI.begin() == LI.end())
return false;
- DominatorSet &DS = getAnalysis<DominatorSet>();
+ ETForest &EF = getAnalysis<ETForest>();
+ DominatorTree &DT = getAnalysis<DominatorTree>();
// If there is more than one top-level loop in this function, extract all of
// the loops.
@@ -81,7 +83,7 @@ bool LoopExtractor::runOnFunction(Function &F) {
for (LoopInfo::iterator i = LI.begin(), e = LI.end(); i != e; ++i) {
if (NumLoops == 0) return Changed;
--NumLoops;
- Changed |= ExtractLoop(DS, *i) != 0;
+ Changed |= ExtractLoop(EF, DT, *i) != 0;
++NumExtracted;
}
} else {
@@ -111,7 +113,7 @@ bool LoopExtractor::runOnFunction(Function &F) {
if (ShouldExtractLoop) {
if (NumLoops == 0) return Changed;
--NumLoops;
- Changed |= ExtractLoop(DS, TLL) != 0;
+ Changed |= ExtractLoop(EF, DT, TLL) != 0;
++NumExtracted;
} else {
// Okay, this function is a minimal container around the specified loop.
@@ -121,7 +123,7 @@ bool LoopExtractor::runOnFunction(Function &F) {
for (Loop::iterator i = TLL->begin(), e = TLL->end(); i != e; ++i) {
if (NumLoops == 0) return Changed;
--NumLoops;
- Changed |= ExtractLoop(DS, *i) != 0;
+ Changed |= ExtractLoop(EF, DT, *i) != 0;
++NumExtracted;
}
}