This is an archive of the discontinued LLVM Phabricator instance.

[LV] Expose the primary IV as part of the plan, lit trip count (NFC).
AbandonedPublic

Authored by fhahn on Apr 6 2020, 12:16 PM.

Details

Reviewers
rengolin
Summary

VPRecipeBuilder::createBlockInMask currently directly uses
Legal->getPrimaryInduction(). This tightly couples mask code-generation
with Legal. This patch introduces a new PrimaryIV VPValue to the VPlan
(similar to the BackedgeTakenCount), which can be used for masking,
instead of querying legal directly.

This uncouples code-generation from Legal and allows for changing the
primary IV before code-generation.

Diff Detail