diff options
author | Evan Cheng <evan.cheng@apple.com> | 2009-02-25 07:04:34 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2009-02-25 07:04:34 +0000 |
commit | e3d423244ae288b2c9021dbb3cd7fb973d1cfc31 (patch) | |
tree | cf717e0368c572a77ad775c521cef9be83a8a7b4 /lib/CodeGen/SelectionDAG/FastISel.cpp | |
parent | 20babb112c8d8aab89a5e86347e2bfdb90603ce8 (diff) |
Clean up dwarf writer, part 1. This eliminated the horrible recursive getGlobalVariablesUsing and replaced it something readable. It eliminated use of slow UniqueVector and replaced it with StringMap, SmallVector, and DenseMap, etc. It also fixed some non-deterministic behavior.
This is a very minor compile time win.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65438 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/FastISel.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/FastISel.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/CodeGen/SelectionDAG/FastISel.cpp b/lib/CodeGen/SelectionDAG/FastISel.cpp index fb3d101f12..a0ed4755f9 100644 --- a/lib/CodeGen/SelectionDAG/FastISel.cpp +++ b/lib/CodeGen/SelectionDAG/FastISel.cpp @@ -319,8 +319,8 @@ bool FastISel::SelectCall(User *I) { DbgStopPointInst *SPI = cast<DbgStopPointInst>(I); if (DW && DW->ValidDebugInfo(SPI->getContext())) { DICompileUnit CU(cast<GlobalVariable>(SPI->getContext())); - unsigned SrcFile = DW->RecordSource(CU.getDirectory(), - CU.getFilename()); + unsigned SrcFile = DW->getOrCreateSourceID(CU.getDirectory(), + CU.getFilename()); unsigned Line = SPI->getLine(); unsigned Col = SPI->getColumn(); unsigned ID = DW->RecordSourceLine(Line, Col, SrcFile); @@ -361,8 +361,8 @@ bool FastISel::SelectCall(User *I) { // (most?) gdb expects. DISubprogram Subprogram(cast<GlobalVariable>(SP)); DICompileUnit CompileUnit = Subprogram.getCompileUnit(); - unsigned SrcFile = DW->RecordSource(CompileUnit.getDirectory(), - CompileUnit.getFilename()); + unsigned SrcFile = DW->getOrCreateSourceID(CompileUnit.getDirectory(), + CompileUnit.getFilename()); // Record the source line but does not create a label for the normal // function start. It will be emitted at asm emission time. However, |