diff options
author | Eric Christopher <echristo@gmail.com> | 2014-05-21 23:40:26 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2014-05-21 23:40:26 +0000 |
commit | 6b0fcfee36069c8b5b9216935df8632245c0898f (patch) | |
tree | 8e874db26d0970fac0ab85bd8e9d4dbb02f4b4d0 /llvm/lib/CodeGen | |
parent | ed19bad61749170a489c033120737de0f53fc763 (diff) | |
download | bcm5719-llvm-6b0fcfee36069c8b5b9216935df8632245c0898f.tar.gz bcm5719-llvm-6b0fcfee36069c8b5b9216935df8632245c0898f.zip |
Make early if conversion dependent upon the subtarget and add
a subtarget hook to enable. Unconditionally add to the pass pipeline
for targets that might want to use it. No functional change.
llvm-svn: 209340
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/EarlyIfConversion.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/EarlyIfConversion.cpp b/llvm/lib/CodeGen/EarlyIfConversion.cpp index e3190241cd6..b621e101773 100644 --- a/llvm/lib/CodeGen/EarlyIfConversion.cpp +++ b/llvm/lib/CodeGen/EarlyIfConversion.cpp @@ -776,6 +776,10 @@ bool EarlyIfConverter::tryConvertIf(MachineBasicBlock *MBB) { bool EarlyIfConverter::runOnMachineFunction(MachineFunction &MF) { DEBUG(dbgs() << "********** EARLY IF-CONVERSION **********\n" << "********** Function: " << MF.getName() << '\n'); + // Only run if conversion if the target wants it. + if (!MF.getTarget().getSubtarget().enableEarlyIfConversion()) + return true; + TII = MF.getTarget().getInstrInfo(); TRI = MF.getTarget().getRegisterInfo(); SchedModel = |