llvm-project/llvm/test/CodeGen/WebAssembly
Kyle Butt adabac2d57 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.

Issue from previous rollback fixed, and a new test was added for that
case as well.

Differential revision: https://reviews.llvm.org/D18226

llvm-svn: 283274
2016-10-04 23:54:18 +00:00
..
address-offsets.ll [WebAssembly] Disable folding of GA+reg into load/store constant offsets 2016-08-31 20:27:20 +00:00
byval.ll [WebAssembly] Disable the store-results optimization. 2016-08-18 17:51:27 +00:00
call.ll [WebAssembly] Optimize away return instructions using fallthroughs. 2016-05-21 00:21:56 +00:00
cfg-stackify.ll Codegen: Tail-duplicate during placement. 2016-10-04 23:54:18 +00:00
cfi.ll [WebAssembly] Fix CFI index to account for padding nullptr function 2016-08-08 23:56:01 +00:00
comparisons_f32.ll [WebAssembly] Optimize away return instructions using fallthroughs. 2016-05-21 00:21:56 +00:00
comparisons_f64.ll [WebAssembly] Optimize away return instructions using fallthroughs. 2016-05-21 00:21:56 +00:00
comparisons_i32.ll [WebAssembly] Optimize away return instructions using fallthroughs. 2016-05-21 00:21:56 +00:00
comparisons_i64.ll [WebAssembly] Optimize away return instructions using fallthroughs. 2016-05-21 00:21:56 +00:00
conv.ll [WebAssembly] Optimize away return instructions using fallthroughs. 2016-05-21 00:21:56 +00:00
copysign-casts.ll [WebAssembly] Add -m:e to the target triple. 2016-01-07 03:19:23 +00:00
cpus.ll [WebAssembly] Tighten up some regexes in some tests. 2016-01-20 05:55:09 +00:00
dbgvalue.ll [WebAssembly] Trying to fix broken tests in CodeGen/WebAssembly caused by r281285. 2016-09-13 10:05:44 +00:00
dead-vreg.ll [WebAssembly] Rematerialize constants rather than hold them live in registers. 2016-01-19 16:59:23 +00:00
divrem-constant.ll [WebAssembly] Don't expand divisions by constants. 2016-05-18 14:29:42 +00:00
f32.ll [WebAssembly] Optimize away return instructions using fallthroughs. 2016-05-21 00:21:56 +00:00
f64.ll [WebAssembly] Optimize away return instructions using fallthroughs. 2016-05-21 00:21:56 +00:00
fast-isel-noreg.ll [WebAssembly] Check return value of getRegForValue in FastISel 2016-08-04 18:01:52 +00:00
fast-isel.ll [WebAssembly] Preliminary fast-isel support. 2016-05-10 17:39:48 +00:00
frem.ll [WebAssembly] Optimize away return instructions using fallthroughs. 2016-05-21 00:21:56 +00:00
func.ll [WebAssembly] Optimize away return instructions using fallthroughs. 2016-05-21 00:21:56 +00:00
global.ll [WebAssembly] Optimize away return instructions using fallthroughs. 2016-05-21 00:21:56 +00:00
globl.ll [WebAssembly] Add -m:e to the target triple. 2016-01-07 03:19:23 +00:00
i32-load-store-alignment.ll [WebAssembly] Optimize away return instructions using fallthroughs. 2016-05-21 00:21:56 +00:00
i32.ll [WebAssembly] Optimize away return instructions using fallthroughs. 2016-05-21 00:21:56 +00:00
i64-load-store-alignment.ll [WebAssembly] Optimize away return instructions using fallthroughs. 2016-05-21 00:21:56 +00:00
i64.ll [WebAssembly] Optimize away return instructions using fallthroughs. 2016-05-21 00:21:56 +00:00
i128.ll [WebAssembly] Optimize away return instructions using fallthroughs. 2016-05-21 00:21:56 +00:00
ident.ll [WebAssembly] Add -m:e to the target triple. 2016-01-07 03:19:23 +00:00
immediates.ll [WebAssembly] Optimize away return instructions using fallthroughs. 2016-05-21 00:21:56 +00:00
indirect-import.ll [WebAssembly] Emit type signatures for declared functions 2016-06-03 18:34:36 +00:00
inline-asm.ll [WebAssembly] Optimize away return instructions using fallthroughs. 2016-05-21 00:21:56 +00:00
irreducible-cfg.ll [WebAssembly] Account for implicit operands when computing operand indices. 2016-04-26 01:40:56 +00:00
legalize.ll [WebAssembly] Optimize away return instructions using fallthroughs. 2016-05-21 00:21:56 +00:00
lit.local.cfg
load-ext.ll [WebAssembly] Optimize away return instructions using fallthroughs. 2016-05-21 00:21:56 +00:00
load-store-i1.ll [WebAssembly] Optimize away return instructions using fallthroughs. 2016-05-21 00:21:56 +00:00
load.ll [WebAssembly] Optimize away return instructions using fallthroughs. 2016-05-21 00:21:56 +00:00
lower-em-ehsjlj-options.ll [WebAssembly] Add asm.js-style setjmp/longjmp handling for wasm (reland r280302) 2016-09-01 21:05:15 +00:00
lower-em-exceptions-whitelist.ll [WebAssembly] Add asm.js-style setjmp/longjmp handling for wasm (reland r280302) 2016-09-01 21:05:15 +00:00
lower-em-exceptions.ll [WebAssembly] Add asm.js-style setjmp/longjmp handling for wasm (reland r280302) 2016-09-01 21:05:15 +00:00
lower-em-sjlj.ll [WebAssembly] Add asm.js-style setjmp/longjmp handling for wasm (reland r280302) 2016-09-01 21:05:15 +00:00
mem-intrinsics.ll Codegen: Tail-duplicate during placement. 2016-10-04 23:54:18 +00:00
memory-addr32.ll [WebAssembly] Optimize away return instructions using fallthroughs. 2016-05-21 00:21:56 +00:00
memory-addr64.ll [WebAssembly] Optimize away return instructions using fallthroughs. 2016-05-21 00:21:56 +00:00
negative-base-reg.ll [WebAssembly] Disable folding of GA+reg into load/store constant offsets 2016-08-31 20:27:20 +00:00
non-executable-stack.ll [WebAssembly] Don't create a needless .note.GNU-stack section 2016-01-15 23:59:13 +00:00
offset-folding.ll [WebAssembly] Add tests for negative offsets with global variable addresses. 2016-01-25 15:19:39 +00:00
offset.ll [WebAssembly] Disable the store-results optimization. 2016-08-18 17:51:27 +00:00
phi.ll [WebAssembly] Optimize away return instructions using fallthroughs. 2016-05-21 00:21:56 +00:00
reg-stackify.ll [WebAssembly] Disable the store-results optimization. 2016-08-18 17:51:27 +00:00
return-int32.ll [WebAssembly] Optimize away return instructions using fallthroughs. 2016-05-21 00:21:56 +00:00
return-void.ll [WebAssembly] Optimize away return instructions using fallthroughs. 2016-05-21 00:21:56 +00:00
returned.ll [WebAssembly] Optimize away return instructions using fallthroughs. 2016-05-21 00:21:56 +00:00
select.ll [WebAssembly] Optimize away return instructions using fallthroughs. 2016-05-21 00:21:56 +00:00
signext-zeroext.ll [WebAssembly] Optimize away return instructions using fallthroughs. 2016-05-21 00:21:56 +00:00
simd-arith.ll [WebAssembly] Initial SIMD128 support. 2016-08-02 23:16:09 +00:00
store-trunc.ll [WebAssembly] Rename $discard to $drop in the assembly output. 2016-05-17 23:19:03 +00:00
store.ll [WebAssembly] Optimize away return instructions using fallthroughs. 2016-05-21 00:21:56 +00:00
switch.ll [WebAssembly] Optimize away return instructions using fallthroughs. 2016-05-21 00:21:56 +00:00
unreachable.ll [WebAssembly] Preliminary fast-isel support. 2016-05-10 17:39:48 +00:00
unused-argument.ll [WebAssembly] Optimize away return instructions using fallthroughs. 2016-05-21 00:21:56 +00:00
userstack.ll [WebAssembly] Make register stackification more conservative 2016-09-30 18:02:54 +00:00
varargs.ll [WebAssembly] Optimize away return instructions using fallthroughs. 2016-05-21 00:21:56 +00:00
vtable.ll [WebAssembly] Add -m:e to the target triple. 2016-01-07 03:19:23 +00:00