1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 20:12:56 +02:00
llvm-mirror/test
Chandler Carruth 68ba25c47d Completely re-write the algorithm behind MachineBlockPlacement based on
discussions with Andy. Fundamentally, the previous algorithm is both
counter productive on several fronts and prioritizing things which
aren't necessarily the most important: static branch prediction.

The new algorithm uses the existing loop CFG structure information to
walk through the CFG itself to layout blocks. It coalesces adjacent
blocks within the loop where the CFG allows based on the most likely
path taken. Finally, it topologically orders the block chains that have
been formed. This allows it to choose a (mostly) topologically valid
ordering which still priorizes fallthrough within the structural
constraints.

As a final twist in the algorithm, it does violate the CFG when it
discovers a "hot" edge, that is an edge that is more than 4x hotter than
the competing edges in the CFG. These are forcibly merged into
a fallthrough chain.

Future transformations that need te be added are rotation of loop exit
conditions to be fallthrough, and better isolation of cold block chains.
I'm also planning on adding statistics to model how well the algorithm
does at laying out blocks based on the probabilities it receives.

The old tests mostly still pass, and I have some new tests to add, but
the nested loops are still behaving very strangely. This almost seems
like working-as-intended as it rotated the exit branch to be
fallthrough, but I'm not convinced this is actually the best layout. It
is well supported by the probabilities for loops we currently get, but
those are pretty broken for nested loops, so this may change later.

llvm-svn: 142743
2011-10-23 09:18:45 +00:00
..
Analysis Make SCEV's brute force analysis stronger in two ways. Firstly, we should be 2011-10-22 19:58:20 +00:00
Archive
Assembler Fix a typo in the bitcode reader in the handling of atomic stores. Reported by David Meyer on llvmdev. 2011-09-19 19:41:28 +00:00
Bindings/Ocaml OCaml bindings: add some missing functions and testcases. 2011-10-14 20:38:33 +00:00
Bitcode
BugPoint
CodeGen Completely re-write the algorithm behind MachineBlockPlacement based on 2011-10-23 09:18:45 +00:00
DebugInfo Add a new wrapper node for a DILexicalBlock that encapsulates it and a 2011-10-11 22:59:11 +00:00
ExecutionEngine Excluding ARM JIT tests until someone can fix this compilation path. 2011-08-26 23:39:30 +00:00
Feature Update tests to the newest EH syntax. 2011-08-25 01:30:18 +00:00
Integer
lib s/tblgen/llvm-tblgen/g in a few missed places, including the tests 2011-10-06 13:39:59 +00:00
Linker Let this test pass even if 'int' is somewhere in its directory path. 2011-10-15 18:07:16 +00:00
MC Add X86 RORX instruction 2011-10-23 07:34:00 +00:00
Object llvm-objdump: Add static symbol table dumping. 2011-10-18 19:32:17 +00:00
Other Update to new EH scheme. 2011-08-31 21:44:24 +00:00
Scripts Fix the bitwidth of the remaining fields. 2011-08-04 17:00:11 +00:00
TableGen Add Paste Test 2011-10-19 13:04:50 +00:00
Transforms The element insertion code in scalar replacement doesn't handle incorrect 2011-10-23 07:02:10 +00:00
Unit
Verifier
CMakeLists.txt test/CMakeLists.txt: Depend on llvm-objdump. "make check" is expected to resolve test-dependent targets on CMake build. 2011-09-27 21:54:50 +00:00
lit.cfg s/tblgen/llvm-tblgen/g in a few missed places, including the tests 2011-10-06 13:39:59 +00:00
lit.site.cfg.in
Makefile test/Makefile: Inspect $(PROJ_OBJ_ROOT)/tools/clang/Makefile instead of $(PROJ_SRC_ROOT)/tools/clang for "check-all". 2011-10-16 02:54:14 +00:00
Makefile.tests
site.exp.in
TestRunner.sh