diff options
author | Florian Hahn <flo@fhahn.com> | 2020-09-09 10:24:49 +0100 |
---|---|---|
committer | Florian Hahn <flo@fhahn.com> | 2020-09-09 11:20:13 +0100 |
commit | 3a61bfb027a623807a30adb496ab62203c9b4ba5 (patch) | |
tree | 337788057ea7d2fe2021d6b465f486e2a2f1e179 /llvm/tools/llvm-objdump/llvm-objdump.cpp | |
parent | 8cb8cea1bd7f03330fc310b8993a3be89da90c1d (diff) | |
download | llvm-3a61bfb027a623807a30adb496ab62203c9b4ba5.zip llvm-3a61bfb027a623807a30adb496ab62203c9b4ba5.tar.gz llvm-3a61bfb027a623807a30adb496ab62203c9b4ba5.tar.bz2 |
[DomTree] Use SmallVector<DomTreeNodeBase *, 4> instead of std::vector.
Currentl DomTreeNodeBase is using std::vectot to store it's children.
Using SmallVector should be more efficient in terms of compile-time.
A size of 4 seems to be the sweet-spot in terms of compile-time,
according to
http://llvm-compile-time-tracker.com/compare.php?from=9933188c90615c9c264ebb69117f09726e909a25&to=d7a801d027648877b20f0e00e822a7a64c58d976&stat=instructions
This results in the following geomean improvements
```
geomean insts max rss
O3 -0.31 % +0.02 %
ReleaseThinLTO -0.35 % -0.12 %
ReleaseLTO -0.28 % -0.12 %
O0 -0.06 % -0.02 %
NewPM O3 -0.36 % +0.05 %
ReleaseThinLTO (link only) -0.44 % -0.10 %
ReleaseLTO-g (link only): -0.32 % -0.03 %
```
I am not sure if there's any other benefits of using std::vector over
SmallVector.
Reviewed By: kuhar, asbirlea
Differential Revision: https://reviews.llvm.org/D87319
Diffstat (limited to 'llvm/tools/llvm-objdump/llvm-objdump.cpp')
0 files changed, 0 insertions, 0 deletions