[PATCH] D99544: [VPlan] Use SetVector for VPExternalDefs to prevent non-determinism.

Huihui Zhang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 30 09:50:14 PDT 2021


huihuiz updated this revision to Diff 334202.
huihuiz marked an inline comment as done.
huihuiz retitled this revision from "[VPlan] Use SmallVector for VPExternalDefs to prevent non-determinism." to "[VPlan] Use SetVector for VPExternalDefs to prevent non-determinism.".
huihuiz edited the summary of this revision.
huihuiz added a reviewer: fhahn.
huihuiz added a comment.

Thank you for the feedback!
Addressed review comments.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99544

Files:
  llvm/lib/Transforms/Vectorize/VPlan.h


Index: llvm/lib/Transforms/Vectorize/VPlan.h
===================================================================
--- llvm/lib/Transforms/Vectorize/VPlan.h
+++ llvm/lib/Transforms/Vectorize/VPlan.h
@@ -1767,7 +1767,7 @@
   // VPlan. External definitions must be immutable and hold a pointer to its
   // underlying IR that will be used to implement its structural comparison
   // (operators '==' and '<').
-  SmallPtrSet<VPValue *, 16> VPExternalDefs;
+  SetVector<VPValue *> VPExternalDefs;
 
   /// Represents the backedge taken count of the original loop, for folding
   /// the tail.
@@ -1835,9 +1835,7 @@
 
   /// Add \p VPVal to the pool of external definitions if it's not already
   /// in the pool.
-  void addExternalDef(VPValue *VPVal) {
-    VPExternalDefs.insert(VPVal);
-  }
+  void addExternalDef(VPValue *VPVal) { VPExternalDefs.insert(VPVal); }
 
   void addVPValue(Value *V) {
     assert(V && "Trying to add a null Value to VPlan");


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99544.334202.patch
Type: text/x-patch
Size: 952 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210330/6df92293/attachment.bin>


More information about the llvm-commits mailing list