llvm-6502/lib
Lang Hames d54d4f6b2e New PBQP solver, and updates to the PBQP graph.
The previous PBQP solver was very robust but consumed a lot of memory,
performed a lot of redundant computation, and contained some unnecessarily tight
coupling that prevented experimentation with novel solution techniques. This new
solver is an attempt to address these shortcomings.

Important/interesting changes:

1) The domain-independent PBQP solver class, HeuristicSolverImpl, is gone.
It is replaced by a register allocation specific solver, PBQP::RegAlloc::Solver
(see RegAllocSolver.h).

The optimal reduction rules and the backpropagation algorithm have been extracted
into stand-alone functions (see ReductionRules.h), which can be used to build
domain specific PBQP solvers. This provides many more opportunities for
domain-specific knowledge to inform the PBQP solvers' decisions. In theory this
should allow us to generate better solutions. In practice, we can at least test
out ideas now.

As a side benefit, I believe the new solver is more readable than the old one.

2) The solver type is now a template parameter of the PBQP graph.

This allows the graph to notify the solver of any modifications made (e.g. by
domain independent rules) without the overhead of a virtual call. It also allows
the solver to supply policy information to the graph (see below).

3) Significantly reduced memory overhead.

Memory management policy is now an explicit property of the PBQP graph (via
the CostAllocator typedef on the graph's solver template argument). Because PBQP
graphs for register allocation tend to contain many redundant instances of
single values (E.g. the value representing an interference constraint between
GPRs), the new RASolver class uses a uniquing scheme. This massively reduces
memory consumption for large register allocation problems. For example, looking
at the largest interference graph in each of the SPEC2006 benchmarks (the
largest graph will always set the memory consumption high-water mark for PBQP),
the average memory reduction for the PBQP costs was 400x. That's times, not
percent. The highest was 1400x. Yikes. So - this is fixed.

"PBQP: No longer feasting upon every last byte of your RAM".

Minor details:

- Fully C++11'd. Never copy-construct another vector/matrix!

- Cute tricks with cost metadata: Metadata that is derived solely from cost
matrices/vectors is attached directly to the cost instances themselves. That way
if you unique the costs you never have to recompute the metadata. 400x less
memory means 400x less cost metadata (re)computation.

Special thanks to Arnaud de Grandmaison, who has been the source of much
encouragement, and of many very useful test cases.

This new solver forms the basis for future work, of which there's plenty to do.
I will be adding TODO notes shortly.

- Lang.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202551 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-28 22:25:24 +00:00
..
Analysis Remove unnecessary llvm:: qualification. 2014-02-26 23:27:16 +00:00
AsmParser
Bitcode Store a DataLayout in Module. 2014-02-25 20:01:08 +00:00
CodeGen New PBQP solver, and updates to the PBQP graph. 2014-02-28 22:25:24 +00:00
DebugInfo llvm-dwarfdump: Support for debug_line.dwo section for file names for type units under fission. 2014-02-24 23:58:54 +00:00
ExecutionEngine Use DataLayout from the module when easily available. 2014-02-25 23:25:17 +00:00
IR Fix >> to be > > for non-c++11. 2014-02-28 21:37:28 +00:00
IRReader
LineEditor [CMake] Use LINK_LIBS instead of target_link_libraries(). 2014-02-26 06:41:29 +00:00
Linker Compare DataLayout by Value, not by pointer. 2014-02-26 17:02:08 +00:00
LTO Add 'remark' diagnostic type in LLVM 2014-02-28 09:08:45 +00:00
MC Remove MCPureStreamer. 2014-02-27 16:17:34 +00:00
Object Now that it is possible, use the mangler in IRObjectFile. 2014-02-28 02:17:23 +00:00
Option
Support CommandLine: Exit successfully for -version and -help 2014-02-28 19:08:01 +00:00
TableGen Fix odd indentation. 2014-02-27 03:11:13 +00:00
Target R600: Verify all instructions in the AsmPrinter on debug builds 2014-02-28 21:36:41 +00:00
Transforms [asan] fix a pair of silly typos 2014-02-27 13:13:59 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile