Page MenuHomePhabricator

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

Authored by SjoerdMeijer on Aug 20 2020, 9:42 AM.

Details

Summary

Adapt LV to the new semantics of get.active.lane.mask as proposed in D86147, which means that it now consumes/emits the loop tripcount instead of the backedge-taken count. Motiviation for this is discussed in D86147.

Diff Detail

Event Timeline

SjoerdMeijer created this revision.Aug 20 2020, 9:42 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 20 2020, 9:42 AM
SjoerdMeijer requested review of this revision.Aug 20 2020, 9:42 AM
SjoerdMeijer retitled this revision from [LV] get.active.lane.mask consuming/emitting TripCount insteat of backedge-taken count to [LV] get.active.lane.mask consuming/emitting TripCount instead of backedge-taken count.Aug 20 2020, 11:10 AM
dmgreen added inline comments.Aug 24 2020, 4:46 AM
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
7158

This looks like it might leak memory. Can you just use a single argument instead?

SjoerdMeijer added inline comments.Aug 24 2020, 5:22 AM
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
7158

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.

Comments addressed.

dmgreen accepted this revision.Aug 25 2020, 2:06 AM

Thanks. Seems OK to me, to match up with the new semantics.

This revision is now accepted and ready to land.Aug 25 2020, 2:06 AM