summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-01-31 00:51:24 +0000
committerChris Lattner <sabre@nondot.org>2002-01-31 00:51:24 +0000
commit352151e222ec4beb3a6ba3efdcb865dd29e7761a (patch)
treed999b1b769a293c3354397db3d4e448ae973b019 /llvm/lib/Transforms/Scalar
parentc90d6ba9a25ab22bea34309fd5e8b0a36bc40676 (diff)
downloadbcm5719-llvm-352151e222ec4beb3a6ba3efdcb865dd29e7761a.tar.gz
bcm5719-llvm-352151e222ec4beb3a6ba3efdcb865dd29e7761a.zip
MethodPass's are now guaranteed to not be run on external methods!
llvm-svn: 1611
Diffstat (limited to 'llvm/lib/Transforms/Scalar')
-rw-r--r--llvm/lib/Transforms/Scalar/ADCE.cpp4
-rw-r--r--llvm/lib/Transforms/Scalar/IndVarSimplify.cpp2
-rw-r--r--llvm/lib/Transforms/Scalar/SCCP.cpp1
3 files changed, 1 insertions, 6 deletions
diff --git a/llvm/lib/Transforms/Scalar/ADCE.cpp b/llvm/lib/Transforms/Scalar/ADCE.cpp
index 5449f223462..71c50674f4c 100644
--- a/llvm/lib/Transforms/Scalar/ADCE.cpp
+++ b/llvm/lib/Transforms/Scalar/ADCE.cpp
@@ -292,9 +292,7 @@ BasicBlock *ADCE::fixupCFG(BasicBlock *BB, std::set<BasicBlock*> &VisitedBlocks,
// doADCE - Execute the Agressive Dead Code Elimination Algorithm
//
bool AgressiveDCE::runOnMethod(Method *M) {
- if (M->isExternal()) return false;
- ADCE DCE(M);
- return DCE.doADCE(
+ return ADCE(M).doADCE(
getAnalysis<cfg::DominanceFrontier>(cfg::DominanceFrontier::PostDomID));
}
diff --git a/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp b/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
index 48faffebf4b..d06c19787fe 100644
--- a/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
+++ b/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
@@ -185,8 +185,6 @@ static bool TransformLoop(cfg::LoopInfo *Loops, cfg::Loop *Loop) {
}
bool InductionVariableSimplify::doit(Method *M, cfg::LoopInfo &Loops) {
- if (M->isExternal()) return false;
-
// Induction Variables live in the header nodes of the loops of the method...
return reduce_apply_bool(Loops.getTopLevelLoops().begin(),
Loops.getTopLevelLoops().end(),
diff --git a/llvm/lib/Transforms/Scalar/SCCP.cpp b/llvm/lib/Transforms/Scalar/SCCP.cpp
index 9b2343c936c..d6b7c40f34b 100644
--- a/llvm/lib/Transforms/Scalar/SCCP.cpp
+++ b/llvm/lib/Transforms/Scalar/SCCP.cpp
@@ -511,7 +511,6 @@ void SCCP::OperandChangedState(User *U) {
// to prove whether a value is constant and whether blocks are used.
//
bool SCCPPass::doSCCP(Method *M) {
- if (M->isExternal()) return false;
SCCP S(M);
return S.doSCCP();
}
OpenPOWER on IntegriCloud