bool InsertTraceCode::doit(Method *M, bool traceBasicBlockExits,
bool traceMethodEvents, Method *Printf) {
- if (M->isExternal() || (!traceBasicBlockExits && !traceMethodEvents))
+ if (!traceBasicBlockExits && !traceMethodEvents)
return false;
vector<Instruction*> valuesStoredInMethod;
// 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
// 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));
}
}
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(),
// 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();
}