[PATCH] D155406: [MemCpyOpt] implement multi BB stack-move optimization
Kohei Asano via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 21 01:08:54 PDT 2023
khei4 updated this revision to Diff 542792.
khei4 retitled this revision from "(WIP) [MemCpyOpt] implement multi BB stack-move optimization" to "[MemCpyOpt] implement multi BB stack-move optimization".
khei4 edited the summary of this revision.
khei4 added a comment.
apply feedback
- fix wrong handling for post-dominator insertion
- Instruction-level reachability checking
- maybe better to implement a method in CFG analysis
- add LoopInfo Analysis to handle loop mod-ref reachability
- I believe almost not so much regression for compile time. https://llvm-compile-time-tracker.com/compare.php?from=2975ccb4b06b3d3aedd86ab21729146e441521d7&to=83fcffd325e79dd89e2b932b053945f868659f56&stat=instructions:u
- rebased on added test for https://reviews.llvm.org/D155422
The primary unfinished case is the original pcwalton's <https://reviews.llvm.org/D140089> `_is_def` prefix cases, which fully overwrite src/def after the copy. This inherently requires liveness-analysis kind things, but I think for safe Rust move cases, Rust reference property aliasing xor mutability doesn't allow so much case for that (maybe?). So I hope this might have a slight effect on Rust programs :)
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D155406/new/
https://reviews.llvm.org/D155406
Files:
llvm/include/llvm/Transforms/Scalar/MemCpyOptimizer.h
llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp
llvm/test/Other/new-pm-defaults.ll
llvm/test/Other/new-pm-lto-defaults.ll
llvm/test/Other/new-pm-thinlto-postlink-defaults.ll
llvm/test/Other/new-pm-thinlto-prelink-defaults.ll
llvm/test/Transforms/MemCpyOpt/stack-move.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D155406.542792.patch
Type: text/x-patch
Size: 24138 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230721/673fc56d/attachment.bin>
More information about the llvm-commits
mailing list