[all-commits] [llvm/llvm-project] 2f083b: [AArch64] Fix resource length computation for STP....

Florian Hahn via All-commits all-commits at lists.llvm.org
Fri Feb 16 08:10:21 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2f083b364f43fb12b2fdf23935e1f0b6958d0882
      https://github.com/llvm/llvm-project/commit/2f083b364f43fb12b2fdf23935e1f0b6958d0882
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2024-02-16 (Fri, 16 Feb 2024)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64StorePairSuppress.cpp
    M llvm/test/CodeGen/AArch64/arm64-stur.ll
    M llvm/test/CodeGen/AArch64/merge-store.ll
    M llvm/test/CodeGen/AArch64/storepairsuppress.ll

  Log Message:
  -----------
  [AArch64] Fix resource length computation for STP. (#81749)

On some uArchs, `STP [s|d], [s|d]` first combines the 2 input registers
in a single register using a vector execution unit. IIUC
AArch64StorePairSuppress tries to prevent forming STPs in case the
critical resource are the vector units, in order to prevent adding more
pressure on those units.

The implementation however simply computes the new critical resource
length by adding resource for another STP. If load/store units are the
critical resource, this means we increase that length by one, and
incorrectly prevent forming the STP.

This patch adjusts the resource computation by also removing 2 STRs, as
introducing a STP will remove 2 single stores. This should more
accurately reflect the resource usage after introducing an STP, and does
not prevent forming STPs if load/store units are the critical resources;
in those cases, STP can actually help to reduce resource usage.

PR: https://github.com/llvm/llvm-project/pull/81749



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