This is an archive of the discontinued LLVM Phabricator instance.

[ThinLTO] Double bits of module hash used for renaming
ClosedPublic

Authored by tejohnson on Oct 30 2017, 7:11 PM.

Details

Summary

Use 64 instead of 32 bits of the module hash as the suffix when renaming
after promotion to reduce the likelihood of a collision (which we
observed in a binary when using 32 bits).

Diff Detail

Repository
rL LLVM

Event Timeline

tejohnson created this revision.Oct 30 2017, 7:11 PM
pcc accepted this revision.Oct 30 2017, 7:25 PM

LGTM

include/llvm/IR/ModuleSummaryIndex.h
746 ↗(On Diff #120924)

I'd write uint64_t(ModHash[0]) << 32 to make it unambiguous what is being extended.

This revision is now accepted and ready to land.Oct 30 2017, 7:25 PM
tejohnson marked an inline comment as done.Oct 31 2017, 5:55 AM
tejohnson updated this revision to Diff 120968.Oct 31 2017, 5:56 AM

Address comment

This revision was automatically updated to reflect the committed changes.