diff options
| author | David Blaikie <dblaikie@gmail.com> | 2022-08-19 03:33:01 +0000 |
|---|---|---|
| committer | David Blaikie <dblaikie@gmail.com> | 2022-08-19 04:00:21 +0000 |
| commit | d4e0fe62b1aa090527c0cc289cdf3eef0370f064 (patch) | |
| tree | bf2784d8170ad3ae3f57db9c751a8a7af10ff99d /libcxx/include/__algorithm/includes.h | |
| parent | ba1f4cab44513d8407ee8b308e49a94172be26cd (diff) | |
| download | llvm-d4e0fe62b1aa090527c0cc289cdf3eef0370f064.zip llvm-d4e0fe62b1aa090527c0cc289cdf3eef0370f064.tar.gz llvm-d4e0fe62b1aa090527c0cc289cdf3eef0370f064.tar.bz2 | |
Simplify RAV isSameMethod with constexpr if
Owing to the large number of instantiations of this function, this small
change has a small but meaningful difference on the total size of
(especially a debug) build of clang at -O0:
```
FILE SIZE VM SIZE
-------------- --------------
+0.9% +96.9Ki +0.9% +96.9Ki .data.rel.ro
+0.7% +96.7Ki +0.7% +96.7Ki .rela.dyn
+0.0% +18.3Ki +0.0% +18.3Ki .rodata
+0.0% +324 [ = ] 0 [2 Others]
-0.2% -392 -0.2% -392 .gnu.version
-0.0% -441 [ = ] 0 .debug_abbrev
-0.1% -980 -0.1% -980 .gnu.hash
-0.2% -1.53Ki -0.2% -1.53Ki .hash
-0.2% -4.59Ki -0.2% -4.59Ki .dynsym
-0.1% -10.5Ki [ = ] 0 .debug_rnglists
-0.6% -59.0Ki -0.6% -59.0Ki .dynstr
-0.2% -191Ki [ = ] 0 .debug_str_offsets
-3.0% -233Ki -3.0% -233Ki .eh_frame_hdr
-0.7% -244Ki [ = ] 0 .debug_addr
-2.9% -699Ki [ = ] 0 .symtab
-0.6% -884Ki [ = ] 0 .debug_line
-3.0% -932Ki -3.0% -932Ki .eh_frame
-1.0% -1.48Mi -1.0% -1.48Mi .text
-0.6% -2.75Mi [ = ] 0 .debug_info
-7.3% -8.61Mi [ = ] 0 .strtab
-7.3% -17.2Mi [ = ] 0 .debug_str
-2.4% -33.0Mi -0.9% -2.47Mi TOTAL
```
If anyone's got other ideas for how to reduce this further - it's not
especially important, I just came across it while investigating a debug
info size regression, but thought it was interesting enough to poke
around at.
Diffstat (limited to 'libcxx/include/__algorithm/includes.h')
0 files changed, 0 insertions, 0 deletions
