diff options
author | Bill Wendling <isanbard@gmail.com> | 2009-05-21 00:04:55 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2009-05-21 00:04:55 +0000 |
commit | bc121cc257b82165c7e476cd627e6236375f4dc9 (patch) | |
tree | c959c208684bb29d9e35f268718632566137babf /include | |
parent | 4ca8dfde22e09e0ce39c6625f3da3e3241911ae9 (diff) | |
download | external_llvm-bc121cc257b82165c7e476cd627e6236375f4dc9.zip external_llvm-bc121cc257b82165c7e476cd627e6236375f4dc9.tar.gz external_llvm-bc121cc257b82165c7e476cd627e6236375f4dc9.tar.bz2 |
Temporarily revert r72191. It was causing an assert during llvm-gcc
bootstrapping.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72200 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/CodeGen/DebugLoc.h | 73 | ||||
-rw-r--r-- | include/llvm/CodeGen/FastISel.h | 1 | ||||
-rw-r--r-- | include/llvm/CodeGen/MachineFunction.h | 10 |
3 files changed, 7 insertions, 77 deletions
diff --git a/include/llvm/CodeGen/DebugLoc.h b/include/llvm/CodeGen/DebugLoc.h index 495baf4..77e6733 100644 --- a/include/llvm/CodeGen/DebugLoc.h +++ b/include/llvm/CodeGen/DebugLoc.h @@ -20,77 +20,18 @@ namespace llvm { class GlobalVariable; - class MachineFunction; - /// DebugScope - Debug scope id. This is carried into DebugLocTuple to index - /// into a vector of DebugScopeInfos. Provides the ability to associate a - /// SDNode/MachineInstr with the debug scope that it belongs to. - /// - class DebugScope { - unsigned Idx; - - public: - DebugScope() : Idx(~0U) {} // Defaults to null. - - static DebugScope getInvalid() { DebugScope S; S.Idx = ~0U; return S; } - static DebugScope get(unsigned idx) { DebugScope S; S.Idx = idx; return S; } - - unsigned getIndex() const { return Idx; } - - /// isInvalid - Return true if it doesn't refer to any scope. - bool isInvalid() const { return Idx == ~0U; } - - bool operator==(const DebugScope &DS) const { return Idx == DS.Idx; } - bool operator!=(const DebugScope &DS) const { return !(*this == DS); } - }; - - /// DebugScopeInfo - Contains info about the scope global variable and the - /// parent debug scope. DebugScope is only a "cookie" that can point to a - /// specific DebugScopeInfo. - /// - struct DebugScopeInfo { - GlobalVariable *GV; - DebugScope Parent; - - DebugScopeInfo(GlobalVariable *gv, DebugScope parent) - : GV(gv), Parent(parent) {} - DebugScopeInfo() - : GV(0), Parent(DebugScope::getInvalid()) {} - }; - - /// DebugScopeTracker - Create and keep track of the debug scope while - /// entering/exiting subprograms and blocks. Used by the instruction - /// selectors. - /// - class DebugScopeTracker { - DebugScope CurScope; - - public: - /// getCurScope - The current debug scope that we "entered" through - /// EnterDebugScope. - DebugScope getCurScope() const { return CurScope; } - - /// EnterDebugScope - Start a new debug scope. ScopeGV can be a DISubprogram - /// or a DIBlock. - void EnterDebugScope(GlobalVariable *ScopeGV, MachineFunction &MF); - - /// ExitDebugScope - "Pop" a DISubprogram or a DIBlock. - void ExitDebugScope(GlobalVariable *ScopeGV, MachineFunction &MF); - }; - - /// DebugLocTuple - Debug location tuple of a DICompileUnit global variable, - /// debug scope, line and column. + /// DebugLocTuple - Debug location tuple of filename id, line and column. /// struct DebugLocTuple { GlobalVariable *CompileUnit; - DebugScope Scope; unsigned Line, Col; - DebugLocTuple(GlobalVariable *v, DebugScope s, unsigned l, unsigned c) - : CompileUnit(v), Scope(s), Line(l), Col(c) {}; + DebugLocTuple(GlobalVariable *v, unsigned l, unsigned c) + : CompileUnit(v), Line(l), Col(c) {}; bool operator==(const DebugLocTuple &DLT) const { - return CompileUnit == DLT.CompileUnit && Scope == DLT.Scope && + return CompileUnit == DLT.CompileUnit && Line == DLT.Line && Col == DLT.Col; } bool operator!=(const DebugLocTuple &DLT) const { @@ -122,20 +63,18 @@ namespace llvm { // Partially specialize DenseMapInfo for DebugLocTyple. template<> struct DenseMapInfo<DebugLocTuple> { static inline DebugLocTuple getEmptyKey() { - return DebugLocTuple(0, DebugScope::getInvalid(), ~0U, ~0U); + return DebugLocTuple(0, ~0U, ~0U); } static inline DebugLocTuple getTombstoneKey() { - return DebugLocTuple((GlobalVariable*)~1U,DebugScope::get(~1U), ~1U, ~1U); + return DebugLocTuple((GlobalVariable*)~1U, ~1U, ~1U); } static unsigned getHashValue(const DebugLocTuple &Val) { return DenseMapInfo<GlobalVariable*>::getHashValue(Val.CompileUnit) ^ - DenseMapInfo<unsigned>::getHashValue(Val.Scope.getIndex()) ^ DenseMapInfo<unsigned>::getHashValue(Val.Line) ^ DenseMapInfo<unsigned>::getHashValue(Val.Col); } static bool isEqual(const DebugLocTuple &LHS, const DebugLocTuple &RHS) { return LHS.CompileUnit == RHS.CompileUnit && - LHS.Scope == RHS.Scope && LHS.Line == RHS.Line && LHS.Col == RHS.Col; } diff --git a/include/llvm/CodeGen/FastISel.h b/include/llvm/CodeGen/FastISel.h index df5c5bb..38c1710 100644 --- a/include/llvm/CodeGen/FastISel.h +++ b/include/llvm/CodeGen/FastISel.h @@ -57,7 +57,6 @@ protected: MachineFrameInfo &MFI; MachineConstantPool &MCP; DebugLoc DL; - DebugScopeTracker DbgScopeTrack; const TargetMachine &TM; const TargetData &TD; const TargetInstrInfo &TII; diff --git a/include/llvm/CodeGen/MachineFunction.h b/include/llvm/CodeGen/MachineFunction.h index d1744a0..a110e58 100644 --- a/include/llvm/CodeGen/MachineFunction.h +++ b/include/llvm/CodeGen/MachineFunction.h @@ -111,8 +111,6 @@ class MachineFunction : private Annotation { // Tracks debug locations. DebugLocTracker DebugLocInfo; - std::vector<DebugScopeInfo> DbgScopeInfos; - public: MachineFunction(const Function *Fn, const TargetMachine &TM); ~MachineFunction(); @@ -334,7 +332,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, DebugScope Scope, + unsigned getOrCreateDebugLocID(GlobalVariable *CompileUnit, unsigned Line, unsigned Col); /// getDebugLocTuple - Get the DebugLocTuple for a given DebugLoc object. @@ -347,12 +345,6 @@ public: /// setDefaultDebugLoc - Get the default debug location for the machine /// function. void setDefaultDebugLoc(DebugLoc DL) { DefaultDebugLoc = DL; } - - /// CreateDebugScope - Create a new debug scope. - DebugScope CreateDebugScope(GlobalVariable *ScopeGV, DebugScope Parent); - - /// getDebugScopeInfo - Get the DebugScopeInfo for a given DebugScope object. - const DebugScopeInfo &getDebugScopeInfo(DebugScope DS) const; }; //===--------------------------------------------------------------------===// |