[all-commits] [llvm/llvm-project] a083e1: [VPlan] Add the cost of spills when considering re...

John Brawn via All-commits all-commits at lists.llvm.org
Wed Mar 18 08:31:02 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a083e19efeb122131843722990ba1e033d1d2f3d
      https://github.com/llvm/llvm-project/commit/a083e19efeb122131843722990ba1e033d1d2f3d
  Author: John Brawn <john.brawn at arm.com>
  Date:   2026-03-18 (Wed, 18 Mar 2026)

  Changed paths:
    M llvm/include/llvm/Analysis/TargetTransformInfo.h
    M llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
    M llvm/lib/Analysis/TargetTransformInfo.cpp
    M llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h
    M llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
    M llvm/lib/Transforms/Vectorize/VPlanAnalysis.cpp
    M llvm/lib/Transforms/Vectorize/VPlanAnalysis.h
    M llvm/test/Transforms/LoopVectorize/AArch64/maxbandwidth-regpressure.ll
    A llvm/test/Transforms/LoopVectorize/ARM/mve-reg-pressure-spills.ll
    M llvm/test/Transforms/LoopVectorize/LoongArch/reg-usage.ll

  Log Message:
  -----------
  [VPlan] Add the cost of spills when considering register pressure (#179646)

Currently when considering register pressure is enabled, we reject any
VF that has higher pressure than the number of registers. However this
can result in failing to vectorize in cases where it's beneficial, as
the cost of the extra spills is less than the benefit we get from
vectorizing.

Deal with this by instead calculating the cost of spills and adding that
to the rest of the cost, so we can detect this kind of situation and
still vectorize while avoiding vectorizing in cases where the extra cost
makes it not with it.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list