[PATCH] D107262: [CodeGenPrepare] The instruction to be sunk should be inserted before its user in a block
Tiehu Zhang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 3 02:04:34 PDT 2021
TiehuZhang added a comment.
In D107262#2919594 <https://reviews.llvm.org/D107262#2919594>, @dmgreen wrote:
> This happens because out of the chain of `insert; shuffle` only the `insert` needs to be sunk?
> It may be better to remove the `UI->getParent() == TargetBB` from `if (UI->getParent() == TargetBB || isa<PHINode>(UI))` and update `InsertPoint` in the loop as we go. It won't need to clone the instruction, but it can update InsertPoint and continue.
Hi, dmgreen, thanks for your review! But I don't quite make sense of your comment. The condition `UI->getParent() == TargetBB` is used to filter out some instructions already in targetBB to avoid the meaningless sinking, why can it be removed?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107262/new/
https://reviews.llvm.org/D107262
More information about the llvm-commits
mailing list