summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2007-06-07 18:45:06 +0000
committerDevang Patel <dpatel@apple.com>2007-06-07 18:45:06 +0000
commita97e040e05f035f0ecbd2afeee3d21a41ef5ad53 (patch)
treee6b906e4973e5a1aaf6b2419b6513a820e68728e
parent387b8cbc2d0c4135c9a2ade2a5a00ed0e6479b88 (diff)
downloadllvm-a97e040e05f035f0ecbd2afeee3d21a41ef5ad53.tar.gz
llvm-a97e040e05f035f0ecbd2afeee3d21a41ef5ad53.tar.bz2
llvm-a97e040e05f035f0ecbd2afeee3d21a41ef5ad53.tar.xz
Use DominatorTree instead of ETForest.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37495 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Transforms/Scalar/GCSE.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/Transforms/Scalar/GCSE.cpp b/lib/Transforms/Scalar/GCSE.cpp
index d7194bb3d6..93ed8c4fa9 100644
--- a/lib/Transforms/Scalar/GCSE.cpp
+++ b/lib/Transforms/Scalar/GCSE.cpp
@@ -48,7 +48,6 @@ namespace {
// This transformation requires dominator and immediate dominator info
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
AU.setPreservesCFG();
- AU.addRequired<ETForest>();
AU.addRequired<DominatorTree>();
AU.addRequired<ValueNumbering>();
}
@@ -69,7 +68,6 @@ bool GCSE::runOnFunction(Function &F) {
// Get pointers to the analysis results that we will be using...
DominatorTree &DT = getAnalysis<DominatorTree>();
- ETForest &ET = getAnalysis<ETForest>();
ValueNumbering &VN = getAnalysis<ValueNumbering>();
std::vector<Value*> EqualValues;
@@ -145,7 +143,7 @@ bool GCSE::runOnFunction(Function &F) {
if (OtherI->getParent() == BB)
Dominates = BlockInsts.count(OtherI);
else
- Dominates = ET.dominates(OtherI->getParent(), BB);
+ Dominates = DT.dominates(OtherI->getParent(), BB);
if (Dominates) {
// Okay, we found an instruction with the same value as this one