Skip to content

Commit 71cc705

Browse files
[lld][InstrProf] Do not use cstring offset hashes in function order for compression
Using the hashes of cstring offset turned to have very minimal impact on the compressed size of large iOS apps. The patch removes that code, thus the cstring symbols will be treated the same way as other defined symbols in terms of hashes calculation.
1 parent 564fd62 commit 71cc705

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

lld/MachO/BPSectionOrderer.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,8 @@ getRelocHash(const Reloc &reloc,
5353
kind = ("Section " + Twine(static_cast<uint8_t>(isec->kind()))).str();
5454
if (auto *sym = reloc.referent.dyn_cast<Symbol *>()) {
5555
kind += (" Symbol " + Twine(static_cast<uint8_t>(sym->kind()))).str();
56-
if (auto *d = dyn_cast<Defined>(sym)) {
57-
if (isa_and_nonnull<CStringInputSection>(isec))
58-
return getRelocHash(kind, 0, isec->getOffset(d->value), reloc.addend);
56+
if (auto *d = dyn_cast<Defined>(sym))
5957
return getRelocHash(kind, sectionIdx.value_or(0), d->value, reloc.addend);
60-
}
6158
}
6259
return getRelocHash(kind, sectionIdx.value_or(0), 0, reloc.addend);
6360
}

0 commit comments

Comments
 (0)