[all-commits] [llvm/llvm-project] cdf183: [CostModel] Add -cost-kind=all costmodel output (#...

David Green via All-commits all-commits at lists.llvm.org
Tue Mar 11 03:55:59 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cdf18331eb51ba5953182a2fb9248640f43a7d13
      https://github.com/llvm/llvm-project/commit/cdf18331eb51ba5953182a2fb9248640f43a7d13
  Author: David Green <david.green at arm.com>
  Date:   2025-03-11 (Tue, 11 Mar 2025)

  Changed paths:
    M llvm/lib/Analysis/CostModel.cpp
    M llvm/test/Analysis/CostModel/AArch64/arith-fp.ll
    M llvm/test/Analysis/CostModel/AArch64/sve-intrinsics.ll

  Log Message:
  -----------
  [CostModel] Add -cost-kind=all costmodel output (#130490)

In order to make the different cost model kinds easier to test, and to
manage the complexity of all the different variants, this patch
introduces a -cost-kind=all option that will print the output of all
cost model kinds. It feel especially helpful for tests that already have
multiple run lines (with / without +fullfp16 for example).

It currently produces the output:
```
Cost Model: Found costs of RThru:1 CodeSize:1 Lat:3 SizeLat:1 for: %F16 = fadd half undef, undef
```

The output is collapsed into a single value if all costs are the same.
Invalid costs print "Invalid" via the normal InstructionCost printing.

Two test files are updated to show some examples with
-intrinsic-cost-strategy=type-based-intrinsic-cost and Invalid costs.
Once we have something we are happy with I will try to use this to
update more tests, as in b021bdbb3997ef6dd13980dc44f24754f15f3652 but
for more variants.



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