This is an archive of the discontinued LLVM Phabricator instance.

[mlgo][inl] Interactive mode: optionally tell the default decision
ClosedPublic

Authored by mtrofin on Apr 7 2023, 10:39 AM.

Details

Summary

This helps training algorithms that may want to sometimes replicate the
default decision. The default decision is presented as an extra feature
called inlining_default. It's not normally exported to save
computation time.

This is only available in interactive mode.

Diff Detail

Event Timeline

mtrofin created this revision.Apr 7 2023, 10:39 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 7 2023, 10:39 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
mtrofin requested review of this revision.Apr 7 2023, 10:39 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 7 2023, 10:39 AM
This revision is now accepted and ready to land.Apr 10 2023, 10:29 AM
mehdi_amini added inline comments.
llvm/lib/Analysis/MLInlineAdvisor.cpp
46

This leads to a use-after-free: you're creating a temporary string that is immediately destroyed but referenced through a StringRef when printing the help.

I pushed a quick fix in 437dfa5b0365 but you may want to tweak this.