summaryrefslogtreecommitdiffstats
path: root/llvm
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
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')
-rw-r--r--llvm/lib/Transforms/Instrumentation/TraceValues.cpp2
-rw-r--r--llvm/lib/Transforms/LevelRaise.cpp2
-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
5 files changed, 2 insertions, 9 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/TraceValues.cpp b/llvm/lib/Transforms/Instrumentation/TraceValues.cpp
index c778ca8b0df..aad63c848f2 100644
--- a/llvm/lib/Transforms/Instrumentation/TraceValues.cpp
+++ b/llvm/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/llvm/lib/Transforms/LevelRaise.cpp b/llvm/lib/Transforms/LevelRaise.cpp
index 38865003bb3..ef0a5fd314d 100644
--- a/llvm/lib/Transforms/LevelRaise.cpp
+++ b/llvm/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/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