[llvm] [VPlan] Add initial VPScalarEvolution, use to get trip count SCEV (NFC) (PR #94464)

Renato Golin via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 11 00:41:03 PDT 2024


rengolin wrote:

> Users are expected to be spread across new analyses and transforms. It could also be a single `getSCEVForVPValue(VPValue *VPV, ScalarEvolution &SE)` entry point instead of providing a class, which may be more convenient?

Right, with spread usage comes passing the helper classes around, unless they're part of some other existing object that already gets passed around, or is in the global context.

In an object, this could even be in the `VPInstruction` itself, where each different instruction implements its own thing and then you just call `VPOp->getSCEV()`. As a global context (either an actual static global struct or within some existing shared context struct), this would likely be a long switch/case for each op.

https://github.com/llvm/llvm-project/pull/94464


More information about the llvm-commits mailing list