This is an archive of the discontinued LLVM Phabricator instance.

[VPlan] Replace InvariantCond field from VPWidenSelectRecipe.
ClosedPublic

Authored by fhahn on Feb 21 2023, 7:31 AM.

Details

Summary

There is no need to store information about invariance in the recipe.
Replace the fields with checks of the operands using
isDefinedOutsideVectorRegions.

Diff Detail

Event Timeline

fhahn created this revision.Feb 21 2023, 7:31 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 21 2023, 7:31 AM
fhahn requested review of this revision.Feb 21 2023, 7:31 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 21 2023, 7:31 AM
Ayal accepted this revision.Mar 8 2023, 1:55 AM

Nice cleanup! Indicate patch is [NFC]?

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

nit: public: here is now redundant given that class became struct?

966

nit: worth adding getCond() to VPWidenSelectRecipe? (Independent of this patch.)

nit: better place isInvariantCond() method below, after con/destructor?

This revision is now accepted and ready to land.Mar 8 2023, 1:55 AM
This revision was landed with ongoing or failed builds.Mar 10 2023, 6:30 AM
This revision was automatically updated to reflect the committed changes.
fhahn marked an inline comment as done.Mar 10 2023, 8:57 AM
fhahn added inline comments.
llvm/lib/Transforms/Vectorize/VPlan.h
965

Done in the committed version, thanks!

966

nit: worth adding getCond() to VPWidenSelectRecipe? (Independent of this patch.)

Done in 9be8d90e62a1

nit: better place isInvariantCond() method below, after con/destructor?

Done in the committed version, thanks!