[PATCH] D48815: [VPlan] Introduce VPlan-based dominator analysis.

Diego Caballero via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 6 13:08:10 PDT 2018


dcaballe added inline comments.


================
Comment at: lib/Transforms/Vectorize/VPlan.cpp:198
+  return std::distance(df_iterator<const VPBlockBase *>::begin(Entry),
+                       df_iterator<const VPBlockBase *>::end(Exit));
+}
----------------
I'd like to hear your feedback on this. Internally, we started with an 'unsigned size' class member that we tried to maintain transformation after transformation. However, there are many cases where a simple size update is not possible and you need some kind of CFG traversal (sometimes a full region's traversal, such as in this code). For example, when you wrap part of a CFG with a region, when you insert or remove part of a CFG into/from a region, etc. Since 'getSize' is only used by GraphTraits and it's not a highly used interface, I though it could be cleaner to just compute the size when needed instead of trying to store and maintain it. However, if you think this is an overkill, we could give it a try to the latter approach.


Repository:
  rL LLVM

https://reviews.llvm.org/D48815





More information about the llvm-commits mailing list