llvm-project/llvm/lib
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
..
Analysis [PGO] Function section hotness prefix should look at all blocks 2017-12-20 17:53:10 +00:00
AsmParser Hardware-assisted AddressSanitizer (llvm part). 2017-12-09 00:21:41 +00:00
BinaryFormat Simplify. 2017-10-19 01:32:18 +00:00
Bitcode [ThinLTO] Enable importing of aliases as copy of aliasee 2017-12-16 00:18:12 +00:00
CodeGen Expose a TargetMachine::getTargetTransformInfo function 2017-12-21 01:06:58 +00:00
DebugInfo Silence a bunch of implicit fallthrough warnings 2017-12-19 22:05:25 +00:00
Demangle Silence a bunch of implicit fallthrough warnings 2017-12-19 22:05:25 +00:00
ExecutionEngine Remove redundant includes from lib/ExecutionEngine. 2017-12-13 21:30:50 +00:00
FuzzMutate [FuzzMutate] Don't crash when mutator is unable to find operation 2017-12-19 08:52:51 +00:00
Fuzzer [libFuzzer] Delete llvm/lib/Fuzzer 2017-10-16 20:48:19 +00:00
IR Give up on array allocas in getPointerDereferenceableBytes 2017-12-20 10:01:30 +00:00
IRReader Remove redundant includes from various places. 2017-12-13 21:31:03 +00:00
LTO Fix more inconsistent line endings. NFC. 2017-12-18 19:46:56 +00:00
LineEditor
Linker Linker: Create a function declaration when moving a non-prevailing alias of function type. 2017-08-10 01:07:44 +00:00
MC [NVPTX] Initial adaptation of MCAsmStreamer/MCTargetStreamer for debug info in Cuda. 2017-12-20 14:55:10 +00:00
Object Silence a bunch of implicit fallthrough warnings 2017-12-19 22:05:25 +00:00
ObjectYAML [YAML] Add support for non-printable characters 2017-12-18 17:38:03 +00:00
Option Reverting r315590; it did not include changes for llvm-tblgen, which is causing link errors for several people. 2017-10-15 14:32:27 +00:00
Passes [PM] port Rewrite Statepoints For GC to the new pass manager. 2017-12-15 09:32:11 +00:00
ProfileData Fix many -Wsign-compare and -Wtautological-constant-compare warnings. 2017-12-14 22:07:03 +00:00
Support [TargetParser] Check size before accessing architecture version. 2017-12-20 11:32:43 +00:00
TableGen [TableGen] Give the option of tolerating duplicate register names 2017-12-07 09:51:55 +00:00
Target Expose a TargetMachine::getTargetTransformInfo function 2017-12-21 01:06:58 +00:00
Testing Force #define GTEST_LANG_CXX11. 2017-10-27 21:12:28 +00:00
ToolDrivers Remove redundant includes from various places. 2017-12-13 21:31:03 +00:00
Transforms [SimplifyCFG] Avoid quadratic on a predecessors number behavior in instruction sinking. 2017-12-21 01:22:13 +00:00
WindowsManifest Fix bug 34608 by moving private header out of public header. 2017-09-14 23:01:13 +00:00
XRay [XRay] Use optimistic logging model for FDR mode 2017-11-21 07:16:57 +00:00
CMakeLists.txt Moving libFuzzer from LLVM to compiler-rt. 2017-08-21 23:25:12 +00:00
LLVMBuild.txt Re-apply "Introduce FuzzMutate library" 2017-08-21 22:57:06 +00:00