[PATCH] D94739: ADT: Fix reference invalidation in SmallVector::emplace_back and the size+value version of SmallVector::assign
Duncan P. N. Exon Smith via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 15 15:41:17 PST 2021
dexonsmith added a reviewer: nikic.
dexonsmith added a subscriber: nikic.
dexonsmith added a comment.
I did a spot check of code size / compile-time, capturing clang's binary size in KiB (78460KiB => 78484KiB) and 5 runs of compiling VirtualFileSystem.cpp.o (looks like it's in the noise):
78460 baseline/build/bin/clang
3.84 real 3.74 user 0.09 sys
3.85 real 3.75 user 0.09 sys
3.83 real 3.73 user 0.09 sys
3.84 real 3.73 user 0.10 sys
3.84 real 3.74 user 0.09 sys
78484 invalidation/build/bin/clang
3.83 real 3.73 user 0.09 sys
3.87 real 3.77 user 0.09 sys
3.83 real 3.73 user 0.09 sys
3.83 real 3.72 user 0.10 sys
3.90 real 3.80 user 0.09 sys
"baseline" is ceaf0110ff5e0c2de1f03d65d13703d34d0d5737 <https://reviews.llvm.org/rGceaf0110ff5e0c2de1f03d65d13703d34d0d5737>, and "invalidation" has this patch applied on top.
I also checked a big file, X86ISelLowering.cpp.o:
78460 baseline/build/bin/clang
31.05 real 30.70 user 0.34 sys
30.83 real 30.46 user 0.36 sys
30.94 real 30.59 user 0.34 sys
31.15 real 30.76 user 0.38 sys
30.80 real 30.43 user 0.36 sys
78484 invalidation/build/bin/clang
31.67 real 30.71 user 0.37 sys
30.90 real 30.53 user 0.36 sys
31.53 real 31.16 user 0.35 sys
31.30 real 30.93 user 0.36 sys
31.01 real 30.65 user 0.34 sys
Best of 5 gives 30.43 vs. 30.53, which is less than 0.4%; not sure if that's significant (certainly my environment isn't stabilized, so it's not a high quality result).
@nikic, maybe I can trigger your compile-time tracker myself (I just sent you an email), but if that doesn't work out, any chance you could kick off a perf run for this patch as well?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94739/new/
https://reviews.llvm.org/D94739
More information about the llvm-commits
mailing list