[all-commits] [llvm/llvm-project] 1ccc49: [AArch64] Add getCFInstrCost, treat branches as fr...

Florian Hahn via All-commits all-commits at lists.llvm.org
Tue Jun 30 12:34:59 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 1ccc49924aeb7bb5fbd2eb956243d16db3a02b08
      https://github.com/llvm/llvm-project/commit/1ccc49924aeb7bb5fbd2eb956243d16db3a02b08
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2020-06-30 (Tue, 30 Jun 2020)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
    M llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h
    M llvm/test/Analysis/CostModel/AArch64/aggregates.ll
    M llvm/test/Analysis/CostModel/AArch64/cast.ll
    M llvm/test/Analysis/CostModel/AArch64/cmp.ll
    M llvm/test/Analysis/CostModel/AArch64/select.ll
    M llvm/test/Analysis/CostModel/AArch64/shuffle-broadcast.ll
    M llvm/test/Analysis/CostModel/AArch64/store.ll
    M llvm/test/Transforms/LoopVectorize/AArch64/aarch64-predication.ll
    M llvm/test/Transforms/LoopVectorize/AArch64/extractvalue-no-scalarization-required.ll
    M llvm/test/Transforms/LoopVectorize/AArch64/predication_costs.ll

  Log Message:
  -----------
  [AArch64] Add getCFInstrCost, treat branches as free for throughput.

D79164/2596da31740f changed getCFInstrCost to return 1 per default.
AArch64 did not have its own implementation, hence the throughput cost
of CFI instructions is overestimated. On most cores, most branches should
be predicated and essentially free throughput wise.

This restores a 9% performance regression on a SPEC2006 benchmark on
AArch64 with -O3 LTO & PGO.

This patch effectively restores pre 2596da31740f behavior for AArch64
and undoes the AArch64 test changes of the patch.

Reviewers: samparker, dmgreen, anemet

Reviewed By: samparker

Differential Revision: https://reviews.llvm.org/D82755




More information about the All-commits mailing list