Craig Topper
689ace53a5
[MemCpyOptimizer] Support scalable vectors in performStackMoveO… ( #67632 )
...
…ptzn.
This changes performStackMoveOptzn to take a TypeSize instead of
uint64_t to avoid an implicit conversion when called from
processStoreOfLoad.
performStackMoveOptzn has been updated to allow scalable types in the
rest of its code.
2023-09-28 12:25:38 -07:00
Kohei Asano
2a207128a7
[MemCpyOpt] move SrcAlloca to the entry if transformation is performed ( #67226 )
...
This is fixup for
https://github.com/llvm/llvm-project/pull/66618#discussion_r1328523770 .
This transformation checks whether allocas are static, if the
transformation is performed. This patch moves the SrcAlloca to the entry
of the BB when the optimization performed.
2023-09-26 16:27:34 +09:00
Kohei Asano
baf031a853
[MemCpyOpt] fix miscompile for non-dominated use of src alloca for stack-move optimization ( #66618 )
...
Stack-move optimization, the optimization that merges src and dest
alloca of the full-size copy, replaces all uses of the dest alloca with
src alloca. For safety, we needed to check all uses of the dest alloca
locations are dominated by src alloca, to be replaced. This PR adds the
check for that.
Fixes #65225
2023-09-18 21:29:10 +09:00
khei4
7f3610ac69
Reapply "Revert "[MemCpyOpt] implement multi BB stack-move optimization"
...
This reverts commit efe8aa2e618122e8050af10cc5d6ad83f24ef557.
Differential Revision: https://reviews.llvm.org/D155406
2023-09-14 19:42:36 +09:00
Vitaly Buka
efe8aa2e61
Revert "Reapply "Revert "[MemCpyOpt] implement multi BB stack-move optimization""
...
Suspecting incorrect lifetime markers.
This reverts commit 3a1409f93da32bf626f76257e0aac71716f2f67e.
2023-09-07 11:14:19 -07:00
khei4
c4d37c35e1
[MemCpyOpt] fix false negative case and add it as a true positive case(NFC)
2023-08-30 11:18:26 +09:00
khei4
3a1409f93d
Reapply "Revert "[MemCpyOpt] implement multi BB stack-move optimization"
...
This reverts commit e0f9cc71cb6f4eb2e1566177e05425c497759dc6.
Differential Revision: https://reviews.llvm.org/D155406
2023-08-29 19:40:29 +09:00
khei4
c652987dd9
[MemCpyOpt] remove test noises (NFC)
2023-08-29 17:24:36 +09:00
khei4
5a9a7f5303
[MemCpyOpt] add tests for unreachable cycles for post dominators(NFC)
2023-08-29 14:07:45 +09:00
khei4
98d1b0eb64
[MemCpyOpt] add tests for unreachable block before calculating common dominator(NFC)
2023-08-28 14:44:41 +09:00
Vitaly Buka
e0f9cc71cb
Revert "Reapply "Revert "[MemCpyOpt] implement multi BB stack-move optimization"""
...
Breaks multiple bots. e.g. https://lab.llvm.org/buildbot/#/builders/19/builds/18856
This reverts commit ac0072602c9d01fc031a2d0acb418f7191480ef0.
2023-08-26 19:24:50 -07:00
khei4
ac0072602c
Reapply "Revert "[MemCpyOpt] implement multi BB stack-move optimization""
...
This reverts commit 3bb32c61b2f1f5d14dd056dd198dc898dce5a44e.
Use InsertionPt for DT to handle non-memory access dominators
Differential Revision: https://reviews.llvm.org/D155406
2023-08-27 06:50:19 +09:00
khei4
fe285ae091
[NFC][MemCpyOpt] add test for MemoryAccess crash on D155406
2023-08-25 01:00:29 +09:00
khei4
3bb32c61b2
Revert "[MemCpyOpt] implement multi BB stack-move optimization"
...
This reverts commit ef867d2ea10e8246be20c608160e07a54eb2ed14.
crash on sanitizer build https://lab.llvm.org/buildbot/#/builders/70/builds/42861/steps/10/logs/stdio
2023-08-24 22:56:39 +09:00
khei4
ef867d2ea1
[MemCpyOpt] implement multi BB stack-move optimization
...
Differential Revision: https://reviews.llvm.org/D155406
2023-08-24 22:19:01 +09:00
khei4
e0911b98d1
[MemCpyOpt] precommit test for D155406 (NFC)
...
Differential Revision: https://reviews.llvm.org/D155422
2023-08-24 22:19:01 +09:00
khei4
ca68a7f956
Reapply: [MemCpyOpt] implement single BB stack-move optimization which unify the static unescaped allocas
...
This reverts commit 207718029e1e62d82145b479f6349941b6384045.
2023-08-15 22:13:09 +09:00
khei4
0b4f8c9fc4
(NFC)[MemCpyOpt] add a test to avoid crash for last memory use
2023-08-15 20:20:57 +09:00
Vitaly Buka
207718029e
Revert "Reapply: [MemCpyOpt] implement single BB stack-move optimization which unify the static unescaped allocas"
...
Fails on https://lab.llvm.org/buildbot/#/builders/85/builds/18296
This reverts commit 43698c1ddc179ccd97b3f3b2bb03f4a3fe9556f3.
2023-08-13 16:29:39 -07:00
khei4
43698c1ddc
Reapply: [MemCpyOpt] implement single BB stack-move optimization which unify the static unescaped allocas
...
Differential Revision: https://reviews.llvm.org/D153453
This reverts commit 00653889883f2d818536efcb21c6c8b739f0888b.
2023-08-13 21:38:00 +09:00
khei4
90ecb9d5b0
[MemCpyOpt][test] add memssa verification on stack-move tests(NFC)
2023-08-08 18:56:59 +09:00
Vitaly Buka
0065388988
Revert "Reapply: [MemCpyOpt] implement single BB stack-move optimization which unify the static unescaped allocas"""
...
Breaks Asan and LTO.
This reverts commit ea72b5137eb72391ad192dbb01084c21b9fe8b71.
2023-08-02 12:32:35 -07:00
khei4
ea72b5137e
Reapply: [MemCpyOpt] implement single BB stack-move optimization which unify the static unescaped allocas""
...
This reverts commit c9d419c1df72b0160e374f8d0b9f30508b3b98a7.
Differential Revision: https://reviews.llvm.org/D153453
2023-07-24 10:16:49 +09:00
khei4
d878916c21
[MemCpyOpt] add noalias metadata on lifetime intrinsic test case for stack-move optimization(NFC)
2023-07-23 00:18:33 +09:00
khei4
c9d419c1df
Revert "Reapply: [MemCpyOpt] implement single BB stack-move optimization which unify the static unescaped allocas"
...
revert because crash on chrome windows https://reviews.llvm.org/D153453#4524256
This reverts commit 569769b64858fd38f41267db41b461d3163aa754.
2023-07-22 13:08:12 +09:00
khei4
569769b648
Reapply: [MemCpyOpt] implement single BB stack-move optimization which unify the static unescaped allocas
...
This reverts commit 8f3864ba4323a253bcf29825d23cd325b52c4106.
Differential Revision: https://reviews.llvm.org/D153453
2023-07-19 18:26:04 +09:00
khei4
bdc9a6b1e9
[MemCpyOpt] add terminator user test for D153453(NFC)
...
Differential Revision: https://reviews.llvm.org/D155571
2023-07-19 18:26:04 +09:00
khei4
8f3864ba43
Revert "Revert "Revert "[MemCpyOpt] implement single BB stack-move optimization which unify the static unescaped allocas"""
...
This reverts commit b02d349cbfaa81c9bbc928c4de46b12d976c1882.
2023-07-18 18:42:36 +09:00
khei4
b02d349cbf
Revert "Revert "[MemCpyOpt] implement single BB stack-move optimization which unify the static unescaped allocas""
...
This reverts commit 36a6eb7d12a9f827bf3d5d4e5fdc68b8a62807b2.
[MemCpyOpt] check that load/store and dest/src alloca are all in the same bb
Differential Revision: https://reviews.llvm.org/D153453
Co-authored-by: serge-sans-paille <sguelton@mozilla.com>
2023-07-15 16:27:38 +09:00
khei4
a92e197114
[MemCpyOpt] precommit tests to add multi-BB stack-move optimization to check crash for D153453 (NFC)
...
Differential Revision: https://reviews.llvm.org/D155179
Co-authored-by: serge-sans-paille <sguelton@mozilla.com>
2023-07-15 16:27:38 +09:00
khei4
36a6eb7d12
Revert "[MemCpyOpt] implement single BB stack-move optimization which unify the static unescaped allocas"
...
This reverts commit 96ae0851c26237378fa1280b0a9ad713e1b72bdb.
2023-07-13 18:04:49 +09:00
khei4
96ae0851c2
[MemCpyOpt] implement single BB stack-move optimization which unify the static unescaped allocas
...
Differential Revision: https://reviews.llvm.org/D153453
2023-07-13 14:52:30 +09:00
khei4
393215649b
[MemCpyOpt] precommit test to add single BB stack-move optimization (NFC)
...
Differential Revision: https://reviews.llvm.org/D152277
2023-07-13 14:52:30 +09:00