aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/StackFrameLayoutAnalysisPass.cpp
diff options
context:
space:
mode:
authorFlorian Hahn <flo@fhahn.com>2025-10-02 22:00:22 +0100
committerGitHub <noreply@github.com>2025-10-02 22:00:22 +0100
commit8f2466bc72a5ab163621cb1bf4bf53a27f1cefe7 (patch)
tree70044011f4ac7c6327f36d0ae1aca707e5e69845 /llvm/lib/CodeGen/StackFrameLayoutAnalysisPass.cpp
parentf4784fd13fb77a609920a06af99c3602bdec530f (diff)
downloadllvm-8f2466bc72a5ab163621cb1bf4bf53a27f1cefe7.zip
llvm-8f2466bc72a5ab163621cb1bf4bf53a27f1cefe7.tar.gz
llvm-8f2466bc72a5ab163621cb1bf4bf53a27f1cefe7.tar.bz2
Reapply "[VPlan] Compute cost of more replicating loads/stores in ::computeCost. (#160053)" (#161724)
This reverts commit f61be4352592639a0903e67a9b5d3ec664ad4d23. Recommit a small fix handling scalarization overhead consistently with legacy cost model if a load is used directly as operand of another memory operation, which fixes https://github.com/llvm/llvm-project/issues/161404. Original message: Update VPReplicateRecipe::computeCost to compute costs of more replicating loads/stores. There are 2 cases that require extra checks to match the legacy cost model: 1. If the pointer is based on an induction, the legacy cost model passes its SCEV to getAddressComputationCost. In those cases, still fall back to the legacy cost. SCEV computations will be added as follow-up 2. If a load is used as part of an address of another load, the legacy cost model skips the scalarization overhead. Those cases are currently handled by a usedByLoadOrStore helper. Note that getScalarizationOverhead also needs updating, because when the legacy cost model computes the scalarization overhead, scalars have not been collected yet, so we can't each for replicating recipes to skip their cost, except other loads. This again can be further improved by modeling inserts/extracts explicitly and consistently, and compute costs for those operations directly where needed. PR: https://github.com/llvm/llvm-project/pull/160053
Diffstat (limited to 'llvm/lib/CodeGen/StackFrameLayoutAnalysisPass.cpp')
0 files changed, 0 insertions, 0 deletions