[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCInstrInfo.td PPCISelDAGToDAG.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sun Dec 4 11:02:11 PST 2005
Changes in directory llvm/lib/Target/PowerPC:
PPCInstrInfo.td updated: 1.149 -> 1.150
PPCISelDAGToDAG.cpp updated: 1.136 -> 1.137
---
Log message:
Autogen matching code for ADJCALLSTACK[UP|DOWN], thanks to Evan's tblgen
improvements.
---
Diffs of the changes: (+12 -11)
PPCISelDAGToDAG.cpp | 8 --------
PPCInstrInfo.td | 15 ++++++++++++---
2 files changed, 12 insertions(+), 11 deletions(-)
Index: llvm/lib/Target/PowerPC/PPCInstrInfo.td
diff -u llvm/lib/Target/PowerPC/PPCInstrInfo.td:1.149 llvm/lib/Target/PowerPC/PPCInstrInfo.td:1.150
--- llvm/lib/Target/PowerPC/PPCInstrInfo.td:1.149 Sun Dec 4 12:48:01 2005
+++ llvm/lib/Target/PowerPC/PPCInstrInfo.td Sun Dec 4 13:01:59 2005
@@ -30,6 +30,11 @@
def PPChi : SDNode<"PPCISD::Hi", SDTIntBinOp, []>;
def PPClo : SDNode<"PPCISD::Lo", SDTIntBinOp, []>;
+// These are target-independent nodes, but have target-specific formats.
+def SDT_PPCCallSeq : SDTypeProfile<0, 1, [ SDTCisVT<0, i32> ]>;
+def callseq_start : SDNode<"ISD::CALLSEQ_START", SDT_PPCCallSeq,[SDNPHasChain]>;
+def callseq_end : SDNode<"ISD::CALLSEQ_END", SDT_PPCCallSeq,[SDNPHasChain]>;
+
//===----------------------------------------------------------------------===//
// PowerPC specific transformation functions and pattern fragments.
//
@@ -158,9 +163,13 @@
// Pseudo-instructions:
def PHI : Pseudo<(ops variable_ops), "; PHI", []>;
-let isLoad = 1 in {
-def ADJCALLSTACKDOWN : Pseudo<(ops u16imm:$amt), "; ADJCALLSTACKDOWN", []>;
-def ADJCALLSTACKUP : Pseudo<(ops u16imm:$amt), "; ADJCALLSTACKUP", []>;
+let isLoad = 1, hasCtrlDep = 1 in {
+def ADJCALLSTACKDOWN : Pseudo<(ops u16imm:$amt),
+ "; ADJCALLSTACKDOWN",
+ [(callseq_start imm:$amt)]>;
+def ADJCALLSTACKUP : Pseudo<(ops u16imm:$amt),
+ "; ADJCALLSTACKUP",
+ [(callseq_end imm:$amt)]>;
}
def IMPLICIT_DEF_GPR : Pseudo<(ops GPRC:$rD), "; $rD = IMPLICIT_DEF_GPRC",
[(set GPRC:$rD, (undef))]>;
Index: llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
diff -u llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:1.136 llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:1.137
--- llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp:1.136 Sun Dec 4 12:48:01 2005
+++ llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp Sun Dec 4 13:01:59 2005
@@ -1190,14 +1190,6 @@
getI32Imm(BROpc));
}
- case ISD::CALLSEQ_START:
- case ISD::CALLSEQ_END: {
- unsigned Amt = cast<ConstantSDNode>(N->getOperand(1))->getValue();
- unsigned Opc = N->getOpcode() == ISD::CALLSEQ_START ?
- PPC::ADJCALLSTACKDOWN : PPC::ADJCALLSTACKUP;
- return CurDAG->SelectNodeTo(N, Opc, MVT::Other,
- getI32Imm(Amt), Select(N->getOperand(0)));
- }
case ISD::RET: {
SDOperand Chain = Select(N->getOperand(0)); // Token chain.
More information about the llvm-commits
mailing list