llvm/test/CodeGen/WebAssembly
Kyle Butt 062ace9764 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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283274 91177308-0d34-0410-b5e6-96231b3b80d8
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
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
comparisons_f64.ll
comparisons_i32.ll
comparisons_i64.ll
conv.ll
copysign-casts.ll
cpus.ll
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
divrem-constant.ll
f32.ll
f64.ll
fast-isel-noreg.ll [WebAssembly] Check return value of getRegForValue in FastISel 2016-08-04 18:01:52 +00:00
fast-isel.ll
frem.ll
func.ll
global.ll
globl.ll
i32-load-store-alignment.ll
i32.ll
i64-load-store-alignment.ll
i64.ll
i128.ll
ident.ll
immediates.ll
indirect-import.ll
inline-asm.ll
irreducible-cfg.ll
legalize.ll
lit.local.cfg
load-ext.ll
load-store-i1.ll
load.ll
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
memory-addr64.ll
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
offset-folding.ll
offset.ll [WebAssembly] Disable the store-results optimization. 2016-08-18 17:51:27 +00:00
phi.ll
reg-stackify.ll [WebAssembly] Disable the store-results optimization. 2016-08-18 17:51:27 +00:00
return-int32.ll
return-void.ll
returned.ll
select.ll
signext-zeroext.ll
simd-arith.ll [WebAssembly] Initial SIMD128 support. 2016-08-02 23:16:09 +00:00
store-trunc.ll
store.ll
switch.ll
unreachable.ll
unused-argument.ll
userstack.ll [WebAssembly] Make register stackification more conservative 2016-09-30 18:02:54 +00:00
varargs.ll
vtable.ll