diff options
author | Devang Patel <dpatel@apple.com> | 2009-08-25 05:24:07 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2009-08-25 05:24:07 +0000 |
commit | 57b83c78f56324e3a8ff636b311235f6f2350b4e (patch) | |
tree | 48270c87c6b683ff972a9e35651d27e620881118 /include/llvm/CodeGen | |
parent | bcc93309ca3632b3cd2b45f265a534256be7589a (diff) | |
download | external_llvm-57b83c78f56324e3a8ff636b311235f6f2350b4e.zip external_llvm-57b83c78f56324e3a8ff636b311235f6f2350b4e.tar.gz external_llvm-57b83c78f56324e3a8ff636b311235f6f2350b4e.tar.bz2 |
Update DebugInfo interface to use metadata, instead of special named llvm.dbg.... global variables, to encode debugging information in llvm IR. This is mostly a mechanical change that tests metadata support very well.
This change speeds up llvm-gcc by more then 6% at "-O0 -g" (measured by compiling InstructionCombining.cpp!)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79977 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen')
-rw-r--r-- | include/llvm/CodeGen/DwarfWriter.h | 8 | ||||
-rw-r--r-- | include/llvm/CodeGen/MachineFunction.h | 2 | ||||
-rw-r--r-- | include/llvm/CodeGen/SelectionDAG.h | 2 | ||||
-rw-r--r-- | include/llvm/CodeGen/SelectionDAGNodes.h | 6 |
4 files changed, 9 insertions, 9 deletions
diff --git a/include/llvm/CodeGen/DwarfWriter.h b/include/llvm/CodeGen/DwarfWriter.h index 9ae7668..3635c4d 100644 --- a/include/llvm/CodeGen/DwarfWriter.h +++ b/include/llvm/CodeGen/DwarfWriter.h @@ -33,7 +33,7 @@ class MachineFunction; class MachineInstr; class Value; class Module; -class GlobalVariable; +class MDNode; class MCAsmInfo; class raw_ostream; class Instruction; @@ -88,17 +88,17 @@ public: unsigned RecordSourceLine(unsigned Line, unsigned Col, DICompileUnit CU); /// RecordRegionStart - Indicate the start of a region. - unsigned RecordRegionStart(GlobalVariable *V); + unsigned RecordRegionStart(MDNode *N); /// RecordRegionEnd - Indicate the end of a region. - unsigned RecordRegionEnd(GlobalVariable *V); + unsigned RecordRegionEnd(MDNode *N); /// getRecordSourceLineCount - Count source lines. unsigned getRecordSourceLineCount(); /// RecordVariable - Indicate the declaration of a local variable. /// - void RecordVariable(GlobalVariable *GV, unsigned FrameIndex); + void RecordVariable(MDNode *N, unsigned FrameIndex); /// ShouldEmitDwarfDebug - Returns true if Dwarf debugging declarations should /// be emitted. diff --git a/include/llvm/CodeGen/MachineFunction.h b/include/llvm/CodeGen/MachineFunction.h index 51200cb..38c7a5f 100644 --- a/include/llvm/CodeGen/MachineFunction.h +++ b/include/llvm/CodeGen/MachineFunction.h @@ -327,7 +327,7 @@ public: /// getOrCreateDebugLocID - Look up the DebugLocTuple index with the given /// source file, line, and column. If none currently exists, create a new /// DebugLocTuple, and insert it into the DebugIdMap. - unsigned getOrCreateDebugLocID(GlobalVariable *CompileUnit, + unsigned getOrCreateDebugLocID(MDNode *CompileUnit, unsigned Line, unsigned Col); /// getDebugLocTuple - Get the DebugLocTuple for a given DebugLoc object. diff --git a/include/llvm/CodeGen/SelectionDAG.h b/include/llvm/CodeGen/SelectionDAG.h index 5f54981..9d92a08 100644 --- a/include/llvm/CodeGen/SelectionDAG.h +++ b/include/llvm/CodeGen/SelectionDAG.h @@ -322,7 +322,7 @@ public: SDValue getValueType(EVT); SDValue getRegister(unsigned Reg, EVT VT); SDValue getDbgStopPoint(DebugLoc DL, SDValue Root, - unsigned Line, unsigned Col, Value *CU); + unsigned Line, unsigned Col, MDNode *CU); SDValue getLabel(unsigned Opcode, DebugLoc dl, SDValue Root, unsigned LabelID); diff --git a/include/llvm/CodeGen/SelectionDAGNodes.h b/include/llvm/CodeGen/SelectionDAGNodes.h index a5fb08f..0e656a2 100644 --- a/include/llvm/CodeGen/SelectionDAGNodes.h +++ b/include/llvm/CodeGen/SelectionDAGNodes.h @@ -2015,10 +2015,10 @@ class DbgStopPointSDNode : public SDNode { SDUse Chain; unsigned Line; unsigned Column; - Value *CU; + MDNode *CU; friend class SelectionDAG; DbgStopPointSDNode(SDValue ch, unsigned l, unsigned c, - Value *cu) + MDNode *cu) : SDNode(ISD::DBG_STOPPOINT, DebugLoc::getUnknownLoc(), getSDVTList(MVT::Other)), Line(l), Column(c), CU(cu) { InitOperands(&Chain, ch); @@ -2026,7 +2026,7 @@ class DbgStopPointSDNode : public SDNode { public: unsigned getLine() const { return Line; } unsigned getColumn() const { return Column; } - Value *getCompileUnit() const { return CU; } + MDNode *getCompileUnit() const { return CU; } static bool classof(const DbgStopPointSDNode *) { return true; } static bool classof(const SDNode *N) { |