mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
Change the cap on the amount of padding for each vtable to 32-byte (previously it was 128-byte)
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. Patch by Zhaomo Yang! Differential Revision: https://reviews.llvm.org/D49405 llvm-svn: 337622
This commit is contained in:
parent
f463eb1647
commit
5c2365311a
@ -771,10 +771,12 @@ void LowerTypeTestsModule::buildBitSetsFromGlobalVariables(
|
|||||||
// Compute the amount of padding required.
|
// Compute the amount of padding required.
|
||||||
uint64_t Padding = NextPowerOf2(InitSize - 1) - InitSize;
|
uint64_t Padding = NextPowerOf2(InitSize - 1) - InitSize;
|
||||||
|
|
||||||
// Cap at 128 was found experimentally to have a good data/instruction
|
// Experiments of different caps with Chromium on both x64 and ARM64
|
||||||
// overhead tradeoff.
|
// have shown that the 32-byte cap generates the smallest binary on
|
||||||
if (Padding > 128)
|
// both platforms while different caps yield similar performance.
|
||||||
Padding = alignTo(InitSize, 128) - InitSize;
|
// (see https://lists.llvm.org/pipermail/llvm-dev/2018-July/124694.html)
|
||||||
|
if (Padding > 32)
|
||||||
|
Padding = alignTo(InitSize, 32) - InitSize;
|
||||||
|
|
||||||
GlobalInits.push_back(
|
GlobalInits.push_back(
|
||||||
ConstantAggregateZero::get(ArrayType::get(Int8Ty, Padding)));
|
ConstantAggregateZero::get(ArrayType::get(Int8Ty, Padding)));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user