This is an archive of the discontinued LLVM Phabricator instance.

[ThinLTO] Update handling of vararg functions to match inliner
ClosedPublic

Authored by tejohnson on Nov 8 2018, 10:31 AM.

Details

Summary

Previously we marked all vararg functions as non-inlinable in the
function summary, which prevented their importing. However, the
corresponding inliner restriction was loosened in r321940/r342675
to only apply to functions calling va_start. Adjust the summary
flag computation to match.

Diff Detail

Event Timeline

tejohnson created this revision.Nov 8 2018, 10:31 AM
davidxl accepted this revision.Nov 11 2018, 2:21 PM

lgtm

This revision is now accepted and ready to land.Nov 11 2018, 2:21 PM
This revision was automatically updated to reflect the committed changes.

This doesn't completely match what the inliner is doing. We actually can inline functions that call va_start in some cases: specifically, we can inline in cases where we can prove the call to va_start is dead at a particular callsite. Probably doesn't come up often enough to matter, though.

This doesn't completely match what the inliner is doing. We actually can inline functions that call va_start in some cases: specifically, we can inline in cases where we can prove the call to va_start is dead at a particular callsite. Probably doesn't come up often enough to matter, though.

Thanks for the comment. I'm inclined to remove the vararg restrictions on importing altogether then. I had measured it without any restrictions for a large benchmark and it didn't have a significant impact on the import counts and binary size in any case.