This is an archive of the discontinued LLVM Phabricator instance.

[lld] Estimate think slope size instead of using a magic constant
AbandonedPublic

Authored by serge-sans-paille on Feb 14 2023, 8:47 AM.

Details

Reviewers
int3
thakis
Group Reviewers
Restricted Project
Summary

Historically, the slope size has been manually increased over time as
more code base bump into the "FIXME: thunk range overrun" fatal error.

This provides an adaptive approach where we first (over) estimate the
slope and then use it.

This should result in smaller slopes for the generic case, and large
enough slope in the limit case.

Diff Detail

Event Timeline

Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptFeb 14 2023, 8:47 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
serge-sans-paille requested review of this revision.Feb 14 2023, 8:47 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 14 2023, 8:47 AM
int3 added a comment.Feb 14 2023, 8:59 AM

I'm actually working on a fix for this issue right now. The current code fails to account for alignment, hence the overruns we see. Once that's fixed I think we can stay with the hardcoded slop size.