[llvm-commits] CVS: llvm/lib/Target/PowerPC/PowerPCInstrInfo.td
Chris Lattner
lattner at cs.uiuc.edu
Wed Sep 28 11:28:09 PDT 2005
Changes in directory llvm/lib/Target/PowerPC:
PowerPCInstrInfo.td updated: 1.105 -> 1.106
---
Log message:
expose commutativity information
---
Diffs of the changes: (+17 -8)
PowerPCInstrInfo.td | 25 +++++++++++++++++--------
1 files changed, 17 insertions(+), 8 deletions(-)
Index: llvm/lib/Target/PowerPC/PowerPCInstrInfo.td
diff -u llvm/lib/Target/PowerPC/PowerPCInstrInfo.td:1.105 llvm/lib/Target/PowerPC/PowerPCInstrInfo.td:1.106
--- llvm/lib/Target/PowerPC/PowerPCInstrInfo.td:1.105 Wed Sep 28 13:10:51 2005
+++ llvm/lib/Target/PowerPC/PowerPCInstrInfo.td Wed Sep 28 13:27:58 2005
@@ -81,27 +81,36 @@
SDTCisVTSmallerThanOp<2, 1>
]>;
+//===----------------------------------------------------------------------===//
+// Selection DAG Node Properties.
+//
+// Note: These are hard coded into tblgen.
+//
+class SDNodeProperty;
+def SDNPCommutative : SDNodeProperty;
//===----------------------------------------------------------------------===//
// Selection DAG Node definitions.
//
-class SDNode<string opcode, SDTypeProfile typeprof, string sdclass = "SDNode"> {
+class SDNode<string opcode, SDTypeProfile typeprof,
+ list<SDNodeProperty> props = [], string sdclass = "SDNode"> {
string Opcode = opcode;
string SDClass = sdclass;
+ list<SDNodeProperty> Properties = props;
SDTypeProfile TypeProfile = typeprof;
}
def set;
def node;
-def imm : SDNode<"ISD::Constant" , SDTImm , "ConstantSDNode">;
-def vt : SDNode<"ISD::VALUETYPE" , SDTVT , "VTSDNode">;
-def and : SDNode<"ISD::AND" , SDTIntBinOp>;
-def or : SDNode<"ISD::OR" , SDTIntBinOp>;
-def xor : SDNode<"ISD::XOR" , SDTIntBinOp>;
-def add : SDNode<"ISD::ADD" , SDTBinOp>;
+def imm : SDNode<"ISD::Constant" , SDTImm , [], "ConstantSDNode">;
+def vt : SDNode<"ISD::VALUETYPE" , SDTVT , [], "VTSDNode">;
+def and : SDNode<"ISD::AND" , SDTIntBinOp, [SDNPCommutative]>;
+def or : SDNode<"ISD::OR" , SDTIntBinOp, [SDNPCommutative]>;
+def xor : SDNode<"ISD::XOR" , SDTIntBinOp, [SDNPCommutative]>;
+def add : SDNode<"ISD::ADD" , SDTBinOp , [SDNPCommutative]>;
def sub : SDNode<"ISD::SUB" , SDTBinOp>;
-def mul : SDNode<"ISD::MUL" , SDTBinOp>;
+def mul : SDNode<"ISD::MUL" , SDTBinOp , [SDNPCommutative]>;
def sdiv : SDNode<"ISD::SDIV" , SDTBinOp>;
def udiv : SDNode<"ISD::UDIV" , SDTIntBinOp>;
def mulhs : SDNode<"ISD::MULHS" , SDTIntBinOp>;
More information about the llvm-commits
mailing list