diff options
author | Chris Lattner <sabre@nondot.org> | 2010-03-14 02:24:55 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-03-14 02:24:55 +0000 |
commit | 18589de9b1b8c157dea602653042e486128dd9e4 (patch) | |
tree | bab599e7ff270803ad7e7936f9ac3c91729281ab /include/llvm/CodeGen/MachineModuleInfo.h | |
parent | b91306053d0aebd748bf854f05d93cd1939a1543 (diff) |
eliminate InvalidateLabel and LabelIDList from MMI and replace
them with a counter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98462 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineModuleInfo.h')
-rw-r--r-- | include/llvm/CodeGen/MachineModuleInfo.h | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/include/llvm/CodeGen/MachineModuleInfo.h b/include/llvm/CodeGen/MachineModuleInfo.h index eba49bd796..9215b33540 100644 --- a/include/llvm/CodeGen/MachineModuleInfo.h +++ b/include/llvm/CodeGen/MachineModuleInfo.h @@ -102,11 +102,8 @@ class MachineModuleInfo : public ImmutablePass { /// want. MachineModuleInfoImpl *ObjFileMMI; - // LabelIDList - One entry per assigned label. Normally the entry is equal to - // the list index(+1). If the entry is zero then the label has been deleted. - // Any other value indicates the label has been deleted by is mapped to - // another label. - std::vector<unsigned> LabelIDList; + /// NextLabelIDToReturn - Unique ID counter for labels. + unsigned NextLabelIDToReturn; // FrameMoves - List of moves done by a function's prolog. Used to construct // frame maps by debug and exception handling consumers. @@ -207,23 +204,12 @@ public: /// NextLabelID - Return the next unique label id. /// unsigned NextLabelID() { - unsigned ID = (unsigned)LabelIDList.size() + 1; - LabelIDList.push_back(ID); - return ID; + return NextLabelIDToReturn++; } /// getLabelSym - Turn a label ID into a symbol. MCSymbol *getLabelSym(unsigned ID); - /// InvalidateLabel - Inhibit use of the specified label # from - /// MachineModuleInfo, for example because the code was deleted. - void InvalidateLabel(unsigned LabelID) { - // Remap to zero to indicate deletion. - assert(0 < LabelID && LabelID <= LabelIDList.size() && - "Old label ID out of range."); - LabelIDList[LabelID - 1] = 0; - } - /// getFrameMoves - Returns a reference to a list of moves done in the current /// function's prologue. Used to construct frame maps for debug and exception /// handling comsumers. |