[PATCH] D46827: [VPlan] Add VPInstruction to VPRecipe transformation.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 8 09:11:15 PDT 2018


fhahn added inline comments.


================
Comment at: lib/Transforms/Vectorize/VPlanHCFGTransforms.cpp:134
+  RSO << "VPRecipe-based VPlan for VF={";
+  for (unsigned VF : OriginalPlan->getVFs()) {
+    Plan->addVF(VF);
----------------
craig.topper wrote:
> fhahn wrote:
> > craig.topper wrote:
> > > Is the iteration order guaranteed here when the set is small? It's been a while since I've look at how SmallSet manages the vector.
> > I've just put up a patch adding an iterator for SmallSet: D47942
> > 
> > If the set is small, it just uses a SmallVector, otherwise it uses std::set, which should also give a deterministic iteration order.
> I guess deterministic wasn't the right word. It looks like when the set is small this will print out in the order that the VFs were inserted into the set not a numeric order? Given that this is going into a string is that a good idea?
Yeah, I guess we would need to sort the VFs here. But I'll update the patch to transform the original VPlan in place, so this code should go away.


https://reviews.llvm.org/D46827





More information about the llvm-commits mailing list