This is an archive of the discontinued LLVM Phabricator instance.

[VPlan] Print IR flags for VPRecipeWithIRFlags.
ClosedPublic

Authored by fhahn on May 6 2023, 2:36 AM.

Details

Summary

Now that IR flags are modeled as part of VPRecipeWithIRFlags, include
the flags when printing recipes.

Depends on D150027.

Diff Detail

Event Timeline

fhahn created this revision.May 6 2023, 2:36 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 6 2023, 2:36 AM
fhahn requested review of this revision.May 6 2023, 2:36 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 6 2023, 2:36 AM
Ayal added a comment.May 8 2023, 3:03 AM

Hmm, no test seems to dump any fast math flag?

fhahn updated this revision to Diff 520825.May 9 2023, 2:44 PM

Extra tests for FMF printing have been added in faa8f582b9437e67737feb56f28de91242839518.

Printing is done by constructing a FMF object and then printing it.

Ayal added inline comments.May 9 2023, 3:25 PM
llvm/lib/Transforms/Vectorize/VPlan.h
1081

Also under #if as it's used only by printFlags()?

llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
607

switch?

609

Thanks for covering the FMF cases!
Do "exact" and calls also miss test coverage?

fhahn updated this revision to Diff 522762.May 16 2023, 1:28 PM

Added extra tests in 6c35d423c82b and address comments, thanks!

fhahn marked 3 inline comments as done.May 16 2023, 1:29 PM
fhahn added inline comments.
llvm/lib/Transforms/Vectorize/VPlan.h
1081

updated, thanks!

llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
607

Updated, thanks!

609

Extra tests added in 6c35d423c82b

Ayal accepted this revision.May 23 2023, 4:48 AM

This looks good to me, thanks!

llvm/test/Transforms/LoopVectorize/vplan-printing.ll
599

nit: too bad 'fast' is expanded to print all FMFlags rather than simply printing "fast".

This revision is now accepted and ready to land.May 23 2023, 4:48 AM
This revision was landed with ongoing or failed builds.May 23 2023, 12:36 PM
This revision was automatically updated to reflect the committed changes.
fhahn marked 3 inline comments as done.
fhahn marked an inline comment as done.May 23 2023, 1:06 PM
fhahn added inline comments.
llvm/test/Transforms/LoopVectorize/vplan-printing.ll
599

Yep, unfortunately this seems to be custom logic in Instruction