This is an archive of the discontinued LLVM Phabricator instance.

[CodeMetrics] use hasOneLiveUse instead of hasOneUse while analyzing inlinable callsites
ClosedPublic

Authored by sinan on Jul 25 2022, 12:36 AM.

Details

Summary

It would be better for CodeMetrics to use hasOneLiveUse while analyzing static and called once callsites, since inline cost now uses hasOneLiveUse instead of hasOneUse to avoid overpessimization on dead constant cases (since this patch https://reviews.llvm.org/D109294).

This change has no noticeable influence now, but it helps improve the accuracy of cost models of passes that use CodeMetrics.

Diff Detail

Event Timeline

sinan created this revision.Jul 25 2022, 12:36 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 25 2022, 12:36 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
sinan requested review of this revision.Jul 25 2022, 12:36 AM
This revision is now accepted and ready to land.Jul 25 2022, 2:10 AM
fhahn accepted this revision.Jul 25 2022, 2:39 AM

LGTM, thanks!

This revision was landed with ongoing or failed builds.Jul 25 2022, 10:47 PM
This revision was automatically updated to reflect the committed changes.