[llvm-commits] CVS: llvm/lib/Target/SparcV8/SparcV8InstrInfo.td SparcV8RegisterInfo.cpp
Evan Cheng
evan.cheng at apple.com
Mon Jan 9 10:28:34 PST 2006
Changes in directory llvm/lib/Target/SparcV8:
SparcV8InstrInfo.td updated: 1.97 -> 1.98
SparcV8RegisterInfo.cpp updated: 1.32 -> 1.33
---
Log message:
New DAG node properties SNDPInFlag, SNDPOutFlag, and SNDPOptInFlag to replace
hasInFlag, hasOutFlag.
---
Diffs of the changes: (+7 -13)
SparcV8InstrInfo.td | 17 ++++++-----------
SparcV8RegisterInfo.cpp | 3 +--
2 files changed, 7 insertions(+), 13 deletions(-)
Index: llvm/lib/Target/SparcV8/SparcV8InstrInfo.td
diff -u llvm/lib/Target/SparcV8/SparcV8InstrInfo.td:1.97 llvm/lib/Target/SparcV8/SparcV8InstrInfo.td:1.98
--- llvm/lib/Target/SparcV8/SparcV8InstrInfo.td:1.97 Mon Dec 26 03:11:45 2005
+++ llvm/lib/Target/SparcV8/SparcV8InstrInfo.td Mon Jan 9 12:28:21 2006
@@ -94,10 +94,12 @@
def callseq_end : SDNode<"ISD::CALLSEQ_END", SDT_V8CallSeq, [SDNPHasChain]>;
def SDT_V8Call : SDTypeProfile<0, 1, [SDTCisVT<0, i32>]>;
-def call : SDNode<"ISD::CALL", SDT_V8Call, [SDNPHasChain]>;
+def call : SDNode<"ISD::CALL", SDT_V8Call,
+ [SDNPHasChain, SDNPOptInFlag, SDNPOutFlag]>;
def SDT_V8RetFlag : SDTypeProfile<0, 0, []>;
-def retflag : SDNode<"V8ISD::RET_FLAG", SDT_V8RetFlag, [SDNPHasChain]>;
+def retflag : SDNode<"V8ISD::RET_FLAG", SDT_V8RetFlag,
+ [SDNPHasChain, SDNPOptInFlag]>;
//===----------------------------------------------------------------------===//
// Instructions
@@ -173,10 +175,7 @@
// special cases of JMPL:
let isReturn = 1, isTerminator = 1, hasDelaySlot = 1, noResults = 1 in {
let rd = O7.Num, rs1 = G0.Num, simm13 = 8 in
- // FIXME: temporary workaround for return without an incoming flag.
- def RETVOID: F3_2<2, 0b111000, (ops), "retl", [(ret)]>;
- let hasInFlag = 1 in
- def RETL: F3_2<2, 0b111000, (ops), "retl", []>;
+ def RETL: F3_2<2, 0b111000, (ops), "retl", [(retflag)]>;
}
// Section B.1 - Load Integer Instructions, p. 90
@@ -563,7 +562,7 @@
// Section B.24 - Call and Link Instruction, p. 125
// This is the only Format 1 instruction
let Uses = [O0, O1, O2, O3, O4, O5],
- hasDelaySlot = 1, isCall = 1, hasInFlag = 1, hasOutFlag = 1, noResults = 1,
+ hasDelaySlot = 1, isCall = 1, noResults = 1,
Defs = [O0, O1, O2, O3, O4, O5, O7, G1, G2, G3, G4, G5, G6, G7,
D0, D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12, D13, D14, D15] in {
def CALL : InstV8<(ops calltarget:$dst),
@@ -725,10 +724,6 @@
def : Pat<(V8hi tconstpool:$in), (SETHIi tconstpool:$in)>;
def : Pat<(V8lo tconstpool:$in), (ORri G0, tconstpool:$in)>;
-// Return of a value, which has an input flag.
-def : Pat<(retflag), (RETL)>;
-
-
// Calls:
def : Pat<(call tglobaladdr:$dst),
(CALL tglobaladdr:$dst)>;
Index: llvm/lib/Target/SparcV8/SparcV8RegisterInfo.cpp
diff -u llvm/lib/Target/SparcV8/SparcV8RegisterInfo.cpp:1.32 llvm/lib/Target/SparcV8/SparcV8RegisterInfo.cpp:1.33
--- llvm/lib/Target/SparcV8/SparcV8RegisterInfo.cpp:1.32 Fri Dec 23 16:14:32 2005
+++ llvm/lib/Target/SparcV8/SparcV8RegisterInfo.cpp Mon Jan 9 12:28:21 2006
@@ -165,8 +165,7 @@
void SparcV8RegisterInfo::emitEpilogue(MachineFunction &MF,
MachineBasicBlock &MBB) const {
MachineBasicBlock::iterator MBBI = prior(MBB.end());
- // FIXME: RETVOID should be removed. See SparcV8InstrInfo.td
- assert((MBBI->getOpcode() == V8::RETL || MBBI->getOpcode() == V8::RETVOID) &&
+ assert(MBBI->getOpcode() == V8::RETL &&
"Can only put epilog before 'retl' instruction!");
BuildMI(MBB, MBBI, V8::RESTORErr, 2, V8::G0).addReg(V8::G0).addReg(V8::G0);
}
More information about the llvm-commits
mailing list