llvm-6502/lib
Chandler Carruth db35087d21 Implement a block placement pass based on the branch probability and
block frequency analyses. This differs substantially from the existing
block-placement pass in LLVM:

1) It operates on the Machine-IR in the CodeGen layer. This exposes much
   more (and more precise) information and opportunities. Also, the
   results are more stable due to fewer transforms ocurring after the
   pass runs.
2) It uses the generalized probability and frequency analyses. These can
   model static heuristics, code annotation derived heuristics as well
   as eventual profile loading. By basing the optimization on the
   analysis interface it can work from any (or a combination) of these
   inputs.
3) It uses a more aggressive algorithm, both building chains from tho
   bottom up to maximize benefit, and using an SCC-based walk to layout
   chains of blocks in a profitable ordering without O(N^2) iterations
   which the old pass involves.

The pass is currently gated behind a flag, and not enabled by default
because it still needs to grow some important features. Most notably, it
needs to support loop aligning and careful layout of loop structures
much as done by hand currently in CodePlacementOpt. Once it supports
these, and has sufficient testing and quality tuning, it should replace
both of these passes.

Thanks to Nick Lewycky and Richard Smith for help authoring & debugging
this, and to Jakob, Andy, Eric, Jim, and probably a few others I'm
forgetting for reviewing and answering all my questions. Writing
a backend pass is *sooo* much better now than it used to be. =D

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142641 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-21 06:46:38 +00:00
..
Analysis A FIXME about block addresses and indirectbr. 2011-10-20 04:05:33 +00:00
Archive Rewrite the CMake build to use explicit dependencies between libraries, 2011-07-29 00:14:25 +00:00
AsmParser Backing out patch. Will refactor to remove the AsmParser dependency on Target. 2011-10-18 00:23:49 +00:00
Bitcode Also update the EH with bitcode. I missed this earlier. Thanks to Duncan for pointing it out. 2011-10-05 07:04:14 +00:00
CodeGen Implement a block placement pass based on the branch probability and 2011-10-21 06:46:38 +00:00
DebugInfo lib/DebugInfo/DWARFDebugLine.cpp: De-Unicode-ify. 2011-10-08 11:22:47 +00:00
ExecutionEngine Adding dependencies to allow -DBUILD_SHARED_LIBS=true to complete. 2011-10-19 00:13:13 +00:00
Linker Allow the source module to be materialized during the linking process. 2011-10-14 22:17:46 +00:00
MC Fix parsing of a line with only a # in it. 2011-10-19 18:48:52 +00:00
Object Object/COFF: Remove useless test. 2011-10-18 19:51:36 +00:00
Support Remove unused include of sys/uio.h in MemoryBuffer.cpp. It was not correctly protected by ifdef either. 2011-10-20 21:57:46 +00:00
TableGen Implement Paste 2011-10-19 13:04:43 +00:00
Target Fix unused variable warning. 2011-10-21 01:22:04 +00:00
Transforms Refactor code from inlining and globalopt that checks whether a function definition is unused, and enhance it so it can tell that functions which are only used by a blockaddress are in fact dead. This probably doesn't happen much on most code, but the Linux kernel's _THIS_IP_ can trigger this issue with blockaddress. (GlobalDCE can also handle the given tescase, but we only run that at -O3.) Found while looking at PR11180. 2011-10-20 05:23:42 +00:00
VMCore Refactor code from inlining and globalopt that checks whether a function definition is unused, and enhance it so it can tell that functions which are only used by a blockaddress are in fact dead. This probably doesn't happen much on most code, but the Linux kernel's _THIS_IP_ can trigger this issue with blockaddress. (GlobalDCE can also handle the given tescase, but we only run that at -O3.) Found while looking at PR11180. 2011-10-20 05:23:42 +00:00
CMakeLists.txt Move TableGen's parser and entry point into a library 2011-10-01 16:41:13 +00:00
Makefile Remove more of llvmc and dependencies. 2011-09-20 00:34:27 +00:00