summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-12-11 07:45:04 +0000
committerChris Lattner <sabre@nondot.org>2005-12-11 07:45:04 +0000
commite6f2c8207378bc7890f98b8a0fcd79894b3f010a (patch)
treeda182e7ff86fdc8b41b424c5108aea15717d9de9 /llvm/lib
parent3d9559fedcbcaec760afe1b96a43717eb21d7168 (diff)
downloadbcm5719-llvm-e6f2c8207378bc7890f98b8a0fcd79894b3f010a.tar.gz
bcm5719-llvm-e6f2c8207378bc7890f98b8a0fcd79894b3f010a.zip
Realize the constant pool & global addrs must always be ptr type
llvm-svn: 24660
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/TargetSelectionDAG.td11
1 files changed, 6 insertions, 5 deletions
diff --git a/llvm/lib/Target/TargetSelectionDAG.td b/llvm/lib/Target/TargetSelectionDAG.td
index 95ec8354ae4..9d56ec6e064 100644
--- a/llvm/lib/Target/TargetSelectionDAG.td
+++ b/llvm/lib/Target/TargetSelectionDAG.td
@@ -69,7 +69,8 @@ class SDTypeProfile<int numresults, int numoperands,
}
// Builtin profiles.
-def SDTImm : SDTypeProfile<1, 0, [SDTCisInt<0>]>; // for 'imm'.
+def SDTIntLeaf: SDTypeProfile<1, 0, [SDTCisInt<0>]>; // for 'imm'.
+def SDTPtrLeaf: SDTypeProfile<1, 0, [SDTCisPtrTy<0>]>; // for '&g'.
def SDTOther : SDTypeProfile<1, 0, [SDTCisVT<0, OtherVT>]>; // for 'vt'.
def SDTUNDEF : SDTypeProfile<1, 0, []>; // for 'undef'.
def SDTIntBinOp : SDTypeProfile<1, 2, [ // add, and, or, xor, udiv, etc.
@@ -165,16 +166,16 @@ class SDNode<string opcode, SDTypeProfile typeprof,
def set;
def node;
-def imm : SDNode<"ISD::Constant" , SDTImm , [], "ConstantSDNode">;
+def imm : SDNode<"ISD::Constant" , SDTIntLeaf , [], "ConstantSDNode">;
def vt : SDNode<"ISD::VALUETYPE" , SDTOther , [], "VTSDNode">;
def bb : SDNode<"ISD::BasicBlock", SDTOther , [], "BasicBlockSDNode">;
def cond : SDNode<"ISD::CONDCODE" , SDTOther , [], "CondCodeSDNode">;
def undef : SDNode<"ISD::UNDEF" , SDTUNDEF , []>;
-def globaladdr : SDNode<"ISD::GlobalAddress", SDTImm, [],
+def globaladdr : SDNode<"ISD::GlobalAddress", SDTPtrLeaf, [],
"GlobalAddressSDNode">;
-def tglobaladdr : SDNode<"ISD::TargetGlobalAddress", SDTImm, [],
+def tglobaladdr : SDNode<"ISD::TargetGlobalAddress", SDTPtrLeaf, [],
"GlobalAddressSDNode">;
-def tconstpool : SDNode<"ISD::TargetConstantPool", SDTImm, [],
+def tconstpool : SDNode<"ISD::TargetConstantPool", SDTPtrLeaf, [],
"ConstantPoolSDNode">;
def add : SDNode<"ISD::ADD" , SDTIntBinOp ,
[SDNPCommutative, SDNPAssociative]>;
OpenPOWER on IntegriCloud