aboutsummaryrefslogtreecommitdiff
path: root/utils/TableGen/CodeGenTarget.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-07-01 00:05:16 +0000
committerDan Gohman <gohman@apple.com>2008-07-01 00:05:16 +0000
commit4406604047423576e36657c7ede266ca42e79642 (patch)
treee169d28b09c59d954867d6bac98f8fffe8494096 /utils/TableGen/CodeGenTarget.cpp
parentc2bf1870a7317bd38102e74d261aa8f92c013744 (diff)
Split ISD::LABEL into ISD::DBG_LABEL and ISD::EH_LABEL, eliminating
the need for a flavor operand, and add a new SDNode subclass, LabelSDNode, for use with them to eliminate the need for a label id operand. Change instruction selection to let these label nodes through unmodified instead of creating copies of them. Teach the MachineInstr emitter how to emit a MachineInstr directly from an ISD label node. This avoids the need for allocating SDNodes for the label id and flavor value, as well as SDNodes for each of the post-isel label, label id, and label flavor. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52943 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/CodeGenTarget.cpp')
-rw-r--r--utils/TableGen/CodeGenTarget.cpp22
1 files changed, 17 insertions, 5 deletions
diff --git a/utils/TableGen/CodeGenTarget.cpp b/utils/TableGen/CodeGenTarget.cpp
index 2aae8773fa..a09068e15b 100644
--- a/utils/TableGen/CodeGenTarget.cpp
+++ b/utils/TableGen/CodeGenTarget.cpp
@@ -286,9 +286,17 @@ getInstructionsByEnumValue(std::vector<const CodeGenInstruction*>
if (I == Instructions.end()) throw "Could not find 'INLINEASM' instruction!";
const CodeGenInstruction *INLINEASM = &I->second;
- I = getInstructions().find("LABEL");
- if (I == Instructions.end()) throw "Could not find 'LABEL' instruction!";
- const CodeGenInstruction *LABEL = &I->second;
+ I = getInstructions().find("DBG_LABEL");
+ if (I == Instructions.end()) throw "Could not find 'DBG_LABEL' instruction!";
+ const CodeGenInstruction *DBG_LABEL = &I->second;
+
+ I = getInstructions().find("EH_LABEL");
+ if (I == Instructions.end()) throw "Could not find 'EH_LABEL' instruction!";
+ const CodeGenInstruction *EH_LABEL = &I->second;
+
+ I = getInstructions().find("GC_LABEL");
+ if (I == Instructions.end()) throw "Could not find 'GC_LABEL' instruction!";
+ const CodeGenInstruction *GC_LABEL = &I->second;
I = getInstructions().find("DECLARE");
if (I == Instructions.end()) throw "Could not find 'DECLARE' instruction!";
@@ -317,7 +325,9 @@ getInstructionsByEnumValue(std::vector<const CodeGenInstruction*>
// Print out the rest of the instructions now.
NumberedInstructions.push_back(PHI);
NumberedInstructions.push_back(INLINEASM);
- NumberedInstructions.push_back(LABEL);
+ NumberedInstructions.push_back(DBG_LABEL);
+ NumberedInstructions.push_back(EH_LABEL);
+ NumberedInstructions.push_back(GC_LABEL);
NumberedInstructions.push_back(DECLARE);
NumberedInstructions.push_back(EXTRACT_SUBREG);
NumberedInstructions.push_back(INSERT_SUBREG);
@@ -326,7 +336,9 @@ getInstructionsByEnumValue(std::vector<const CodeGenInstruction*>
for (inst_iterator II = inst_begin(), E = inst_end(); II != E; ++II)
if (&II->second != PHI &&
&II->second != INLINEASM &&
- &II->second != LABEL &&
+ &II->second != DBG_LABEL &&
+ &II->second != EH_LABEL &&
+ &II->second != GC_LABEL &&
&II->second != DECLARE &&
&II->second != EXTRACT_SUBREG &&
&II->second != INSERT_SUBREG &&