[PATCH] D86304: [LV] get.active.lane.mask consuming/emitting TripCount instead of backedge-taken count

Sjoerd Meijer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 24 05:22:19 PDT 2020


SjoerdMeijer added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:7043
+      BlockMask = Builder.createNaryOp(VPInstruction::ActiveLaneMask,
+                                       {IV, new VPValue()});
     else
----------------
dmgreen wrote:
> This looks like it might leak memory. Can you just use a single argument instead?
Thanks Dave. That looks like a leak, yes.  Probably caused because I have been struggling with this part a lot. I.e., I have been struggling with unnecessary/complicated abstractions here, while all I need is to pick up the tripcount later from `State.TripCount`, because that's where this thing lives. While ActiveLaneMask is a binary op, I think a single argument is best, and that would be clearer than trying to force it to look like a binary op with some sort of dummy 2nd argument which I did here in the wrong way that will be replaced later, I don't see how that really helps.


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

https://reviews.llvm.org/D86304



More information about the llvm-commits mailing list