This is an archive of the discontinued LLVM Phabricator instance.

[VPlan] Move setDebugLocFromInst to VPTransformState (NFC).
ClosedPublic

Authored by fhahn on Jun 27 2022, 8:46 AM.

Details

Summary

The moved helpers are only used for codegen. It will allow moving the
remaining ::execute implementations out of LoopVectorize.cpp.

Diff Detail

Event Timeline

fhahn created this revision.Jun 27 2022, 8:46 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 27 2022, 8:46 AM
fhahn requested review of this revision.Jun 27 2022, 8:46 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 27 2022, 8:47 AM
Herald added a subscriber: vkmr. · View Herald Transcript
Ayal accepted this revision.Jun 27 2022, 1:00 PM
Ayal added inline comments.
llvm/lib/Transforms/Vectorize/VPlan.cpp
251

nit: while we're here, this function could use an early-exit or two, potentially via return Builder.SetCurrentDebugLocation()'s, possibly in a separate patch.

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

\p Ptr?
Note that the original version uses ILV's Builder, this one uses State's Builder, but it's fine.

This revision is now accepted and ready to land.Jun 27 2022, 1:00 PM
This revision was landed with ongoing or failed builds.Jul 2 2022, 7:19 AM
This revision was automatically updated to reflect the committed changes.
fhahn marked an inline comment as done.Jul 4 2022, 1:28 AM
fhahn added inline comments.
llvm/lib/Transforms/Vectorize/VPlan.cpp
251

I added an early exit for the cast that V isn't an instruction in b4694229aa9d7a09d58a8e59339d14570437daf2

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

Thanks, I removed it from the reference to to dead Ptr argument in the committed version.

Ayal added inline comments.Jul 5 2022, 1:14 AM
llvm/lib/Transforms/Vectorize/VPlan.cpp
251

Thanks! Another early exit can be added for the case when FSDiscriminator is enabled...