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
This commit is contained in:
Chris Lattner 2002-01-31 00:51:24 +00:00
parent fb1b3f119d
commit fcc93d2c0a
5 changed files with 2 additions and 9 deletions

View File

@ -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;

View File

@ -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

View File

@ -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));
}

View File

@ -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(),

View File

@ -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();
}