We tested different cap values with a recent commit of Chromium. Our results show that the 32-byte cap yields the smallest binary and all the caps yield similar performance.
Based on the results, we propose to change the cap value to 32-byte.
Details
- Reviewers
vlad.tsyrklevich pcc dberris - Commits
- rGacf005676ebd: Change the cap on the amount of padding for each vtable to 32-byte (previously…
rCRT337622: Change the cap on the amount of padding for each vtable to 32-byte (previously…
rL337622: Change the cap on the amount of padding for each vtable to 32-byte (previously…
Diff Detail
- Build Status
Buildable 20422 Build 20422: arc lint + arc unit
Event Timeline
llvm/lib/Transforms/IPO/LowerTypeTests.cpp | ||
---|---|---|
774–778 | Is it possible to have a reference to the experiment results either through a link or a document or in a comment? |
llvm/lib/Transforms/IPO/LowerTypeTests.cpp | ||
---|---|---|
774–778 | How about a link to the email of the experiment results (http://lists.llvm.org/pipermail/llvm-dev/2018-July/124694.html)? Is the llvm-dev archive considered permanent? |
llvm/lib/Transforms/IPO/LowerTypeTests.cpp | ||
---|---|---|
774–778 | If it could be summarised somewhere in this file, it would be more permanent and less cryptic than the current comment. I can suggest a summary of the methodology, for example, even citing the trade-off being done. Something like: Experiments with some large applications with a non-trivial number of dynamic types have shown a binary size reduction of N% with virtually no measurable runtime overhead. This padding used to be larger (128) and based on more recent experiments (see <link to email or something in the LLVM docs/ directory>) we found that it could be reduced to 32 and get significant binary size reductions with comparable runtime performance. Alternatively, if we can make the number a function of the cache line size (say, instead of 32 use the target's cache line size and derive something like 32 from it) which might/could explain why aligning to these numbers on those boundaries would not cause significant slowdowns but still have good binary size effects/properties. If I read the experiment results I can see that the platforms being built for/tested are 64-bit platforms with (I think) 64-byte cache lines. |
This looks fine if Dean is happy.
llvm/lib/Transforms/IPO/LowerTypeTests.cpp | ||
---|---|---|
775 | Remove the word "now". |
It looks like this patch causes the check-cfi tests to fail, can you please take a look?
Some tests failed because they did not expect the new layouts caused by the change to the padding cap. I modified those tests so that now they accept the new layouts.
Remove the word "now".