[PATCH] D95382: [VPlan] Use VPUser to manage CondBit

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 9 14:24:45 PST 2021


fhahn added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/VPlan.h:410
+  /// which is the branch condition.
+  VPUser CondBitUser;
 
----------------
gilr wrote:
> Nit: IIRC the condition bit is only used by the native path (LV uses the BranchOnMask recipe instead), but LV still sets the condition bit in the call to `setTwoSuccessors` in `insertTwoBlocksAfter`, which will now create a redundant user of the condition bit. Not sure it is/will be a problem, but we could pass nullptr there to avoid it (requires removing the assert in `setTwoSuccessors`).
I am not sure I follow directly here. Do you mean using `VPUser *` and allocate it on demand? I think the extra field is currently not worth the trouble, and hopefully we will be able to unify the VPNative & regular paths in the future :)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D95382



More information about the llvm-commits mailing list