[PATCH] D98659: [MachineCopyPropagation] Do more backward copy propagations
Kai Luo via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 17 04:36:10 PDT 2021
lkail 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
----------------
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.
================
Comment at: llvm/lib/CodeGen/MachineCopyPropagation.cpp:283
+ /// Find the corresponding copy instruction where \p RegUnit appeared as the
+ /// Src
MachineInstr *findCopyDefViaUnit(MCRegister RegUnit,
----------------
Missing perid.
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