This is an archive of the discontinued LLVM Phabricator instance.

[ThinLTO] Remove BlockCount for non partial sample profile builds
ClosedPublic

Authored by tejohnson on Apr 19 2023, 3:02 PM.

Details

Summary

As pointed out in
https://discourse.llvm.org/t/undeterministic-thin-index-file/69985, the
block count added to distributed ThinLTO index files breaks incremental
builds on ThinLTO - if any linked file has a different number of BBs,
then the accumulated sum placed in the index files will change, causing
all ThinLTO backend compiles to be redone.

The block count is only used for scaling of partial sample profiles, and
was added in D80403 for D79831.

This patch simply removes this field from the index files of non partial
sample profile compiles, which is NFC on the output of the compiler.

We subsequently need to see if this can be removed for partial sample
profiles without signficant performance loss, or redesigned in a way
that does not destroy caching.

Diff Detail

Event Timeline

tejohnson created this revision.Apr 19 2023, 3:02 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptApr 19 2023, 3:02 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript
tejohnson requested review of this revision.Apr 19 2023, 3:02 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 19 2023, 3:02 PM
Herald added a subscriber: MaskRay. · View Herald Transcript
davidxl accepted this revision.Apr 20 2023, 10:54 AM
davidxl added a subscriber: davidxl.

lgtm

This revision is now accepted and ready to land.Apr 20 2023, 10:54 AM
This revision was landed with ongoing or failed builds.Apr 20 2023, 11:45 AM
This revision was automatically updated to reflect the committed changes.