diff options
author | Chris Lattner <sabre@nondot.org> | 2010-03-14 02:33:54 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-03-14 02:33:54 +0000 |
commit | ee2fbbc978aa29a0196ea522adb947a8f86dde4a (patch) | |
tree | b2ceb0047581b28bbf89d16f9329e0401478244e /llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | |
parent | 07293da97ebf4028f95ba0b9c0a6f200b4c03ebc (diff) | |
download | bcm5719-llvm-ee2fbbc978aa29a0196ea522adb947a8f86dde4a.tar.gz bcm5719-llvm-ee2fbbc978aa29a0196ea522adb947a8f86dde4a.zip |
change the LabelSDNode to be EHLabelSDNode and make it hold
an MCSymbol. Make the EH_LABEL MachineInstr hold its label
with an MCSymbol instead of ID. Fix a bug in MMI.cpp which
would return labels named "Label4" instead of "label4".
llvm-svn: 98463
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 58a475c0a87..1911103450a 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -1314,24 +1314,23 @@ SDValue SelectionDAG::getRegister(unsigned RegNo, EVT VT) { return SDValue(N, 0); } -SDValue SelectionDAG::getLabel(unsigned Opcode, DebugLoc dl, - SDValue Root, - unsigned LabelID) { +SDValue SelectionDAG::getEHLabel(DebugLoc dl, SDValue Root, MCSymbol *Label) { FoldingSetNodeID ID; SDValue Ops[] = { Root }; - AddNodeIDNode(ID, Opcode, getVTList(MVT::Other), &Ops[0], 1); - ID.AddInteger(LabelID); + AddNodeIDNode(ID, ISD::EH_LABEL, getVTList(MVT::Other), &Ops[0], 1); + ID.AddPointer(Label); void *IP = 0; if (SDNode *E = CSEMap.FindNodeOrInsertPos(ID, IP)) return SDValue(E, 0); - - SDNode *N = NodeAllocator.Allocate<LabelSDNode>(); - new (N) LabelSDNode(Opcode, dl, Root, LabelID); + + SDNode *N = NodeAllocator.Allocate<EHLabelSDNode>(); + new (N) EHLabelSDNode(dl, Root, Label); CSEMap.InsertNode(N, IP); AllNodes.push_back(N); return SDValue(N, 0); } + SDValue SelectionDAG::getBlockAddress(BlockAddress *BA, EVT VT, bool isTarget, unsigned char TargetFlags) { |