This is an archive of the discontinued LLVM Phabricator instance.

[llvm][NFC] Factor some common data in InlineAdvice
ClosedPublic

Authored by mtrofin on Jun 9 2020, 2:36 PM.

Details

Summary

Other derivations will all want to emit optimization remarks and, as
part of that, use debug info.

Additionally, drive-by const-ing.

Diff Detail

Event Timeline

mtrofin created this revision.Jun 9 2020, 2:36 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 9 2020, 2:36 PM
davidxl added inline comments.Jun 10 2020, 4:11 PM
llvm/include/llvm/Analysis/InlineAdvisor.h
51

why making it public?

mtrofin marked 2 inline comments as done.Jun 10 2020, 4:14 PM
mtrofin added inline comments.
llvm/include/llvm/Analysis/InlineAdvisor.h
51

see D81515 - it is a good-enough Advice if we don't want to track any state between advice and inline, and there are a few cases like that in the MLInlineAdvisor (e.g. if the call site or callee are 'inline never')

mtrofin marked an inline comment as done.Jun 10 2020, 4:30 PM
davidxl accepted this revision.Jun 10 2020, 7:56 PM

lgtm

This revision is now accepted and ready to land.Jun 10 2020, 7:56 PM
This revision was automatically updated to reflect the committed changes.