5chmidti wrote:
I ran this check on all of `clang/` and `clang-tools-extra/` and got no
compilation errors from too aggressively changing things to `constexpr`.
Some perf info from running the checks enabled in LLVM + this check:
Running on: `clang/lib/Sema/SemaExprCXX.cpp` (1 diag):
```text
===-------------------------------------------------------------------------===
clang-tidy checks profiling
===-------------------------------------------------------------------------===
Total Execution Time: 6.4289 seconds (6.4453 wall clock)
---User Time--- --System Time-- --User+System-- ---Wall Time--- ---
Name ---
0.7024 ( 20.6%) 0.7401 ( 24.5%) 1.4424 ( 22.4%) 1.4457 ( 22.4%)
misc-unused-using-decls
0.6188 ( 18.2%) 0.1852 ( 6.1%) 0.8040 ( 12.5%) 0.8069 ( 12.5%)
llvm-qualified-auto
0.2833 ( 8.3%) 0.2724 ( 9.0%) 0.5556 ( 8.6%) 0.5581 ( 8.7%)
llvm-prefer-isa-or-dyn-cast-in-conditionals
0.2288 ( 6.7%) 0.2426 ( 8.0%) 0.4714 ( 7.3%) 0.4715 ( 7.3%)
misc-misleading-identifier
0.2271 ( 6.7%) 0.2140 ( 7.1%) 0.4411 ( 6.9%) 0.4423 ( 6.9%)
misc-confusable-identifiers
0.2132 ( 6.3%) 0.2268 ( 7.5%) 0.4400 ( 6.8%) 0.4402 ( 6.8%)
misc-definitions-in-headers
0.1938 ( 5.7%) 0.2066 ( 6.8%) 0.4003 ( 6.2%) 0.4008 ( 6.2%)
misc-non-copyable-objects
0.1371 ( 4.0%) 0.1386 ( 4.6%) 0.2757 ( 4.3%) 0.2750 ( 4.3%)
misc-unconventional-assign-operator
0.1235 ( 3.6%) 0.1296 ( 4.3%) 0.2531 ( 3.9%) 0.2549 ( 4.0%)
misc-constexpr
0.1146 ( 3.4%) 0.1188 ( 3.9%) 0.2334 ( 3.6%) 0.2346 ( 3.6%)
misc-misplaced-const
0.1176 ( 3.5%) 0.1061 ( 3.5%) 0.2238 ( 3.5%) 0.2236 ( 3.5%)
misc-redundant-expression
0.1074 ( 3.2%) 0.1110 ( 3.7%) 0.2184 ( 3.4%) 0.2208 ( 3.4%)
misc-use-internal-linkage
0.0665 ( 2.0%) 0.0720 ( 2.4%) 0.1385 ( 2.2%) 0.1400 ( 2.2%)
misc-new-delete-overloads
0.0615 ( 1.8%) 0.0640 ( 2.1%) 0.1255 ( 2.0%) 0.1257 ( 2.0%)
llvm-prefer-register-over-unsigned
0.0548 ( 1.6%) 0.0572 ( 1.9%) 0.1120 ( 1.7%) 0.1121 ( 1.7%)
llvm-twine-local
0.0444 ( 1.3%) 0.0328 ( 1.1%) 0.0771 ( 1.2%) 0.0773 ( 1.2%)
llvm-namespace-comment
0.0385 ( 1.1%) 0.0312 ( 1.0%) 0.0697 ( 1.1%) 0.0695 ( 1.1%)
llvm-else-after-return
0.0325 ( 1.0%) 0.0351 ( 1.2%) 0.0677 ( 1.1%) 0.0674 ( 1.0%)
misc-unused-alias-decls
0.0294 ( 0.9%) 0.0255 ( 0.8%) 0.0549 ( 0.9%) 0.0547 ( 0.8%)
misc-static-assert
0.0108 ( 0.3%) 0.0100 ( 0.3%) 0.0208 ( 0.3%) 0.0207 ( 0.3%)
misc-uniqueptr-reset-release
0.0018 ( 0.1%) 0.0018 ( 0.1%) 0.0036 ( 0.1%) 0.0035 ( 0.1%)
misc-misleading-bidirectional
0.0000 ( 0.0%) 0.0000 ( 0.0%) 0.0000 ( 0.0%) 0.0000 ( 0.0%)
misc-throw-by-value-catch-by-reference
3.4077 (100.0%) 3.0212 (100.0%) 6.4289 (100.0%) 6.4453 (100.0%) Total
```
Running on `clang/utils/TableGen/RISCVVEmitter.cpp` (3 diags):
```text
===-------------------------------------------------------------------------===
clang-tidy checks profiling
===-------------------------------------------------------------------------===
Total Execution Time: 1.1712 seconds (1.1748 wall clock)
---User Time--- --System Time-- --User+System-- ---Wall Time--- ---
Name ---
0.1293 ( 20.2%) 0.1265 ( 23.8%) 0.2557 ( 21.8%) 0.2569 ( 21.9%)
misc-unused-using-decls
0.0673 ( 10.5%) 0.0576 ( 10.9%) 0.1249 ( 10.7%) 0.1257 ( 10.7%)
llvm-prefer-isa-or-dyn-cast-in-conditionals
0.0833 ( 13.0%) 0.0275 ( 5.2%) 0.1108 ( 9.5%) 0.1112 ( 9.5%)
llvm-qualified-auto
0.0434 ( 6.8%) 0.0407 ( 7.7%) 0.0840 ( 7.2%) 0.0843 ( 7.2%)
misc-misleading-identifier
0.0436 ( 6.8%) 0.0385 ( 7.2%) 0.0820 ( 7.0%) 0.0817 ( 7.0%)
misc-confusable-identifiers
0.0417 ( 6.5%) 0.0387 ( 7.3%) 0.0804 ( 6.9%) 0.0806 ( 6.9%)
misc-definitions-in-headers
0.0383 ( 6.0%) 0.0359 ( 6.8%) 0.0742 ( 6.3%) 0.0744 ( 6.3%)
misc-non-copyable-objects
0.0275 ( 4.3%) 0.0217 ( 4.1%) 0.0492 ( 4.2%) 0.0490 ( 4.2%)
misc-redundant-expression
0.0229 ( 3.6%) 0.0215 ( 4.1%) 0.0445 ( 3.8%) 0.0443 ( 3.8%)
misc-constexpr
0.0229 ( 3.6%) 0.0203 ( 3.8%) 0.0432 ( 3.7%) 0.0431 ( 3.7%)
misc-unconventional-assign-operator
0.0200 ( 3.1%) 0.0191 ( 3.6%) 0.0391 ( 3.3%) 0.0391 ( 3.3%)
misc-misplaced-const
0.0199 ( 3.1%) 0.0185 ( 3.5%) 0.0384 ( 3.3%) 0.0390 ( 3.3%)
misc-use-internal-linkage
0.0154 ( 2.4%) 0.0081 ( 1.5%) 0.0235 ( 2.0%) 0.0236 ( 2.0%)
llvm-namespace-comment
0.0114 ( 1.8%) 0.0111 ( 2.1%) 0.0225 ( 1.9%) 0.0229 ( 1.9%)
llvm-prefer-register-over-unsigned
0.0115 ( 1.8%) 0.0104 ( 2.0%) 0.0219 ( 1.9%) 0.0222 ( 1.9%)
misc-new-delete-overloads
0.0104 ( 1.6%) 0.0102 ( 1.9%) 0.0206 ( 1.8%) 0.0207 ( 1.8%)
llvm-twine-local
0.0122 ( 1.9%) 0.0083 ( 1.6%) 0.0205 ( 1.8%) 0.0205 ( 1.7%)
misc-static-assert
0.0108 ( 1.7%) 0.0074 ( 1.4%) 0.0182 ( 1.6%) 0.0181 ( 1.5%)
llvm-else-after-return
0.0069 ( 1.1%) 0.0067 ( 1.3%) 0.0135 ( 1.2%) 0.0135 ( 1.2%)
misc-unused-alias-decls
0.0013 ( 0.2%) 0.0012 ( 0.2%) 0.0025 ( 0.2%) 0.0025 ( 0.2%)
misc-uniqueptr-reset-release
0.0006 ( 0.1%) 0.0008 ( 0.1%) 0.0014 ( 0.1%) 0.0014 ( 0.1%)
misc-misleading-bidirectional
0.0000 ( 0.0%) 0.0000 ( 0.0%) 0.0000 ( 0.0%) 0.0000 ( 0.0%)
misc-throw-by-value-catch-by-reference
0.6406 (100.0%) 0.5306 (100.0%) 1.1712 (100.0%) 1.1748 (100.0%) Total
```
https://github.com/llvm/llvm-project/pull/146553
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits