[PATCH] D67366: [CGP] Ensure sinking multiple instructions does not invalidate dominance checks
Dave Green via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 10 14:56:58 PDT 2019
dmgreen marked an inline comment as done.
dmgreen added inline comments.
================
Comment at: llvm/lib/CodeGen/CodeGenPrepare.cpp:6206
- SmallPtrSet<Instruction *, 4> MaybeDead;
+ SmallVector<Instruction *, 4> MaybeDead;
+ DenseMap<Instruction *, Instruction *> NewInstructions;
----------------
samparker wrote:
> So it's not possible for an instruction to be inserted multiple times?
Hmm. Yeah. Sinking the same instruction form multiple uses? It would be cloned more than once. I don't think anything currently uses it...
We do need to make sure they are deleted in a deterministic order. I can change it to a SetVector. Good suggestion, thanks!
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67366/new/
https://reviews.llvm.org/D67366
More information about the llvm-commits
mailing list