This is an archive of the discontinued LLVM Phabricator instance.

ControlHeightReduction: Remove assert check in shouldApply
ClosedPublic

Authored by MatzeB on Sep 12 2022, 9:21 AM.

Details

Summary

Remove assertion checking for non-empty ProfileSummaryInfo.

Diff Detail

Event Timeline

MatzeB created this revision.Sep 12 2022, 9:21 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 12 2022, 9:21 AM
MatzeB requested review of this revision.Sep 12 2022, 9:21 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 12 2022, 9:21 AM

I keep hitting this assertion when using LTO+PGO with an assertion enabled LLVM/clang build for the llvm-test-suite. While I haven't debugged this to the end, I suspect there is some oddities in the llvm-test-suite build not passing the ThinLTO or PGO parameters down properly to the google-benchmark files in there and ThinLTO choosing a partition where none of the functions has profile info.

While this is a somewhat badly setup build it should not hit an assertion in the compiler, can we drop this?

MatzeB edited the summary of this revision. (Show Details)Sep 12 2022, 11:33 AM
Kobzol added a subscriber: Kobzol.Oct 9 2022, 6:11 AM
nikic accepted this revision.Oct 9 2022, 6:25 AM
nikic added a subscriber: nikic.

LGTM

We also hit this assert here: https://github.com/rust-lang/rust/pull/101403#issuecomment-1272519304 I believe in that case the problem is that some of the modules participating in ThinLTO do not have PGO information (and that's fine).

This revision is now accepted and ready to land.Oct 9 2022, 6:25 AM

Hi @MatzeB, this assert is currently blocking progress on using LTO for the Rust compiler. If there any not any objections to this patch, could you land it please? Thanks!

This revision was automatically updated to reflect the committed changes.