1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 20:43:44 +02:00
llvm-mirror/include/llvm
Lang Hames e6a310e01a 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.

llvm-svn: 202551
2014-02-28 22:25:24 +00:00
..
ADT fix crash in SmallDenseMap copy constructor 2014-02-25 23:35:13 +00:00
Analysis Constify the Optnone checks in IR passes. 2014-02-26 01:23:26 +00:00
AsmParser Move the LLVM IR asm writer header files into the IR directory, as they 2014-01-07 12:34:26 +00:00
Bitcode Make parseBitcodeFile return an ErrorOr<Module *>. 2014-01-15 01:08:23 +00:00
CodeGen New PBQP solver, and updates to the PBQP graph. 2014-02-28 22:25:24 +00:00
Config Drop libtool from llvm. 2014-02-28 18:17:54 +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 Rename some member variables from TD to DL. 2014-02-18 15:33:12 +00:00
IR Add 'remark' diagnostic type in LLVM 2014-02-28 09:08:45 +00:00
IRReader
LineEditor Introduce line editor library. 2014-01-31 23:46:14 +00:00
LTO LTO API: add lto_module_create_from_memory_with_path. 2014-02-10 23:26:14 +00:00
MC [mips] Implement NaCl sandboxing of indirect jumps: 2014-02-28 10:00:38 +00:00
Object Turn static inline functions to inline, following Rafael's suggestion 2014-02-28 08:23:09 +00:00
Option
Support Re-apply r200853, which should not crash after Clang plugins were converted to loadable modules in r201256. 2014-02-27 14:47:37 +00:00
TableGen Typo fix. 2014-01-24 23:40:08 +00:00
Target Add an OutPatFrag TableGen class 2014-02-28 00:26:56 +00:00
Transforms [CodeGenPrepare] Move CodeGenPrepare into lib/CodeGen. 2014-02-22 00:07:45 +00:00
AutoUpgrade.h Debug Info: drop debug info via upgrading path if version number does not match. 2013-12-02 21:29:56 +00:00
CMakeLists.txt The llvm_headers_do_not_build project needs to be excluded from the default build, otherwise it gets built (at least in Visual Studio 2013). 2014-01-28 16:07:10 +00:00
DebugInfo.h Add a debug info code generation level to the compile unit metadata 2014-02-27 01:24:56 +00:00
DIBuilder.h Fix a crasher where when we're attempting to replace a type 2014-02-28 21:27:57 +00:00
GVMaterializer.h Use error_code in GVMaterializer. 2013-11-05 19:36:34 +00:00
InitializePasses.h Make DataLayout a plain object, not a pass. 2014-02-25 17:30:31 +00:00
InstVisitor.h Add addrspacecast instruction. 2013-11-15 01:34:59 +00:00
LinkAllIR.h [cleanup] Move the Dominators.h and Verifier.h headers into the IR 2014-01-13 09:26:24 +00:00
LinkAllPasses.h Revert "Revert "Add Constant Hoisting Pass" (r200034)" 2014-01-25 02:02:55 +00:00
Linker.h Set the SuppressWarnings option on tool level and propagate to the library. 2014-02-20 22:19:24 +00:00
Pass.h Constify the Optnone checks in IR passes. 2014-02-26 01:23:26 +00:00
PassAnalysisSupport.h
PassManager.h Move the old pass manager infrastructure into a legacy namespace and 2013-11-09 12:26:54 +00:00
PassRegistry.h Re-sort all of the includes with ./utils/sort_includes.py so that 2014-01-07 11:48:04 +00:00
PassSupport.h [opt][PassInfo] Allow opt to run passes that need target machine. 2014-01-16 21:44:34 +00:00