diff options
author | Bill Wendling <isanbard@gmail.com> | 2008-07-03 22:53:42 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2008-07-03 22:53:42 +0000 |
commit | 10fff6078a7bc42f142c536bd55e9569253b280b (patch) | |
tree | 1cf10238cd302e50bfd8f779f541aa73e41258c9 /lib/CodeGen/DwarfWriter.cpp | |
parent | a93ae711a91dd151ca4d28e4172e0de89d1594f3 (diff) |
Revert my previous check-in that split up MachineModuleInfo. It turns out to
slow the compiler down at -O0 some 30% or more. Ooops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53120 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/DwarfWriter.cpp')
-rw-r--r-- | lib/CodeGen/DwarfWriter.cpp | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/lib/CodeGen/DwarfWriter.cpp b/lib/CodeGen/DwarfWriter.cpp index 569702c59d..a284ba19eb 100644 --- a/lib/CodeGen/DwarfWriter.cpp +++ b/lib/CodeGen/DwarfWriter.cpp @@ -20,7 +20,6 @@ #include "llvm/Module.h" #include "llvm/Type.h" #include "llvm/CodeGen/AsmPrinter.h" -#include "llvm/CodeGen/MachineDebugInfoDesc.h" #include "llvm/CodeGen/MachineModuleInfo.h" #include "llvm/CodeGen/MachineFrameInfo.h" #include "llvm/CodeGen/MachineLocation.h" @@ -2631,23 +2630,25 @@ private: /// ConstructGlobalDIEs - Create DIEs for each of the externally visible /// global variables. void ConstructGlobalDIEs() { - std::vector<void*> GlobalVariables; - GlobalVariableDesc GVD; - MMI->getAnchoredDescriptors(*M, &GVD, GlobalVariables); + std::vector<GlobalVariableDesc *> GlobalVariables = + MMI->getAnchoredDescriptors<GlobalVariableDesc>(*M); - for (unsigned i = 0, N = GlobalVariables.size(); i < N; ++i) - NewGlobalVariable((GlobalVariableDesc *)GlobalVariables[i]); + for (unsigned i = 0, N = GlobalVariables.size(); i < N; ++i) { + GlobalVariableDesc *GVD = GlobalVariables[i]; + NewGlobalVariable(GVD); + } } /// ConstructSubprogramDIEs - Create DIEs for each of the externally visible /// subprograms. void ConstructSubprogramDIEs() { - std::vector<void*> Subprograms; - SubprogramDesc SPD; - MMI->getAnchoredDescriptors(*M, &SPD, Subprograms); + std::vector<SubprogramDesc *> Subprograms = + MMI->getAnchoredDescriptors<SubprogramDesc>(*M); - for (unsigned i = 0, N = Subprograms.size(); i < N; ++i) - NewSubprogram((SubprogramDesc*)Subprograms[i]); + for (unsigned i = 0, N = Subprograms.size(); i < N; ++i) { + SubprogramDesc *SPD = Subprograms[i]; + NewSubprogram(SPD); + } } public: |