Commit b6607eec authored by Sigurd Schneider's avatar Sigurd Schneider Committed by Commit Bot

[arm] Share embedded object constant pool entries

This change reduces accumulated constant pool size on
Octane2.1 from 296kb (74170 32bit words) to 125 kb (31311
32bit words), a 57.7% reduction.

Bug: v8:8054

Change-Id: I7d6f24dadf9e11b49d028df10970fd0bc6229ad6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1672932Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62328}
parent 6ddbb54f
......@@ -4827,12 +4827,13 @@ void Assembler::RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data) {
void Assembler::ConstantPoolAddEntry(int position, RelocInfo::Mode rmode,
intptr_t value) {
DCHECK(rmode != RelocInfo::CONST_POOL);
// We can share CODE_TARGETs because we don't patch the code objects anymore,
// and we make sure we emit only one reloc info for them (thus delta patching)
// will apply the delta only once. At the moment, we do not dedup code targets
// if they are wrapped in a heap object request (value == 0).
// We can share CODE_TARGETs and embedded objects, but we must make sure we
// only emit one reloc info for them (thus delta patching will apply the delta
// only once). At the moment, we do not deduplicate heap object request which
// are indicated by value == 0.
bool sharing_ok = RelocInfo::IsShareableRelocMode(rmode) ||
(rmode == RelocInfo::CODE_TARGET && value != 0);
(rmode == RelocInfo::CODE_TARGET && value != 0) ||
(RelocInfo::IsEmbeddedObjectMode(rmode) && value != 0);
DCHECK_LT(pending_32_bit_constants_.size(), kMaxNumPending32Constants);
if (pending_32_bit_constants_.empty()) {
first_const_pool_32_use_ = position;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment