llvm-6502/lib
Kevin Enderby a89594947e Improve the time it takes to generating dwarf for assembly source files
that have been run through the 'C' pre-processor.

The implementation of SrcMgr.FindLineNumber() is slow but OK if
it uses its cache when called multiple times with an SMLoc that is
forward of the previous call.

In the case of generating dwarf for assembly source files that have
been run through the 'C' pre-processor we need to calculate the
logical line number based on the last parsed cpp hash file line
comment.  And the current code calls SrcMgr.FindLineNumber()
twice to do this causing its cache not to work and results in very
slow compile times:

% time /Volumes/SandBox/build-llvm/Debug+Asserts/bin/llvm-mc -triple thumbv7-apple-ios -filetype=obj -o /tmp/x.o mscorlib.dll.E -g
672.542u 0.299s 11:13.15 99.9%	0+0k 0+2io 2106pf+0w

So we save the info from the last parsed cpp hash file line comment
to avoid making the second call to SrcMgr.FindLineNumber() most times
and end up with compile times like:

% time /Volumes/SandBox/build-llvm/Debug+Asserts/bin/llvm-mc -triple thumbv7-apple-ios -filetype=obj -o /tmp/x.o mscorlib.dll.E -g
3.404u 0.104s 0:03.80 92.1%	0+0k 0+3io 2105pf+0w

rdar://14156934


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184592 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-21 20:51:39 +00:00
..
Analysis Fix xemacs mode line, don't put them in .cpp files (just header files). No 2013-06-10 23:10:59 +00:00
AsmParser
Bitcode
CodeGen Fix PR16360 2013-06-21 18:45:27 +00:00
DebugInfo Spell correct (s/begining/beginning/) 2013-06-19 21:42:05 +00:00
ExecutionEngine Basic support for parsing Mach-O universal binaries in LLVMObject library 2013-06-18 15:03:28 +00:00
IR DebugInfo: When asm printing include a '[def]' tag for tag decls that are definitions (& rename the 'fwd' tag to 'decl' for clarity) 2013-06-21 03:41:54 +00:00
IRReader
Linker
MC Improve the time it takes to generating dwarf for assembly source files 2013-06-21 20:51:39 +00:00
Object [yaml2obj][ELF] Don't explicitly set Binding with STB_* 2013-06-21 00:27:50 +00:00
Option Merge changes to clang's Driver code into LLVM's Option library 2013-06-13 18:12:12 +00:00
Support Revert "BlockFrequency: Saturate at 1 instead of 0 when multiplying a frequency with a branch probability." 2013-06-21 20:20:27 +00:00
TableGen
Target [NVPTX] Add support for selecting CUDA vs OCL mode based on triple 2013-06-21 18:51:49 +00:00
Transforms [objc-arc-opts] Now that PtrState.RRI is encapsulated in PtrState, make PtrState.RRI private and delete the TODO. 2013-06-21 19:44:30 +00:00
CMakeLists.txt Move lib/Archive to tools/llvm-ar. 2013-06-17 15:47:20 +00:00
LLVMBuild.txt Move lib/Archive to tools/llvm-ar. 2013-06-17 15:47:20 +00:00
Makefile Move lib/Archive to tools/llvm-ar. 2013-06-17 15:47:20 +00:00