diff options
Diffstat (limited to 'llvm/lib/CodeGen/MachineCSE.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineCSE.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineCSE.cpp b/llvm/lib/CodeGen/MachineCSE.cpp index f879c5f..8bd7eae 100644 --- a/llvm/lib/CodeGen/MachineCSE.cpp +++ b/llvm/lib/CodeGen/MachineCSE.cpp @@ -65,6 +65,10 @@ static cl::opt<int> CSUsesThreshold("csuses-threshold", cl::Hidden, cl::init(1024), cl::desc("Threshold for the size of CSUses")); +static cl::opt<bool> AggressiveMachineCSE( + "aggressive-machine-cse", cl::Hidden, cl::init(false), + cl::desc("Override the profitability heuristics for Machine CSE")); + namespace { class MachineCSE : public MachineFunctionPass { @@ -439,6 +443,9 @@ bool MachineCSE::isCSECandidate(MachineInstr *MI) { /// defined. bool MachineCSE::isProfitableToCSE(Register CSReg, Register Reg, MachineBasicBlock *CSBB, MachineInstr *MI) { + if (AggressiveMachineCSE) + return true; + // FIXME: Heuristics that works around the lack the live range splitting. // If CSReg is used at all uses of Reg, CSE should not increase register |