1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 12:43:36 +01:00
llvm-mirror/test/Transforms/SimplifyCFG/X86
Roman Lebedev 290802c77b [SimplifyCFG] Common code sinking: fix application of profitability check
The profitability check is: we don't want to create more than a single PHI
per instruction sunk. We need to create the PHI unless we'll sink
all of it's would-be incoming values.

But there is a caveat there.
This profitability check doesn't converge on the first iteration!
If we first decide that we want to sink 10 instructions,
but then determine that 5'th one is unprofitable to sink,
that may result in us not sinking some instructions that
resulted in determining that some other instruction
we've determined to be profitable to sink becoming unprofitable.

So we need to iterate until we converge, as in determine
that all leftover instructions are profitable to sink.

But, the direct approach of just re-iterating seems dumb,
because in the worst case we'd find that the last instruction
is unprofitable, which would result in revisiting instructions
many many times.

Instead, i think we can get away with just two passes - forward and backward.
However then it isn't obvious what is the most performant way to update
InstructionsToSink.
2021-04-29 21:11:40 +03:00
..
2010-03-30-InvokeCrash.ll
bug-25299.ll
combine-parallel-mem-md.ll
CoveredLookupTable.ll
critedge-assume.ll
disable-lookup-table.ll [NFC][SimplifyCFG] Autogenerate check lines in many test files 2021-04-27 22:05:42 +03:00
empty-cleanuppad.ll [NFC][SimplifyCFG] Autogenerate check lines in many test files 2021-04-27 22:05:42 +03:00
invalidate-dom.ll [NewPM][opt] Run the "default" AA pipeline by default 2021-01-21 21:08:54 -08:00
lit.local.cfg
MagicPointer.ll
merge-cleanuppads.ll
merge-cond-stores-cost.ll [NFC][SimplifyCFG] Autogenerate check lines in many test files 2021-04-27 22:05:42 +03:00
pr39187-g.ll
PR29163.ll
PR30210.ll
remove-debug-2.ll
remove-debug.ll
safe-low-bit-extract.ll
sink-common-code.ll [SimplifyCFG] Common code sinking: fix application of profitability check 2021-04-29 21:11:40 +03:00
speculate-cttz-ctlz.ll
SpeculativeExec.ll [tests] Refresh a bunch of autogen test to adjust for format changes 2021-03-22 10:41:39 -07:00
switch_to_lookup_table.ll
switch-covered-bug.ll
switch-table-bug.ll
unreachable-blocks.ll