[llvm] [RFC][LV] VPlan-based cost model (PR #67647)

Shih-Po Hung via llvm-commits llvm-commits at lists.llvm.org
Mon May 6 09:20:56 PDT 2024


arcbbb wrote:

> > At the moment, computing costs is framed in terms of the IR instructions we generate (i.e. what `::execute` will generate) and target-specific info is pulled in via TTI only. In that sense, I think it makes sense to keep them defined in the same place. Do you by any chance have some examples where TTI would not be sufficient for downstream customizations?

I'm inclined to proceed with your approach outlined in #67934. However, I believe it's important to address the ongoing discussion in this thread regarding the potential separation of the cost model from VPlan.

@nikolaypanchenko's observation on TTI being caller-agnostic highlights the need for callers to estimate additional context-related information.
Expanding on this, while TTI does offer target-specific information at the instruction level, the consideration for cost could extend beyond a recipe level and cover basic block and cross basic-block levels. By separating the cost model from VPlan, we can integrate heuristics at both levels, including considerations like register pressure, spills, and fills estimates. Such an approach aligns with our overall objectives by providing flexibility and granularity in our cost modeling approach.
Would you agree that this separation could enhance our cost modeling capabilities?

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


More information about the llvm-commits mailing list