llvm-project/llvm/lib
Balaram Makam b05a55787a [SimplifyCFG] Defer folding unconditional branches to LateSimplifyCFG if it can destroy canonical loop structure.
Summary:
When simplifying unconditional branches from empty blocks, we pre-test if the
BB belongs to a set of loop headers and keep the block to prevent passes from
destroying canonical loop structure. However, the current algorithm fails if
the destination of the branch is a loop header. Especially when such a loop's
latch block is folded into loop header it results in additional backedges and
LoopSimplify turns it into a nested loop which prevent later optimizations
from being applied (e.g., loop  unrolling and loop interleaving).

This patch augments the existing algorithm by further checking if the
destination of the branch belongs to a set of loop headers and defer
eliminating it if yes to LateSimplifyCFG.

Fixes PR33605: https://bugs.llvm.org/show_bug.cgi?id=33605

Reviewers: efriedma, mcrosier, pacxx, hsung, davidxl

Reviewed By: efriedma

Subscribers: ashutosh.nema, gberry, javed.absar, llvm-commits

Differential Revision: https://reviews.llvm.org/D35411

llvm-svn: 308422
2017-07-19 08:53:34 +00:00
..
Analysis [PM/LCG] Follow-up fix to r308088 to handle deletion of library 2017-07-19 04:12:25 +00:00
AsmParser Debug Info: Add a file: field to DIImportedEntity. 2017-07-19 00:09:54 +00:00
BinaryFormat Revert "Revert "Revert "Revert "Switch external cvtres.exe for llvm's own resource library."""" 2017-07-08 03:06:10 +00:00
Bitcode Debug Info: Add a file: field to DIImportedEntity. 2017-07-19 00:09:54 +00:00
CodeGen [CGP] Allow cycles during Phi traversal in OptimizaMemoryInst 2017-07-19 04:49:17 +00:00
DebugInfo [DWARF] Modification of code for the verification of .debug_info section. 2017-07-18 01:00:26 +00:00
Demangle [ItaniumDemangle] Fix a exponential string copying bug 2017-05-28 23:24:52 +00:00
ExecutionEngine [RuntimeDyld][MachO/ARM] Don't add a redundant relocation entry. 2017-07-18 21:12:03 +00:00
Fuzzer [libFuzzer] when adding a reduced input print REDUCED instead of NEW 2017-07-18 18:47:36 +00:00
IR Debug Info: Add a file: field to DIImportedEntity. 2017-07-19 00:09:54 +00:00
IRReader
LTO Use DenseMap instead std::map for GVSummaryMapTy. 2017-07-10 20:12:54 +00:00
LineEditor
Linker [Linker] Add directives to support mixing ARM/Thumb module-level inline asm. 2017-07-12 11:52:28 +00:00
MC Simplify interface now that we don't need to pass IsPCRel. NFC. 2017-07-11 23:56:10 +00:00
Object Object: preserve more information about DEF file 2017-07-19 02:01:22 +00:00
ObjectYAML [codeview] Fix YAML for LF_TYPESERVER2 by hoisting PDB_UniqueId 2017-07-17 23:59:44 +00:00
Option [libOption] - Replace std::pair with helper struct. NFC. 2017-07-18 10:59:30 +00:00
Passes [PM] Enable registration of out-of-tree passes with PassBuilder 2017-07-10 10:57:55 +00:00
ProfileData llvm-profdata: Reduce memory usage by using Error callback rather than member 2017-07-10 03:04:59 +00:00
Support [SystemZ] Add support for IBM z14 processor (1/3) 2017-07-17 17:41:11 +00:00
TableGen [BinaryFormat, Option, TableGen] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-06-16 00:43:26 +00:00
Target [SPARC] Add missing variable initialization after r308343. 2017-07-19 04:08:42 +00:00
Testing Mark LLVMTestingSupport as not installed in LLVMBuild. 2017-06-19 22:01:50 +00:00
ToolDrivers llvm: add llvm-dlltool support to the archiver 2017-07-18 21:26:38 +00:00
Transforms [SimplifyCFG] Defer folding unconditional branches to LateSimplifyCFG if it can destroy canonical loop structure. 2017-07-19 08:53:34 +00:00
XRay Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
CMakeLists.txt [gtest] Create a shared include directory for gtest utilities. 2017-06-14 16:41:50 +00:00
LLVMBuild.txt [gtest] Create a shared include directory for gtest utilities. 2017-06-14 16:41:50 +00:00