diff options
author | Evan Cheng <evan.cheng@apple.com> | 2008-01-31 09:59:15 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2008-01-31 09:59:15 +0000 |
commit | bb81d97feb396a8bb21d074db1c57e9f66525f40 (patch) | |
tree | 1b7fda6273344331e160122778fe96319e45d842 /include/llvm/CodeGen | |
parent | 8535624739e55ab7424eadf792e1a3b4123421c7 (diff) |
Add an extra operand to LABEL nodes which distinguishes between debug, EH, or misc labels. This fixes the EH breakage. However I am not convinced this is *the* solution.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46609 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen')
-rw-r--r-- | include/llvm/CodeGen/MachineInstr.h | 4 | ||||
-rw-r--r-- | include/llvm/CodeGen/SelectionDAGNodes.h | 7 |
2 files changed, 11 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/MachineInstr.h b/include/llvm/CodeGen/MachineInstr.h index 5f3838787e..8b0931ac61 100644 --- a/include/llvm/CodeGen/MachineInstr.h +++ b/include/llvm/CodeGen/MachineInstr.h @@ -134,6 +134,10 @@ public: delete removeFromParent(); } + /// isDebugLabel - Returns true if the MachineInstr represents a debug label. + /// + bool isDebugLabel() const; + /// findRegisterUseOperandIdx() - Returns the operand index that is a use of /// the specific register or -1 if it is not found. It further tightening /// the search criteria to a use that kills the register if isKill is true. diff --git a/include/llvm/CodeGen/SelectionDAGNodes.h b/include/llvm/CodeGen/SelectionDAGNodes.h index 8d3962e39b..cb4ac72d91 100644 --- a/include/llvm/CodeGen/SelectionDAGNodes.h +++ b/include/llvm/CodeGen/SelectionDAGNodes.h @@ -496,6 +496,8 @@ namespace ISD { // returns a chain. // Operand #0 : input chain. // Operand #1 : module unique number use to identify the label. + // Operand #2 : 0 indicates a debug label (e.g. stoppoint), 1 indicates + // a EH label, 2 indicates unknown label type. LABEL, // STACKSAVE - STACKSAVE has one operand, an input chain. It produces a @@ -593,6 +595,11 @@ namespace ISD { /// isBuildVectorAllZeros - Return true if the specified node is a /// BUILD_VECTOR where all of the elements are 0 or undef. bool isBuildVectorAllZeros(const SDNode *N); + + /// isDebugLabel - Return true if the specified node represents a debug + /// label (i.e. ISD::LABEL or TargetInstrInfo::LANEL node and third operand + /// is 0). + bool isDebugLabel(const SDNode *N); //===--------------------------------------------------------------------===// /// MemIndexedMode enum - This enum defines the load / store indexed |