llvm/lib/Transforms
Hyojin Sung f81b3074f7 [SimlifyCFG] Prevent passes from destroying canonical loop structure, especially for nested loops
When eliminating or merging almost empty basic blocks, the existence of non-trivial PHI nodes
is currently used to recognize potential loops of which the block is the header and keep the block.
However, the current algorithm fails if the loops' exit condition is evaluated only with volatile
values hence no PHI nodes in the header. Especially when such a loop is an outer loop of a nested
loop, the loop is collapsed into a single loop which prevent later optimizations from being
applied (e.g., transforming nested loops into simplified forms and loop vectorization).
    
The patch augments the existing PHI node-based check by adding a pre-test if the BB actually
belongs to a set of loop headers and not eliminating it if yes.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@264697 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-29 04:08:57 +00:00
..
Hello Remove autoconf support 2016-01-26 21:29:08 +00:00
InstCombine Minor code cleanup. NFC. 2016-03-23 01:38:35 +00:00
Instrumentation [asan] Support dead code stripping on Mach-O platforms 2016-03-28 20:28:57 +00:00
IPO [ThinLTO] Add optional import message and statistics 2016-03-27 15:27:30 +00:00
ObjCARC ADT: Remove == and != comparisons between ilist iterators and pointers 2016-02-21 20:39:50 +00:00
Scalar [SimlifyCFG] Prevent passes from destroying canonical loop structure, especially for nested loops 2016-03-29 04:08:57 +00:00
Utils [SimlifyCFG] Prevent passes from destroying canonical loop structure, especially for nested loops 2016-03-29 04:08:57 +00:00
Vectorize [SLP] Remove unnecessary member variables by using container APIs. 2016-03-21 19:47:44 +00:00
CMakeLists.txt
LLVMBuild.txt