IT lexicon › Programming › VPlan

VPlan

Programming På svenska → Updated: 2026-11-07

The LLVM loop vectorizer's own model of the vectorized loop, built before any real IR gets rewritten.

The old loop vectorizer made its decisions and rewrote LLVM IR in the same pass, which made it hard to weigh one option against another. VPlan, proposed by Intel engineers in 2016–2017, splits the job. First the vectorizer builds one or more plans, each a hierarchical graph of blocks holding "recipes" that describe how every instruction should be widened, masked or left scalar. The cost model then picks a plan and a vector width, and only then is code generated.

The migration has been going on for years, one recipe at a time. The payoff is that transformations such as tail folding and epilogue vectorization can be expressed as edits to the plan rather than as special cases scattered across the code.

← Back to the lexicon