mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-14 00:32:55 +00:00
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:
parent
fb1b3f119d
commit
fcc93d2c0a
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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));
|
||||
}
|
||||
|
||||
|
@ -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(),
|
||||
|
@ -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();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user