This is an archive of the discontinued LLVM Phabricator instance.

[InlineCost] Mark functions accessing varargs as not viable.
ClosedPublic

Authored by fhahn on Jan 25 2018, 1:29 PM.

Details

Summary

This prevents functions accessing varargs from being inlined if they
have the alwaysinline attribute.

Diff Detail

Repository
rL LLVM

Event Timeline

fhahn created this revision.Jan 25 2018, 1:29 PM
chh added a subscriber: chh.Jan 25 2018, 1:31 PM

(The original patch didn't make it into 6.0, so we don't need to cherry-pick this, I think.)

Do we need to check for musttail calls, since they can also access varargs?

fhahn added a comment.Jan 26 2018, 8:30 AM

(The original patch didn't make it into 6.0, so we don't need to cherry-pick this, I think.)

Ah yes, the original patch went in just after the branch.

Do we need to check for musttail calls, since they can also access varargs?

I do not think so: when inlining a function containing a musttail call, InlineFunction should forward the varargs appropriately.

efriedma accepted this revision.Jan 26 2018, 10:41 AM

LGTM.

I do not think so: when inlining a function containing a musttail call, InlineFunction should forward the varargs appropriately.

Right.

This revision is now accepted and ready to land.Jan 26 2018, 10:41 AM
This revision was automatically updated to reflect the committed changes.