llvm-6502/lib/Transforms
Chen Li 7b0238cdc1 [LoopUnswitch] Improve loop unswitch pass to find trivial unswitch conditions more effectively
Summary:
This patch improves trivial loop unswitch. 

The current trivial loop unswitch only checks if loop header's terminator contains a trivial unswitch condition. But if the loop header only has one reachable successor (due to intentionally or unintentionally missed code simplification), we should consider the successor as part of the loop header. Therefore, instead of stopping at loop header's terminator, we should keep traversing its successors within loop until reach a *real* conditional branch or switch (whose condition can not be constant folded). This change will enable a single -loop-unswitch pass to unswitch multiple trivial conditions (unswitch one trivial condition could open opportunity to unswitch another one in the same loop), while the old implementation can unswitch only one per pass. 

Reviewers: reames, broune

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D11481

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243203 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-25 03:21:06 +00:00
..
Hello Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
InstCombine [InstCombine] Generalize sub of selects optimization to all BinaryOperators 2015-07-14 22:39:23 +00:00
Instrumentation [asan] Rename the ABI versioning symbol to '__asan_version_mismatch_check' instead of abusing '__asan_init' 2015-07-23 10:54:06 +00:00
IPO Remove unused variable. NFC. 2015-07-24 19:18:32 +00:00
ObjCARC [PM/AA] Extract the ModRef enums from the AliasAnalysis class in 2015-07-22 23:15:57 +00:00
Scalar [LoopUnswitch] Improve loop unswitch pass to find trivial unswitch conditions more effectively 2015-07-25 03:21:06 +00:00
Utils Use make_range(rbegin(), rend()) to allow foreach loops. NFC. 2015-07-24 21:13:43 +00:00
Vectorize Fix -Wextra-semi warnings. 2015-07-22 20:46:11 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile