[PATCH] D48816: [VPlan] Introduce VPLoopInfo analysis.

Diego Caballero via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 17 22:21:15 PDT 2018


dcaballe added inline comments.


================
Comment at: lib/Transforms/Vectorize/VPlan.h:1123
+  /// Holds the VPLoopInfo analysis for this VPlan.
+  VPLoopInfo *VPLInfo = nullptr;
+
----------------
fhahn wrote:
> Could the VPlan just store a VPLoopInfo object instead of using a raw pointer? 
> 
> It would have the advantage of not needing dynamic memory management and it would be clear that each VPlan owns its VPLoopInfo. Instead having setVPLoopInfo we would have something like `analyze()` which would compute the DT and LoopInfo.
Store an object instead is much better, definitely! Thanks!

However, I'm not too sure about the `analyze()` part. Some analyses will be computed at different times. Some others, such as as DT for the plain CFG, are temporal (DT becomes invalid once regions are introduced so we don't even want to store it in VPlan). Would it be acceptable to keep the analysis computation of VPLoopInfo as is, at least, for now?


https://reviews.llvm.org/D48816





More information about the llvm-commits mailing list