[PATCH] D158849: [GVN] Invalidate MDA when deduplicating phi nodes

Guozhi Wei via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 25 09:33:29 PDT 2023


Carrot added inline comments.


================
Comment at: llvm/include/llvm/Transforms/Utils/Local.h:170
+bool EliminateDuplicatePHINodes(
+    BasicBlock *BB, SmallSetVector<PHINode *, 4> *ToRemove = nullptr);
 
----------------
nikic wrote:
> Carrot wrote:
> > Why not use SmallPtrSet?
> I was trying to make sure the order is deterministic -- maybe it doesn't matter though?
Each PHINode address is unique, and it is only used to check if a PHI instruction is contained in the set in function EliminateDuplicatePHINodes, and later delete all instructions in the set. So I think the order doesn't matter.



CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D158849/new/

https://reviews.llvm.org/D158849



More information about the llvm-commits mailing list