diff options
author | Evan Cheng <evan.cheng@apple.com> | 2011-08-30 19:09:48 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2011-08-30 19:09:48 +0000 |
commit | e6fba77971f3f32d49fe48dcda30d17811230b1b (patch) | |
tree | 429d4f9bd143ec28cd616fc0d4c1d80cb6ec819d /llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | |
parent | d708ec4c6a3e55865b2d4d8096871a2fc8087bf8 (diff) | |
download | bcm5719-llvm-e6fba77971f3f32d49fe48dcda30d17811230b1b.tar.gz bcm5719-llvm-e6fba77971f3f32d49fe48dcda30d17811230b1b.zip |
Follow up to r138791.
Add a instruction flag: hasPostISelHook which tells the pre-RA scheduler to
call a target hook to adjust the instruction. For ARM, this is used to
adjust instructions which may be setting the 's' flag. ADC, SBC, RSB, and RSC
instructions have implicit def of CPSR (required since it now uses CPSR physical
register dependency rather than "glue"). If the carry flag is used, then the
target hook will *fill in* the optional operand with CPSR. Otherwise, the hook
will remove the CPSR implicit def from the MachineInstr.
llvm-svn: 138810
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index dda018b9398..7a3ea86e8c9 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -177,6 +177,16 @@ TargetLowering::EmitInstrWithCustomInserter(MachineInstr *MI, return 0; } +void TargetLowering::AdjustInstrPostInstrSelection(MachineInstr *MI, + SDNode *Node) const { +#ifndef NDEBUG + dbgs() << "If a target marks an instruction with " + "'hasPostISelHook', it must implement " + "TargetLowering::AdjustInstrPostInstrSelection!"; +#endif + llvm_unreachable(0); +} + //===----------------------------------------------------------------------===// // SelectionDAGISel code //===----------------------------------------------------------------------===// |