llvm-project/llvm/lib/Transforms
Michael Zolotukhin ad371e0caa [SimplifyCFG] Avoid quadratic on a predecessors number behavior in instruction sinking.
If a block has N predecessors, then the current algorithm will try to
sink common code to this block N times (whenever we visit a
predecessor). Every attempt to sink the common code includes going
through all predecessors, so the complexity of the algorithm becomes
O(N^2).
With this patch we try to sink common code only when we visit the block
itself. With this, the complexity goes down to O(N).
As a side effect, the moment the code is sunk is slightly different than
before (the order of simplifications has been changed), that's why I had
to adjust two tests (note that neither of the tests is supposed to test
SimplifyCFG):
* test/CodeGen/AArch64/arm64-jumptable.ll - changes in this test mimic
the changes that previous implementation of SimplifyCFG would do.
* test/CodeGen/ARM/avoid-cpsr-rmw.ll - in this test I disabled common
code sinking by a command line flag.

llvm-svn: 321236
2017-12-21 01:22:13 +00:00
..
Coroutines [coro] Make Spill a proper struct instead of deriving from pair. 2017-10-31 19:22:55 +00:00
Hello
IPO Silence a bunch of implicit fallthrough warnings 2017-12-19 22:05:25 +00:00
InstCombine [InstCombine] Add debug location to new caller. 2017-12-20 17:16:59 +00:00
Instrumentation [hwasan] Implement -fsanitize-recover=hwaddress. 2017-12-20 19:05:44 +00:00
ObjCARC Remove redundant includes from lib/Transforms. 2017-12-13 21:31:01 +00:00
Scalar [memcpyopt] Teach memcpyopt to optimize across basic blocks 2017-12-20 01:36:25 +00:00
Utils [SimplifyCFG] Avoid quadratic on a predecessors number behavior in instruction sinking. 2017-12-21 01:22:13 +00:00
Vectorize Revert r320548:[SLP] Vectorize jumbled memory loads 2017-12-20 15:26:59 +00:00
CMakeLists.txt [coroutines] Part 3 of N: Adding Boilerplate for Coroutine Passes 2016-07-28 21:04:31 +00:00
LLVMBuild.txt [coroutines] Part 3 of N: Adding Boilerplate for Coroutine Passes 2016-07-28 21:04:31 +00:00