1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 20:12:56 +02:00
Go to file
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
autoconf autoconf: Introduce --with-clang-srcdir, to build out-of-tree clang as tools/clang on tools/Makefile. 2011-10-16 02:54:26 +00:00
bindings OCaml bindings: add some missing functions and testcases. 2011-10-14 20:38:33 +00:00
cmake Add -D__STDC_FORMAT_MACROS to use PRIx64. 2011-10-11 12:51:44 +00:00
docs Revert r141657 for now. This has broken css and changed links on llvm.org. I'd like to understand exactly why the links have changed and if a newer doxygen is required. This may be reapplied once we upgrade on llvm.org and it is fully tested. 2011-10-21 20:51:54 +00:00
examples Changed comments on foreign C++ exceptions (generated with type info 7), 2011-09-28 10:53:56 +00:00
include Use LLVMBool for a function that logically returns a boolean value. 2011-10-21 20:35:58 +00:00
lib Completely re-write the algorithm behind MachineBlockPlacement based on 2011-10-23 09:18:45 +00:00
projects Regenerate projects/sample/configure. 2011-10-18 23:10:58 +00:00
runtime Include direct.h for _mkdir on mingw32 too. 2011-10-08 15:49:19 +00:00
test Completely re-write the algorithm behind MachineBlockPlacement based on 2011-10-23 09:18:45 +00:00
tools llvm-objdump: Add static symbol table dumping. 2011-10-18 19:32:17 +00:00
unittests Enhance llvm::SourceMgr to support diagnostic ranges, the same way clang does. Enhance 2011-10-16 04:47:35 +00:00
utils Add X86 RORX instruction 2011-10-23 07:34:00 +00:00
.gitignore Revert change made in .gitignore. 2011-09-24 01:37:58 +00:00
build-for-llvm-top.sh
CMakeLists.txt Build system infrastructure for multiple tblgens. 2011-10-06 01:51:51 +00:00
configure autoconf: Introduce --with-clang-srcdir, to build out-of-tree clang as tools/clang on tools/Makefile. 2011-10-16 02:54:26 +00:00
CREDITS.TXT Fix a typo.w 2011-10-22 18:44:51 +00:00
LICENSE.TXT Happy new year. 2011-06-12 15:26:54 +00:00
llvm.spec.in
Makefile Updating 'update' target to handle svn 1.7 'info' output. Patch by Jean-Danial Dupas! 2011-10-19 18:35:30 +00:00
Makefile.common
Makefile.config.in build: Remove some unused code. 2011-10-18 19:27:04 +00:00
Makefile.rules Makefile.rules: Let OPTIONAL_PARALLEL_DIRS accept out-of-tree absolute path. 2011-10-16 02:54:19 +00:00
ModuleInfo.txt Remove trailing space. This is just an excuse to poke the 2010-10-05 20:32:15 +00:00
README.txt Test commit 2011-09-21 03:34:31 +00:00

Low Level Virtual Machine (LLVM)
================================

This directory and its subdirectories contain source code for the Low Level
Virtual Machine, a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the HTML documentation provided in docs/index.html for further
assistance with LLVM.

If you're writing a package for LLVM, see docs/Packaging.html for our
suggestions.