diff options
| author | Evan Cheng <evan.cheng@apple.com> | 2010-07-30 23:33:54 +0000 | 
|---|---|---|
| committer | Evan Cheng <evan.cheng@apple.com> | 2010-07-30 23:33:54 +0000 | 
| commit | 59069ec78446b47d77caaa3032facade2c5532ea (patch) | |
| tree | 201224fd49593c5c3cb88b57de32da15b4b72bd9 /llvm/lib | |
| parent | eb7b21f3ebb9f49866df021ff3f425f2d7a3c76a (diff) | |
| download | bcm5719-llvm-59069ec78446b47d77caaa3032facade2c5532ea.tar.gz bcm5719-llvm-59069ec78446b47d77caaa3032facade2c5532ea.zip | |
Add -disable-shifter-op to disable isel of shifter ops. On Cortex-a9 the shifts cost extra instructions so it might be better to emit them separately to take advantage of dual-issues.
llvm-svn: 109934
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp | 11 | 
1 files changed, 11 insertions, 0 deletions
| diff --git a/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp b/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp index c84d3ff8132..f4012c71d7e 100644 --- a/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp +++ b/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp @@ -36,6 +36,11 @@  using namespace llvm; +static cl::opt<bool> +DisableShifterOp("disable-shifter-op", cl::Hidden, +  cl::desc("Disable isel of shifter-op"), +  cl::init(false)); +  //===--------------------------------------------------------------------===//  /// ARMDAGToDAGISel - ARM specific code to select ARM machine  /// instructions for SelectionDAG operations. @@ -220,6 +225,9 @@ bool ARMDAGToDAGISel::SelectShifterOperandReg(SDNode *Op,                                                SDValue &BaseReg,                                                SDValue &ShReg,                                                SDValue &Opc) { +  if (DisableShifterOp) +    return false; +    ARM_AM::ShiftOpc ShOpcVal = ARM_AM::getShiftOpcForNode(N);    // Don't match base register only case. That is matched to a separate @@ -666,6 +674,9 @@ bool ARMDAGToDAGISel::SelectThumbAddrModeSP(SDNode *Op, SDValue N,  bool ARMDAGToDAGISel::SelectT2ShifterOperandReg(SDNode *Op, SDValue N,                                                  SDValue &BaseReg,                                                  SDValue &Opc) { +  if (DisableShifterOp) +    return false; +    ARM_AM::ShiftOpc ShOpcVal = ARM_AM::getShiftOpcForNode(N);    // Don't match base register only case. That is matched to a separate | 

