[PATCH] D136218: [DSE] Sink a memory access if it is only alive in one successor.
luxufan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 18 19:02:06 PDT 2022
StephenFan created this revision.
StephenFan added reviewers: nikic, fhahn, asbirlea, efriedma.
Herald added a subscriber: hiraditya.
Herald added a project: All.
StephenFan requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
If a memory access is only alive in one successor, sinking the instruction
of this memory access to the alive successor will make the program execute one
less instruction if it goes to dead successors(successors except the
alive successor).
Since deleting instruction is more beneficial than sinking, sinking will
be doing until we have deleted all dead instructions.
It seems to have no effect on on compile time: https://llvm-compile-time-tracker.com/compare.php?from=6eb40bf51b768672218539935f60ce55ae6ad750&to=e8bccfd7a3c58f3287f7da7ab3e2582ec270b0f4&stat=instructions
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D136218
Files:
llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
llvm/test/Transforms/DeadStoreElimination/multiblock-multipath.ll
llvm/test/Transforms/DeadStoreElimination/multiblock-simple.ll
llvm/test/Transforms/DeadStoreElimination/multiblock-sink.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D136218.468760.patch
Type: text/x-patch
Size: 16545 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221019/f9bfc45d/attachment.bin>
More information about the llvm-commits
mailing list