bool EarlyIfConverter::runOnMachineFunction(MachineFunction &MF) {
DEBUG(dbgs() << "********** EARLY IF-CONVERSION **********\n"
<< "********** Function: " << MF.getName() << '\n');
+ if (skipFunction(*MF.getFunction()))
+ return false;
+
// Only run if conversion if the target wants it.
const TargetSubtargetInfo &STI = MF.getSubtarget();
if (!STI.enableEarlyIfConversion())
}
bool ExeDepsFix::runOnMachineFunction(MachineFunction &mf) {
+ if (skipFunction(*mf.getFunction()))
+ return false;
MF = &mf;
TII = MF->getSubtarget().getInstrInfo();
TRI = MF->getSubtarget().getRegisterInfo();
INITIALIZE_PASS_END(IfConverter, "if-converter", "If Converter", false, false)
bool IfConverter::runOnMachineFunction(MachineFunction &MF) {
- if (PredicateFtor && !PredicateFtor(*MF.getFunction()))
+ if (skipFunction(*MF.getFunction()) ||
+ (PredicateFtor && !PredicateFtor(*MF.getFunction())))
return false;
const TargetSubtargetInfo &ST = MF.getSubtarget();
}
bool MachineBlockPlacement::runOnMachineFunction(MachineFunction &F) {
+ if (skipFunction(*F.getFunction()))
+ return false;
+
// Check for single-block functions and skip them.
if (std::next(F.begin()) == F.end())
return false;
}
bool AlignmentFromAssumptions::runOnFunction(Function &F) {
+ if (skipFunction(F))
+ return false;
+
bool Changed = false;
auto &AC = getAnalysis<AssumptionCacheTracker>().getAssumptionCache(F);
SE = &getAnalysis<ScalarEvolutionWrapperPass>().getSE();
}
bool ConstantPropagation::runOnFunction(Function &F) {
+ if (skipFunction(F))
+ return false;
+
// Initialize the worklist to all of the instructions ready to process...
std::set<Instruction*> WorkList;
for (Instruction &I: instructions(&F))
}
bool InductiveRangeCheckElimination::runOnLoop(Loop *L, LPPassManager &LPM) {
+ if (skipLoop(L))
+ return false;
+
if (L->getBlocks().size() >= LoopSizeCutoff) {
DEBUG(dbgs() << "irce: giving up constraining loop, too large\n";);
return false;
}
bool LoopDataPrefetch::runOnFunction(Function &F) {
+ if (skipFunction(F))
+ return false;
+
LI = &getAnalysis<LoopInfoWrapperPass>().getLoopInfo();
SE = &getAnalysis<ScalarEvolutionWrapperPass>().getSE();
DL = &F.getParent()->getDataLayout();
}
bool runOnFunction(Function &F) override {
+ if (skipFunction(F))
+ return false;
+
auto *LI = &getAnalysis<LoopInfoWrapperPass>().getLoopInfo();
auto *LAA = &getAnalysis<LoopAccessAnalysis>();
auto *DT = &getAnalysis<DominatorTreeWrapperPass>().getDomTree();
}
bool runOnFunction(Function &F) override {
+ if (skipFunction(F))
+ return false;
+
SE = &getAnalysis<ScalarEvolutionWrapperPass>().getSE();
LI = &getAnalysis<LoopInfoWrapperPass>().getLoopInfo();
DA = &getAnalysis<DependenceAnalysis>();
}
bool PartiallyInlineLibCalls::runOnFunction(Function &F) {
+ if (skipFunction(F))
+ return false;
+
bool Changed = false;
Function::iterator CurrBB;
TargetLibraryInfo *TLI =
false, false)
bool RegToMem::runOnFunction(Function &F) {
- if (F.isDeclaration())
+ if (F.isDeclaration() || skipFunction(F))
return false;
// Insert all new allocas into entry block.
}
bool Scalarizer::runOnFunction(Function &F) {
+ if (skipFunction(F))
+ return false;
assert(Gathered.empty() && Scattered.empty());
for (BasicBlock &BB : F) {
for (BasicBlock::iterator II = BB.begin(), IE = BB.end(); II != IE;) {
initializeCFGSimplifyPassPass(*PassRegistry::getPassRegistry());
}
bool runOnFunction(Function &F) override {
- if (PredicateFtor && !PredicateFtor(F))
- return false;
-
- if (skipFunction(F))
+ if (skipFunction(F) || (PredicateFtor && !PredicateFtor(F)))
return false;
AssumptionCache *AC =
/// runOnFunction - Remove instructions that simplify.
bool runOnFunction(Function &F) override {
+ if (skipFunction(F))
+ return false;
+
const DominatorTreeWrapperPass *DTWP =
getAnalysisIfAvailable<DominatorTreeWrapperPass>();
const DominatorTree *DT = DTWP ? &DTWP->getDomTree() : nullptr;
; CHECK-SKIP-ALL-NOT: BISECT: running pass ({{[0-9]+}})
+; Verify that no passes run at -O0 are skipped
+; RUN: opt -opt-bisect-limit=0 < %s 2>&1 | FileCheck %s --check-prefix=OPTBISECT-O0
+; RUN: opt -opt-bisect-limit=0 < %s | llc -O0 -opt-bisect-limit=0 2>&1 | FileCheck %s --check-prefix=OPTBISECT-O0
+; OPTBISECT-O0-NOT: BISECT: NOT running
+
+; FIXME: There are still some AMDGPU passes being skipped that run at -O0.
+; XFAIL: r600, amdgcn
+
; Verify that we can use the opt-bisect-helper.py script (derived from
; utils/bisect) to locate the optimization that inlines the call to
; f2() in f3().