[PATCH] D88380: [VPlan] Extend VPValue to also model sub- & 'virtual' values.

Diego Caballero via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 13 15:01:34 PST 2020


dcaballe added a comment.

Just looking around! Glad to see VPlan moving forward! :)



================
Comment at: llvm/lib/Transforms/Vectorize/VPlanValue.h:52
+//  produce multiple values. They contain a reference to the producing
+//  'virtual' VPValue.
+//  3. Virtual VPValues
----------------
I'm trying to understand what 'Sub' refers to here. Not sure I can easily relate it to 'result'. Is this kind of VPValue intended to be use for something else in the future? Would "Result VPValue" or similar make it clearer?


================
Comment at: llvm/lib/Transforms/Vectorize/VPlanValue.h:59
+//  the def-use chains upwards. They also provide convenient access to all
+//  users of all sub-values of the producer.
 class VPValue {
----------------
So a Virtual VPValue is basically what an Operation is in MLIR, right?


================
Comment at: llvm/lib/Transforms/Vectorize/VPlanValue.h:196
+
+  VPValue *getDefiningValue() {
+    assert(isSubValue() && "can only get defining value of sub-value");
----------------
This, indeed, looks pretty much like MLIR API :)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D88380



More information about the llvm-commits mailing list