[PATCH] D92557: [MachineLICM] delete dead flag if the duplicated def outside of loop is dead.
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 18 07:58:42 PST 2020
arsenm added inline comments.
================
Comment at: llvm/lib/CodeGen/MachineLICM.cpp:1470
+ // Clear Dup dead flag if any, we reuse it for Reg.
+ const_cast<MachineInstr *>(Dup)->getOperand(Idx).setIsDead(false);
}
----------------
shchenz wrote:
> arsenm wrote:
> > Really should not be using const_cast here
> Thanks for your comments. Do you mean we should make `LookForDuplicate()` return `MachineInstr *` instead of return `const MachineInstr *`?
Either that, or there's a different place to make this change (I do think this is probably the right place though)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92557/new/
https://reviews.llvm.org/D92557
More information about the llvm-commits
mailing list