summaryrefslogtreecommitdiff
path: root/lib/Transforms
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
commitfcc93d2c0aece88c79648be3b76f98ee9e29e826 (patch)
treed20b7580095741586fa7ec66ef4d10e029d8978b /lib/Transforms
parentfb1b3f119df25de495fcd53e675d6c9991f5664e (diff)
downloadllvm-fcc93d2c0aece88c79648be3b76f98ee9e29e826.tar.gz
llvm-fcc93d2c0aece88c79648be3b76f98ee9e29e826.tar.bz2
llvm-fcc93d2c0aece88c79648be3b76f98ee9e29e826.tar.xz
MethodPass's are now guaranteed to not be run on external methods!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1611 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/Instrumentation/TraceValues.cpp2
-rw-r--r--lib/Transforms/LevelRaise.cpp2
-rw-r--r--lib/Transforms/Scalar/ADCE.cpp4
-rw-r--r--lib/Transforms/Scalar/IndVarSimplify.cpp2
-rw-r--r--lib/Transforms/Scalar/SCCP.cpp1
5 files changed, 2 insertions, 9 deletions
diff --git a/lib/Transforms/Instrumentation/TraceValues.cpp b/lib/Transforms/Instrumentation/TraceValues.cpp
index c778ca8b0d..aad63c848f 100644
--- a/lib/Transforms/Instrumentation/TraceValues.cpp
+++ b/lib/Transforms/Instrumentation/TraceValues.cpp
@@ -242,7 +242,7 @@ static inline void InsertCodeToShowMethodExit(BasicBlock *BB, Method *Printf) {
bool InsertTraceCode::doit(Method *M, bool traceBasicBlockExits,
bool traceMethodEvents, Method *Printf) {
- if (M->isExternal() || (!traceBasicBlockExits && !traceMethodEvents))
+ if (!traceBasicBlockExits && !traceMethodEvents)
return false;
vector<Instruction*> valuesStoredInMethod;
diff --git a/lib/Transforms/LevelRaise.cpp b/lib/Transforms/LevelRaise.cpp
index 38865003bb..ef0a5fd314 100644
--- a/lib/Transforms/LevelRaise.cpp
+++ b/lib/Transforms/LevelRaise.cpp
@@ -435,8 +435,6 @@ static bool DoRaisePass(Method *M) {
// level.
//
bool RaisePointerReferences::doit(Method *M) {
- if (M->isExternal()) return false;
-
#ifdef DEBUG_PEEPHOLE_INSTS
cerr << "\n\n\nStarting to work on Method '" << M->getName() << "'\n";
#endif
diff --git a/lib/Transforms/Scalar/ADCE.cpp b/lib/Transforms/Scalar/ADCE.cpp
index 5449f22346..71c50674f4 100644
--- a/lib/Transforms/Scalar/ADCE.cpp
+++ b/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/lib/Transforms/Scalar/IndVarSimplify.cpp b/lib/Transforms/Scalar/IndVarSimplify.cpp
index 48faffebf4..d06c19787f 100644
--- a/lib/Transforms/Scalar/IndVarSimplify.cpp
+++ b/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/lib/Transforms/Scalar/SCCP.cpp b/lib/Transforms/Scalar/SCCP.cpp
index 9b2343c936..d6b7c40f34 100644
--- a/lib/Transforms/Scalar/SCCP.cpp
+++ b/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();
}