summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/LoopSimplifyCFG/constant-fold-branch.ll
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Temporarily Revert "Add basic loop fusion pass.""Eric Christopher2019-04-171-0/+2774
| | | | | | | | The reversion apparently deleted the test/Transforms directory. Will be re-reverting again. llvm-svn: 358552
* Temporarily Revert "Add basic loop fusion pass."Eric Christopher2019-04-171-2774/+0
| | | | | | | | As it's causing some bot failures (and per request from kbarton). This reverts commit r358543/ab70da07286e618016e78247e4a24fcb84077fda. llvm-svn: 358546
* [LoopSimplifyCFG] Update MemorySSA after r353911.Alina Sbirlea2019-02-211-14/+14
| | | | | | | | | | | | | | | | | Summary: MemorySSA is not properly updated in LoopSimplifyCFG after recent changes. Use SplitBlock utility to resolve that and clear all updates once handleDeadExits is finished. All updates that follow are removal of edges which are safe to handle via the removeEdge() API. Also, deleting dead blocks is done correctly as is, i.e. delete from MemorySSA before updating the CFG and DT. Reviewers: mkazantsev, rtereshin Subscribers: sanjoy, jlebar, Prazek, george.burgess.iv, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58524 llvm-svn: 354613
* [TEST] Remove 2>&1 from testsMax Kazantsev2019-02-171-3/+3
| | | | | | Avoid confusing CHECKS with debug dumps of sets that can be printed differently. llvm-svn: 354229
* [LoopSimplifyCFG] Use DTU.applyUpdates instead of insert/deleteEdgeMax Kazantsev2019-02-081-21/+98
| | | | | | | | | | | `insert/deleteEdge` methods in DTU can make updates incorrectly in some cases (see https://bugs.llvm.org/show_bug.cgi?id=40528), and it is recommended to use `applyUpdates` methods instead when it is needed to make a mass update in CFG. Differential Revision: https://reviews.llvm.org/D57316 Reviewed By: kuhar llvm-svn: 353502
* [LoopSimplifyCFG] Do not count dead exit blocks twice, make CFG simplerMax Kazantsev2019-02-061-2/+0
| | | | llvm-svn: 353276
* [NFC] One more crashing test on LoopSimplifyCFGMax Kazantsev2019-01-251-0/+116
| | | | llvm-svn: 352194
* [LoopSimplifyCFG] Fix order of deletion of complex dead subloopsMax Kazantsev2019-01-171-3/+18
| | | | | | | | | | | | | | | | | Function `DeleteDeadBlock` requires that all predecessors of a block being deleted have already been deleted, with the exception of a single-block loop. When we use it for removal of dead subloops that contain more than one block, we may not fulfull this requirement and fail an assertion. This patch replaces invocation of `DeleteDeadBlock` with a generalized version `DeleteDeadBlocks` that is able to deal with multiple dead blocks, even if they contain some cycles. Differential Revision: https://reviews.llvm.org/D56121 Reviewed By: fedor.sergeev llvm-svn: 351433
* Temporarily disable term folding in LoopSimplifyCFG, add testsMax Kazantsev2018-12-281-0/+59
| | | | llvm-svn: 350117
* [LoopSimplifyCFG] Delete dead exiting edgesMax Kazantsev2018-12-241-104/+82
| | | | | | | | | | This patch teaches LoopSimplifyCFG to remove dead exiting edges from loops. Differential Revision: https://reviews.llvm.org/D54025 Reviewed By: fedor.sergeev llvm-svn: 350049
* Return "[LoopSimplifyCFG] Delete dead in-loop blocks"Max Kazantsev2018-12-241-104/+26
| | | | | | | | The underlying bug that caused the revert should be fixed by rL348567. Differential Revision: https://reviews.llvm.org/D54023 llvm-svn: 350045
* Revert "[LoopSimplifyCFG] Delete dead in-loop blocks"Ilya Biryukov2018-12-061-26/+104
| | | | | | | | This reverts commit r348457. The original commit causes clang to crash when doing an instrumented build with a new pass manager. Reverting to unbreak our integrate. llvm-svn: 348484
* [LoopSimplifyCFG] Delete dead in-loop blocksMax Kazantsev2018-12-061-104/+26
| | | | | | | | | | This patch teaches LoopSimplifyCFG to delete loop blocks that have become unreachable after terminator folding has been done. Differential Revision: https://reviews.llvm.org/D54023 Reviewed By: anna llvm-svn: 348457
* Disable LoopSimplifyCFG terminator folding by defaultMax Kazantsev2018-11-231-3/+3
| | | | llvm-svn: 347486
* [NFC] Add verification flags to testsMax Kazantsev2018-11-231-3/+3
| | | | llvm-svn: 347483
* [NFC] More complex tests for LoopSimplifyCFGMax Kazantsev2018-11-211-0/+345
| | | | llvm-svn: 347384
* [NFC] Add some sophisticated tests on LoopSimplifyCFGMax Kazantsev2018-11-211-47/+724
| | | | llvm-svn: 347381
* Recommit "[LoopSimplifyCFG] Teach LoopSimplifyCFG to constant-fold branches ↵Max Kazantsev2018-11-201-9/+149
| | | | | | | | | | | and switches" The initial version of patch lacked Phi nodes updates in destinations of removed edges. This version contains this update and tests on this situation. Differential Revision: https://reviews.llvm.org/D54021 llvm-svn: 347289
* Revert "[LoopSimplifyCFG] Teach LoopSimplifyCFG to constant-fold branches ↵Benjamin Kramer2018-11-191-49/+9
| | | | | | | | and switches" This reverts commits r347183 & r347184. Crashes while building libxml. llvm-svn: 347260
* [LoopSimplifyCFG] Add requires: asserts after rL347183Fangrui Song2018-11-191-0/+1
| | | | llvm-svn: 347184
* [LoopSimplifyCFG] Teach LoopSimplifyCFG to constant-fold branches and switchesMax Kazantsev2018-11-191-9/+48
| | | | | | | | | | | | | | | | This patch introduces infrastructure and the simplest case for constant-folding of branch and switch instructions within loop into unconditional branches. It is useful as a cleanup for such passes as loop unswitching that sometimes produce such branches. Only the simplest case supported in this patch: after the folding, no block should become dead or stop being part of the loop. Support for more sophisticated cases will go separately in follow-up patches. Differential Revision: https://reviews.llvm.org/D54021 Reviewed By: anna llvm-svn: 347183
* [NFC] Add missing test case, some test renamingMax Kazantsev2018-11-071-4/+43
| | | | llvm-svn: 346295
* [NFC] Add tests for loop-simplifycfg for further developmentMax Kazantsev2018-10-311-0/+1408
llvm-svn: 345713
OpenPOWER on IntegriCloud