llvm-6502/lib
Puyan Lotfi 9f2252fe47 The following patch' purpose is to reduce compile time for compilation of small
programs on targets with large register files. The root of the compile time
overhead was in the use of llvm::SmallVector to hold PhysRegEntries, which
resulted in slow-down from calling llvm::SmallVector::assign(N, 0). In contrast
std::vector uses the faster __platform_bzero to zero out primitive buffers when
assign is called, while SmallVector uses an iterator.

The fix for this was simply to replace the SmallVector with a dynamically
allocated buffer and to initialize or reinitialize the buffer based on the
total registers that the target architecture requires. The changes support
cases where a pass manager may be reused for different targets, and note that
the PhysRegEntries is allocated using calloc mainly for good for, and also to
quite tools like Valgrind (see comments for more info on this).

There is an rdar to track the fact that SmallVector doesn't have platform
specific speedup optimizations inside of it for things like this, and I'll
create a bugzilla entry at some point soon as well.

TL;DR: This fix replaces the expensive llvm::SmallVector<unsigned
char>::assign(N, 0) with a call to calloc for N bytes which is much faster
because SmallVector's assign uses iterators.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200917 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-06 09:23:24 +00:00
..
Analysis [PM] Fix horrible typos that somehow didn't cause a failure in a C++11 2014-02-06 05:17:02 +00:00
AsmParser
Bitcode
CodeGen The following patch' purpose is to reduce compile time for compilation of small 2014-02-06 09:23:24 +00:00
DebugInfo
ExecutionEngine
IR Disable most IR-level transform passes on functions marked 'optnone'. 2014-02-06 00:07:05 +00:00
IRReader
LineEditor Avoid using EL_GETFP. 2014-02-04 20:04:46 +00:00
Linker
LTO
MC doesSectionRequireSymbols is meaningless on ELF, remove. 2014-02-06 00:54:53 +00:00
Object Use the information provided by getFlags to unify some code in llvm-nm. 2014-02-05 05:19:19 +00:00
Option
Support Revert "Fix an invalid check for duplicate option categories." 2014-02-05 17:49:31 +00:00
TableGen
Target Update the X86 assembler for .intel_syntax to accept 2014-02-06 01:21:15 +00:00
Transforms A memcpy out of an fresh alloca is a no-op, delete it. Patch by Patrick Walton! 2014-02-06 06:29:19 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile