diff options
| author | Kyle Butt <kyle+llvm@iteratee.net> | 2016-10-04 00:00:09 +0000 |
|---|---|---|
| committer | Kyle Butt <kyle+llvm@iteratee.net> | 2016-10-04 00:00:09 +0000 |
| commit | 396bfdd7076325be148e1e95c433b78849c1083d (patch) | |
| tree | 0728afd074400877d223036b746cd4bc265ff8fd /llvm/test/CodeGen/AArch64/machine_cse.ll | |
| parent | da68203678e198ef806b40ac23e4375733097592 (diff) | |
| download | bcm5719-llvm-396bfdd7076325be148e1e95c433b78849c1083d.tar.gz bcm5719-llvm-396bfdd7076325be148e1e95c433b78849c1083d.zip | |
Codegen: Tail-duplicate during placement.
The tail duplication pass uses an assumed layout when making duplication
decisions. This is fine, but passes up duplication opportunities that
may arise when blocks are outlined. Because we want the updated CFG to
affect subsequent placement decisions, this change must occur during
placement.
In order to achieve this goal, TailDuplicationPass is split into a
utility class, TailDuplicator, and the pass itself. The pass delegates
nearly everything to the TailDuplicator object, except for looping over
the blocks in a function. This allows the same code to be used for tail
duplication in both places.
This change, in concert with outlining optional branches, allows
triangle shaped code to perform much better, esepecially when the
taken/untaken branches are correlated, as it creates a second spine when
the tests are small enough.
llvm-svn: 283164
Diffstat (limited to 'llvm/test/CodeGen/AArch64/machine_cse.ll')
| -rw-r--r-- | llvm/test/CodeGen/AArch64/machine_cse.ll | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/test/CodeGen/AArch64/machine_cse.ll b/llvm/test/CodeGen/AArch64/machine_cse.ll index 032199e6218..e9fa68041d9 100644 --- a/llvm/test/CodeGen/AArch64/machine_cse.ll +++ b/llvm/test/CodeGen/AArch64/machine_cse.ll @@ -1,4 +1,8 @@ -; RUN: llc < %s -mtriple=aarch64-linux-gnuabi -O2 | FileCheck %s +; RUN: llc < %s -mtriple=aarch64-linux-gnuabi -O2 -tail-dup-placement=0 | FileCheck %s +; -tail-dup-placement causes tail duplication during layout. This breaks the +; assumptions of the test case as written (specifically, it creates an +; additional cmp instruction, creating a false positive), so we pass +; -tail-dup-placement=0 to restore the original behavior ; marked as external to prevent possible optimizations @a = external global i32 |

