[PATCH] D98659: [MachineCopyPropagation] Do more backward copy propagations
yshui via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 20 19:41:24 PDT 2021
yshui added inline comments.
================
Comment at: llvm/lib/CodeGen/MachineCopyPropagation.cpp:54
+// $R2 = OP $R0 // $R0 is used
+// $R1 = COPY $R0 // $R0 is killed
+// Replace $R0 and its uses with $R1 and remove the COPY
----------------
lkail wrote:
> Is it possible forward copy propagation can also eliminate this COPY if `$R1` defined by this COPY is killed at the BB later? If so, I think we should extend forward copy propagation and should be less complex than what current patch does.
One case I can think of where this can't done is if `$R0` got clobbered between `$R1 = $R0` and the use of `$R1` later.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98659/new/
https://reviews.llvm.org/D98659
More information about the llvm-commits
mailing list