[all-commits] [llvm/llvm-project] 79909c: [NFC][InstCombine] fold-nested-selects: fix profit...

Roman Lebedev via All-commits all-commits at lists.llvm.org
Mon Dec 12 14:04:10 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 79909c031d43de21ce9c10394a5aac08bec0a874
      https://github.com/llvm/llvm-project/commit/79909c031d43de21ce9c10394a5aac08bec0a874
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2022-12-13 (Tue, 13 Dec 2022)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
    M llvm/test/Transforms/InstCombine/nested-select.ll

  Log Message:
  -----------
  [NFC][InstCombine] fold-nested-selects: fix profitability check

We'd check the cost of the wrong 'cond', after potentially skipping `not`.


  Commit: 079cd4a52f398ccf4a04cf47f2c3c536a5011585
      https://github.com/llvm/llvm-project/commit/079cd4a52f398ccf4a04cf47f2c3c536a5011585
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2022-12-13 (Tue, 13 Dec 2022)

  Changed paths:
    M llvm/tools/llvm-exegesis/lib/BenchmarkResult.cpp
    M llvm/tools/llvm-exegesis/lib/LlvmState.cpp
    M llvm/tools/llvm-exegesis/lib/LlvmState.h

  Log Message:
  -----------
  [NFC][Exegesis] Don't recompute opcode/reg names on each YAML write (-38% runtime)

This reducer runtime of
```
$ ./bin/llvm-exegesis -mode=inverse_throughput --opcode-index=-1 --benchmarks-file=/dev/null --dump-object-to-disk=0 --measurements-print-progress --skip-measurements
```
from 3m44s to 2m17s, aka -38%.
But more importantly, we go from 400 *million* memory allocations
down to just 100 million, aka -75%.

But really, the big missing thing is doing everything in a single thread.
Sure, we can't do anything when measuring, but when we are not measuring,
we should just prepare (codegen) everything via all threads.
That should parallelize quite well.


Compare: https://github.com/llvm/llvm-project/compare/f529a9f324a8...079cd4a52f39


More information about the All-commits mailing list