diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/CodeGen/MachineInstr.h | 4 | ||||
-rw-r--r-- | include/llvm/CodeGen/SelectionDAG.h | 1 | ||||
-rw-r--r-- | include/llvm/CodeGen/SelectionDAGNodes.h | 38 | ||||
-rw-r--r-- | include/llvm/Target/TargetInstrInfo.h | 14 |
4 files changed, 40 insertions, 17 deletions
diff --git a/include/llvm/CodeGen/MachineInstr.h b/include/llvm/CodeGen/MachineInstr.h index 6e46ab3..5fc0624 100644 --- a/include/llvm/CodeGen/MachineInstr.h +++ b/include/llvm/CodeGen/MachineInstr.h @@ -136,6 +136,10 @@ public: delete removeFromParent(); } + /// isLabel - Returns true if the MachineInstr represents a label. + /// + bool isLabel() const; + /// isDebugLabel - Returns true if the MachineInstr represents a debug label. /// bool isDebugLabel() const; diff --git a/include/llvm/CodeGen/SelectionDAG.h b/include/llvm/CodeGen/SelectionDAG.h index 345864d..6e9a239 100644 --- a/include/llvm/CodeGen/SelectionDAG.h +++ b/include/llvm/CodeGen/SelectionDAG.h @@ -225,6 +225,7 @@ public: SDOperand getRegister(unsigned Reg, MVT VT); SDOperand getDbgStopPoint(SDOperand Root, unsigned Line, unsigned Col, const CompileUnitDesc *CU); + SDOperand getLabel(unsigned Opcode, SDOperand Root, unsigned LabelID); SDOperand getCopyToReg(SDOperand Chain, unsigned Reg, SDOperand N) { return getNode(ISD::CopyToReg, MVT::Other, Chain, diff --git a/include/llvm/CodeGen/SelectionDAGNodes.h b/include/llvm/CodeGen/SelectionDAGNodes.h index addf355..caa077d 100644 --- a/include/llvm/CodeGen/SelectionDAGNodes.h +++ b/include/llvm/CodeGen/SelectionDAGNodes.h @@ -482,14 +482,11 @@ namespace ISD { // Operand #last: Optional, an incoming flag. INLINEASM, - // LABEL - Represents a label in mid basic block used to track - // locations needed for debug and exception handling tables. This node - // 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, + // DBG_LABEL, EH_LABEL - Represents a label in mid basic block used to track + // locations needed for debug and exception handling tables. These nodes + // take a chain as input and return a chain. + DBG_LABEL, + EH_LABEL, // DECLARE - Represents a llvm.dbg.declare intrinsic. It's used to track // local variable declarations for debugging information. First operand is @@ -642,8 +639,7 @@ namespace ISD { bool isScalarToVector(const SDNode *N); /// isDebugLabel - Return true if the specified node represents a debug - /// label (i.e. ISD::LABEL or TargetInstrInfo::LABEL node and third operand - /// is 0). + /// label (i.e. ISD::DBG_LABEL or TargetInstrInfo::DBG_LABEL node). bool isDebugLabel(const SDNode *N); //===--------------------------------------------------------------------===// @@ -1859,7 +1855,6 @@ protected: InitOperands(&Chain, 1); } public: - unsigned getLine() const { return Line; } unsigned getColumn() const { return Column; } const CompileUnitDesc *getCompileUnit() const { return CU; } @@ -1870,6 +1865,27 @@ public: } }; +class LabelSDNode : public SDNode { + SDUse Chain; + unsigned LabelID; + virtual void ANCHOR(); // Out-of-line virtual method to give class a home. +protected: + friend class SelectionDAG; + LabelSDNode(unsigned NodeTy, SDOperand ch, unsigned id) + : SDNode(NodeTy, getSDVTList(MVT::Other)), LabelID(id) { + Chain = ch; + InitOperands(&Chain, 1); + } +public: + unsigned getLabelID() const { return LabelID; } + + static bool classof(const LabelSDNode *) { return true; } + static bool classof(const SDNode *N) { + return N->getOpcode() == ISD::DBG_LABEL || + N->getOpcode() == ISD::EH_LABEL; + } +}; + class ExternalSymbolSDNode : public SDNode { const char *Symbol; virtual void ANCHOR(); // Out-of-line virtual method to give class a home. diff --git a/include/llvm/Target/TargetInstrInfo.h b/include/llvm/Target/TargetInstrInfo.h index a2dc86f..5c5f0e1 100644 --- a/include/llvm/Target/TargetInstrInfo.h +++ b/include/llvm/Target/TargetInstrInfo.h @@ -46,12 +46,14 @@ public: enum { PHI = 0, INLINEASM = 1, - LABEL = 2, - DECLARE = 3, - EXTRACT_SUBREG = 4, - INSERT_SUBREG = 5, - IMPLICIT_DEF = 6, - SUBREG_TO_REG = 7 + DBG_LABEL = 2, + EH_LABEL = 3, + GC_LABEL = 4, + DECLARE = 5, + EXTRACT_SUBREG = 6, + INSERT_SUBREG = 7, + IMPLICIT_DEF = 8, + SUBREG_TO_REG = 9 }; unsigned getNumOpcodes() const { return NumOpcodes; } |