summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/MergeICmps
Commit message (Collapse)AuthorAgeFilesLines
* Migrate function attribute "no-frame-pointer-elim"="false" to ↵Fangrui Song2019-12-242-3/+3
| | | | "frame-pointer"="none" as cleanups after D56351
* [MergeICmps] Make the pass compatible with the new pass manager.Clement Courbet2019-05-231-1/+1
| | | | | | | | | | | | Reviewers: gchatelet, spatel Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D62287 llvm-svn: 361490
* [MergeICmps] Preserve the dominator tree.Clement Courbet2019-05-2114-15/+15
| | | | | | | | | | | | | | Summary: In preparation for D60318 . Reviewers: gchatelet, efriedma Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D62068 llvm-svn: 361239
* Re-land r360859: "[MergeICmps] Simplify the code."Clement Courbet2019-05-176-77/+71
| | | | | | | | | | With a fix for PR41917: The predecessor list was changing under our feet. - for (BasicBlock *Pred : predecessors(EntryBlock_)) { + while (!pred_empty(EntryBlock_)) { + BasicBlock* const Pred = *pred_begin(EntryBlock_); llvm-svn: 361009
* [MergeICmps] Add test from PR41917.Clement Courbet2019-05-171-0/+76
| | | | llvm-svn: 361001
* Revert r360859: "Reland r360771 "[MergeICmps] Simplify the code.""Nico Weber2019-05-175-62/+67
| | | | | | It caused PR41917. llvm-svn: 360963
* Reland r360771 "[MergeICmps] Simplify the code."Clement Courbet2019-05-165-67/+62
| | | | | | This revision does not seem to be the culprit. llvm-svn: 360859
* Revert r360771 "[MergeICmps] Simplify the code."Clement Courbet2019-05-155-62/+67
| | | | | | Breaks a bunch of builbdots. llvm-svn: 360776
* [MergeICmps] Simplify the code.Clement Courbet2019-05-155-67/+62
| | | | | | | | | | | | | | | | | | | Instead of patching the original blocks, we now generate new blocks and delete the old blocks. This results in simpler code with a less twisted control flow (see the change in `entry-block-shuffled.ll`). This will make https://reviews.llvm.org/D60318 simpler by making it more obvious where control flow created and deleted. Reviewers: gchatelet Subscribers: hiraditya, llvm-commits, spatel Tags: #llvm Differential Revision: https://reviews.llvm.org/D61736 llvm-svn: 360771
* [MergeICmps][NFC] Re-generate tests with update_test_checks.Clement Courbet2019-05-0912-168/+243
| | | | | | And use a more compact name for the tested struct. llvm-svn: 360319
* [NFC] Fix typo.Clement Courbet2019-05-091-1/+1
| | | | llvm-svn: 360314
* Revert "Temporarily Revert "Add basic loop fusion pass.""Eric Christopher2019-04-1715-0/+991
| | | | | | | | 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-1715-991/+0
| | | | | | | | As it's causing some bot failures (and per request from kbarton). This reverts commit r358543/ab70da07286e618016e78247e4a24fcb84077fda. llvm-svn: 358546
* [MergeICmps] Do not perform the transformation if GEP is used outside of blockTaewook Oh2018-11-052-0/+37
| | | | | | | | | | | | | | | | | Summary: This patch prevents MergeICmps to performn the transformation if the address operand GEP of the load instruction has a use outside of the load's parent block. Without this patch, compiler crashes with the given test case because the use of `%first.i` is still around when the basic block is erased from https://github.com/llvm-mirror/llvm/blob/master/lib/Transforms/Scalar/MergeICmps.cpp#L620. I think checking `isUsedOutsideOfBlock` with `GEP` is the original intention of the code, as the checking for `LoadI` is already performed in the same function. This patch is incomplete though, as this makes the pass overly conservative and fails the test `tuple-four-int8.ll`. I believe what needs to be done is checking if GEP has a use outside of block that is not the part of "Comparisons" chain. Submit the patch as of now to prevent compiler crash. Reviewers: courbet, trentxintong Reviewed By: courbet Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D54089 llvm-svn: 346151
* Pointer types were treated as zero-size by MergeICmpsChristy Lee2018-10-261-0/+39
| | | | | | | | | | | | | | | | Summary: The visitICmp analysis function would record compares of pointer types, as size 0. This causes the resulting memcmp() call to have the wrong total size. Found with "self-build" of clang/LLVM on Windows. Reviewers: christylee, trentxintong, courbet Reviewed By: courbet Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D53536 llvm-svn: 345413
* Re-submitting changes in D51550 because it failed to patch.Christy Lee2018-09-241-7/+11
| | | | | | | | | | | | Reviewers: javed.absar, trentxintong, courbet Reviewed By: trentxintong Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D52433 llvm-svn: 342919
* Reland r342494 after fixing LIT checks.Christy Lee2018-09-241-0/+60
| | | | llvm-svn: 342907
* Revert r342494 as it was failing on a bot and the author cannot look at it ↵Douglas Yung2018-09-181-66/+0
| | | | | | | | until tomorrow. Failing bot: http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/36708 llvm-svn: 342509
* Do not optimize atomic load to non-atomic memcmpChristy Lee2018-09-181-0/+47
| | | | | | Differential Revision: https://reviews.llvm.org/D51998 llvm-svn: 342498
* Check lines before using alias analysis to check for interferenceChristy Lee2018-09-181-0/+66
| | | | | | | | This diff is to show the difference before and after D51550 Differential Revision: https://reviews.llvm.org/D52044 llvm-svn: 342494
* [MergeICmps] Don't crash when memcmp is not availableBenjamin Kramer2018-05-191-3/+42
| | | | | | Fixes clang crashing with -fno-builtin, PR37527. llvm-svn: 332808
* [MergeICmp] Split blocks that do other work.Xin Tong2018-04-092-14/+123
| | | | | | | | | | | | | | | Summary: We do not try to move the instructions and split the block till we know the blocks can be split, i.e. BCE-cmp-insts can be separated from non-BCE-cmp-insts. Reviewers: davide, courbet Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D44443 llvm-svn: 329564
* [MergeICmp] Fix a bug in entry block shuffled to middle of the chainXin Tong2018-03-202-1/+58
| | | | | | | | | | | | Summary: Fix a bug in entry block shuffled to middle of the chain. Reviewers: davide, courbet Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D44642 llvm-svn: 327971
* [MergeICmps] Make sure that the comparison only has one use.Clement Courbet2018-03-131-0/+100
| | | | | | | | | | | | Summary: Fixes PR36557. Reviewers: trentxintong, spatel Subscribers: mstorsjo, llvm-commits Differential Revision: https://reviews.llvm.org/D44083 llvm-svn: 327372
* [MergeICmp] We can discard initial blocks that do other workXin Tong2018-03-051-0/+64
| | | | | | | | | | | | | | | | Summary: We can discard initial blocks that do other work We do not need to limit ourselves to just the first block in the chain. Reviewers: courbet, davide Reviewed By: courbet Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D44029 llvm-svn: 326698
* [MergeICmps] Revert accidentally submitted failing test case.Clement Courbet2018-03-021-160/+0
| | | | | | Reverts r326574. llvm-svn: 326582
* [MergeIcmps] Add the test case from PR36557.Clement Courbet2018-03-021-0/+160
| | | | | | | | | | Summary: See PR36557. Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D44009 llvm-svn: 326574
* [MergeICmp] Fix a bug in MergeICmp that can lead to a block being processed ↵Xin Tong2018-02-281-0/+57
| | | | | | | | | | | | | | | | | | | | | more than once. Summary: Fix a bug in MergeICmp that can lead to a BCECmp block being processed more than once and eventually lead to a broken LLVM module. The problem is that if the non-constant value is not produced by the last block, the producer will be processed once when the its parent block is processed and second time when the last block is processed. We end up having 2 same BCECmpBlock in the merge queue. And eventually lead to a broken LLVM module. Reviewers: courbet, davide Reviewed By: courbet Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D43825 llvm-svn: 326318
* [MergeICmps] Handle chains with several complex BCE basic blocks.Clement Courbet2018-02-061-0/+58
| | | | | | | | | | - Fix condition for detecting that a complex basic block was the first in the chain. - Add tests. This was caught by buildbots when submitting rL324319. llvm-svn: 324341
* Re-land "[MergeICmps] Disable mergeicmps if the target does not want to ↵Clement Courbet2017-10-106-85/+215
| | | | | | | | | | handle memcmp expansion." (fixed stability issues) This reverts commit d6492333d3b478a1d88163315002022f8d5e58dc. llvm-svn: 315281
* [MergeICmp][NFC] Make test tuple-four-int8.ll more readable.Clement Courbet2017-10-061-32/+32
| | | | llvm-svn: 315062
* Revert "[MergeICmps] Disable mergeicmps if the target does not want to ↵Clement Courbet2017-10-066-215/+77
| | | | | | | | | | handle memcmp expansion." Still a few stability issues on windows. This reverts commit 67e3db9bc121ba244e20337aabc7cf341a62b545. llvm-svn: 315058
* Re-land "[MergeICmps] Disable mergeicmps if the target does not want to ↵Clement Courbet2017-10-066-77/+215
| | | | | | | | | | handle memcmp expansion." (fixed unit tests by making comparisons stable) This reverts commit 1b2d359ce256fd6737da4e93833346a0bd6d7583. llvm-svn: 315056
* Revert "Re-land "[MergeICmps] Disable mergeicmps if the target does not want ↵Clement Courbet2017-10-056-215/+77
| | | | | | | | | | to handle memcmp expansion.""" broken test on windows This reverts commit c91479518344fd1fc071c5bd5848f6eb83e53dca. llvm-svn: 314985
* Re-land "[MergeICmps] Disable mergeicmps if the target does not want to ↵Clement Courbet2017-10-056-77/+215
| | | | | | handle memcmp expansion."" llvm-svn: 314980
* Revert "[MergeICmps] Disable mergeicmps if the target does not want to ↵Clement Courbet2017-10-056-215/+77
| | | | | | | | | | | handle memcmp expansion." Breaks clang-stage1-cmake-RA-incremental/llvm/test/Transforms/MergeICmps/X86/tuple-four-int8.ll This reverts commit 3038c459d67f8898ffa295d54a013b280690abfa. llvm-svn: 314972
* [MergeICmps] Disable mergeicmps if the target does not want to handle memcmp ↵Clement Courbet2017-10-056-77/+215
| | | | | | | | | | | | | | expansion. Summary: This is to avoid e.g. merging two cheap icmps if the target is not going to expand to something nice later. Reviewers: dberlin, spatel Subscribers: davide, nemanjai Differential Revision: https://reviews.llvm.org/D38232 llvm-svn: 314970
* Reland rL312315: [MergeICmps] MergeICmps is a new optimization pass that ↵Clement Courbet2017-09-013-0/+190
| | | | | | | | | | turns chains of integer Add missing header. This reverts commit 86dd6335cf7607af22f383a9a8e072ba929848cf. llvm-svn: 312322
* Revert "[MergeICmps] MergeICmps is a new optimization pass that turns chains ↵Clement Courbet2017-09-013-190/+0
| | | | | | | | | | of integer" Break build This reverts commit d07ab866f7f88f81e49046d691a80dcd32d7198b. llvm-svn: 312317
* [MergeICmps] MergeICmps is a new optimization pass that turns chains of integerClement Courbet2017-09-013-0/+190
comparisons into memcmp. Thanks to recent improvements in the LLVM codegen, the memcmp is typically inlined as a chain of efficient hardware comparisons. This typically benefits C++ member or nonmember operator==(). For now this is disabled by default until: - https://bugs.llvm.org/show_bug.cgi?id=33329 is complete - Benchmarks show that this is always useful. Differential Revision: https://reviews.llvm.org/D33987 llvm-svn: 312315
OpenPOWER on IntegriCloud