Page MenuHomePhabricator

[VPlan] Add VPCanonicalIVRecipe, partly retire createInductionVariable (WIP).
Needs ReviewPublic

Authored by fhahn on Nov 4 2021, 3:55 PM.



At the moment, the primary induction variable for the vector loop is
created as part of the skeleton creation. This is tied to creating the
vector loop latch outside of VPlan. This prevents from modeling the
*whole* vector loop in VPlan, which in turn is required to model
preheader and exit blocks in VPlan as well.

This patch introduces a new recipe VPCanonicalIVRecipe to represent the
primary IV in VPlan and InductionIncrement{NUW} opcodes for
VPInstruction to model the increment.

This allows us to partly retire createInductionVariable. At the moment,
a bit of patching up is done after executing all blocks in the plan.

This is still WIP as there are a couple of test failures left to fix,
but I'd like to share it so the general direction can be reviewed.

Diff Detail

Event Timeline

fhahn created this revision.Nov 4 2021, 3:55 PM
fhahn requested review of this revision.Nov 4 2021, 3:55 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 4 2021, 3:55 PM
Herald added a subscriber: vkmr. · View Herald Transcript
fhahn updated this revision to Diff 389591.Wed, Nov 24, 12:22 PM

Rebased, almost all tests should pass now.

The remaining failures are due to the code not having access to the original debug location in the VPlan codegen.