[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 12:11:26 PDT 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rGd857a81437cb: [VPlan] Use SetVector for VPExternalDefs to prevent non-determinism. (authored by huihuiz).

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.334245.patch
Type: text/x-patch
Size: 952 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210330/a41e1244/attachment.bin>


More information about the llvm-commits mailing list