diff options
| author | Andrew Kaylor <andrew.kaylor@intel.com> | 2016-05-03 22:32:30 +0000 |
|---|---|---|
| committer | Andrew Kaylor <andrew.kaylor@intel.com> | 2016-05-03 22:32:30 +0000 |
| commit | 50271f787e99a35010ddbaafaa8fe711da5899f8 (patch) | |
| tree | 4a1e7c15845cfd69a2abf1d084c513975a3dfa8d /llvm/lib/CodeGen | |
| parent | 539cd6758b8da2f35fb88a275374f752e7671e47 (diff) | |
| download | bcm5719-llvm-50271f787e99a35010ddbaafaa8fe711da5899f8.tar.gz bcm5719-llvm-50271f787e99a35010ddbaafaa8fe711da5899f8.zip | |
Add opt-bisect support to additional passes that can be skipped
Differential Revision: http://reviews.llvm.org/D19882
llvm-svn: 268457
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/EarlyIfConversion.cpp | 3 | ||||
| -rw-r--r-- | llvm/lib/CodeGen/ExecutionDepsFix.cpp | 2 | ||||
| -rw-r--r-- | llvm/lib/CodeGen/IfConversion.cpp | 3 | ||||
| -rw-r--r-- | llvm/lib/CodeGen/MachineBlockPlacement.cpp | 3 |
4 files changed, 10 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/EarlyIfConversion.cpp b/llvm/lib/CodeGen/EarlyIfConversion.cpp index f253dc8a10f..4915447c502 100644 --- a/llvm/lib/CodeGen/EarlyIfConversion.cpp +++ b/llvm/lib/CodeGen/EarlyIfConversion.cpp @@ -785,6 +785,9 @@ bool EarlyIfConverter::tryConvertIf(MachineBasicBlock *MBB) { 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()) diff --git a/llvm/lib/CodeGen/ExecutionDepsFix.cpp b/llvm/lib/CodeGen/ExecutionDepsFix.cpp index 7555f403aae..0ba9b038007 100644 --- a/llvm/lib/CodeGen/ExecutionDepsFix.cpp +++ b/llvm/lib/CodeGen/ExecutionDepsFix.cpp @@ -726,6 +726,8 @@ void ExeDepsFix::visitSoftInstr(MachineInstr *mi, unsigned mask) { } bool ExeDepsFix::runOnMachineFunction(MachineFunction &mf) { + if (skipFunction(*mf.getFunction())) + return false; MF = &mf; TII = MF->getSubtarget().getInstrInfo(); TRI = MF->getSubtarget().getRegisterInfo(); diff --git a/llvm/lib/CodeGen/IfConversion.cpp b/llvm/lib/CodeGen/IfConversion.cpp index 8ac5a397e65..319c4f5b995 100644 --- a/llvm/lib/CodeGen/IfConversion.cpp +++ b/llvm/lib/CodeGen/IfConversion.cpp @@ -282,7 +282,8 @@ INITIALIZE_PASS_DEPENDENCY(MachineBranchProbabilityInfo) 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(); diff --git a/llvm/lib/CodeGen/MachineBlockPlacement.cpp b/llvm/lib/CodeGen/MachineBlockPlacement.cpp index fb722a166a0..d849509ce12 100644 --- a/llvm/lib/CodeGen/MachineBlockPlacement.cpp +++ b/llvm/lib/CodeGen/MachineBlockPlacement.cpp @@ -1442,6 +1442,9 @@ void MachineBlockPlacement::alignBlocks(MachineFunction &F) { } 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; |

