Page MenuHomePhabricator

[VPlan] Clone original VPlan and specialize for each VF (WIP).
Needs ReviewPublic

Authored by fhahn on Mar 1 2021, 11:26 AM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None

Diff Detail

Event Timeline

fhahn created this revision.Mar 1 2021, 11:26 AM
fhahn requested review of this revision.Mar 1 2021, 11:26 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 1 2021, 11:26 AM
Herald added a subscriber: vkmr. · View Herald Transcript

I didn't recognize that it's still WIP until some point, so some nitpicking comments aren't very useful probably...

llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h
292

Are we somehow limited that the argument must be an OriginalPlan or can it be some Plan? Specifically, what if I want to try some optimization on already cloned VPlan such that I'm not sure if it's profitable or not, so I want to create a clone of the Plan instead of transforming in place. Would I be able to use that clone method?

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
8823

Why don't we use cast similar to line 8721? It's also not clear why we have early continue above, but it might actually have the same answer.

8831

nit: I'd move it out of the loop.

8865

That's mostly copy of the lambda above. Can we unify them somehow?

8967

I think it deserves a dedicated comment, especially because it's surprising to see new recipes created inside the block of code starting with the comment "Remove dead instrutions."

I think that it would be beneficial to address this even in the WIP stage of the patch and not during the final polishing.

llvm/lib/Transforms/Vectorize/VPlan.h
687

Missed in the copy-paste?

Kazhuu added a subscriber: Kazhuu.Mar 3 2021, 8:42 PM
fhahn updated this revision to Diff 335340.Mon, Apr 5, 3:05 PM

Rebased and simplified.