[PATCH] D76096: [clang] allow const structs/unions/arrays to be constant expressions for C

Nick Desaulniers via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 24 13:37:48 PDT 2023


nickdesaulniers added a comment.

Posting quick benchmarks of linux kernel builds:

ac524886094db58112ca176e1d727330a94634a8 <https://reviews.llvm.org/rGac524886094db58112ca176e1d727330a94634a8> + D151587 <https://reviews.llvm.org/D151587> + D76096 <https://reviews.llvm.org/D76096> + D156154 <https://reviews.llvm.org/D156154>:

  $ hyperfine --prepare 'make LLVM=1 -j128 -s clean' --runs 30 'make LLVM=1 -j128 -s'
  Benchmark 1: make LLVM=1 -j128 -s
    Time (mean ± σ):     65.887 s ±  0.592 s    [User: 4953.517 s, System: 278.530 s]
    Range (min … max):   65.008 s … 68.578 s    30 runs

ac524886094db58112ca176e1d727330a94634a8 <https://reviews.llvm.org/rGac524886094db58112ca176e1d727330a94634a8> (i.e. baseline):

  $ hyperfine --prepare 'make LLVM=1 -j128 -s clean' --runs 30 'make LLVM=1 -j128 -s'
  Benchmark 1: make LLVM=1 -j128 -s
    Time (mean ± σ):     67.140 s ±  0.201 s    [User: 5079.011 s, System: 291.879 s]
    Range (min … max):   66.764 s … 67.579 s    30 runs

---

So it looks like this series speeds up the mean by ~1.9%.  So to partially and proactively answer the question "does this series result in a performance regression?" at least for the linux kernel, it seems like no. But YMMV per codebase.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76096/new/

https://reviews.llvm.org/D76096



More information about the cfe-commits mailing list