[PATCH] D49491: [RFC][VPlan, SLP] Add simple SLP analysis on top of VPlan.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 9 09:32:41 PDT 2018


fhahn added inline comments.


================
Comment at: lib/Transforms/Vectorize/VPlan.h:627
   unsigned getOpcode() const { return Opcode; }
+  void setOpcode(unsigned Op) { Opcode = Op; }
 
----------------
dcaballe wrote:
> I wonder if having this interface is safe. Wouldn't it be problematic if we change the opcode of a VPInstruction object to an opcode of an operation which is represented with a VPInstruction subclass? Maybe it's better to not allow this and just create a VPInstruction using VPlanBuilder?
Removed, it was a leftover from an earlier version.


================
Comment at: lib/Transforms/Vectorize/VPlan.h:1387
+  /// A DenseMapInfo implementation for holding DenseMaps and DenseSets of
+  /// sorted SmallVectors of const SCEV*.
+  struct BundleDenseMapInfo {
----------------
dcaballe wrote:
> SCEV -> VPValue?
> 
> I guess we couldn't have a single templatized version for sorted SmallVectors of any pointer, right?
I think it is possible to provide a single implementation for SmallVectors. I've removed the implementation here and will upload a separate patch for it soon.


https://reviews.llvm.org/D49491





More information about the llvm-commits mailing list