[all-commits] [llvm/llvm-project] 4a578b: PPC: Avoid constructing TargetTransformInfo in isH...

Matt Arsenault via All-commits all-commits at lists.llvm.org
Thu Jul 16 10:07:18 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4a578be311736c684214e87aa07800cd76dd2471
      https://github.com/llvm/llvm-project/commit/4a578be311736c684214e87aa07800cd76dd2471
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2026-07-16 (Thu, 16 Jul 2026)

  Changed paths:
    M llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp

  Log Message:
  -----------
  PPC: Avoid constructing TargetTransformInfo in isHardwareLoopProfitable (#209972)

PPCTTIImpl::isHardwareLoopProfitable constructed a throwaway
TargetTransformInfo only to call CodeMetrics::analyzeBasicBlock. TTI
may contain pipeline configuration state, and should only be queried
from the PassManager. It was also particularly ugly to construct one
here given that we're inside a TTIImpl.

Most of what analyzeBasicBlock computes was not used here. Directly
sum the instruction code size costs, which was the only used component
of the analysis.

Co-authored-by: Claude (Claude Opus 4.8) <noreply at anthropic.com>



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