This is an archive of the discontinued LLVM Phabricator instance.

[AlwaysInliner] Emit inline remark only when successful
ClosedPublic

Authored by ellis on Mar 17 2022, 1:09 PM.

Details

Summary

Failures in InlineFunction() are caught after D121722, but emitInlinedIntoBasedOnCost() should only be called when inlining is successful. This also removes an unnecessary call to shouldInline() which always returned InlineCost::getAlways().

Diff Detail

Event Timeline

ellis created this revision.Mar 17 2022, 1:09 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 17 2022, 1:09 PM
ellis edited the summary of this revision. (Show Details)Mar 17 2022, 1:12 PM
ellis edited the summary of this revision. (Show Details)
ellis updated this revision to Diff 416298.Mar 17 2022, 1:13 PM

Remove whitespace change

ellis published this revision for review.Mar 17 2022, 1:15 PM
ellis added reviewers: kyulee, nikic, lebedev.ri.
Herald added a project: Restricted Project. · View Herald TranscriptMar 17 2022, 1:15 PM

can you add a test (perhaps in the one added in D121722) for this?

This revision is now accepted and ready to land.Mar 17 2022, 1:22 PM
kyulee accepted this revision.Mar 17 2022, 2:03 PM
ellis updated this revision to Diff 416351.Mar 17 2022, 3:38 PM

Extend the always-inline-remark.ll test case to match all the inlining remarks.

This revision was landed with ongoing or failed builds.Mar 17 2022, 3:40 PM
This revision was automatically updated to reflect the committed changes.