This is an archive of the discontinued LLVM Phabricator instance.

Add a new method to create SimpleInliner instance and make pre-inliner use this
ClosedPublic

Authored by eraman on Aug 10 2016, 2:58 PM.

Details

Summary

This adds a createFunctionInliningPass pass that takes an InlineParams object and use this to create the pre-inliner pass. This prevents the regular inliner's threshold flag from influencing the preinliner. We could make the callers of createFunctionInliningPass(Threshold) and createFunctionInliningPass(OptLevel, SizeOptLevel) use this instead, but I suppose we can't remove them because there may be other external users.

Diff Detail

Repository
rL LLVM

Event Timeline

eraman updated this revision to Diff 67612.Aug 10 2016, 2:58 PM
eraman retitled this revision from to Add a new method to create SimpleInliner instance and make pre-inliner use this.
eraman updated this object.
eraman added reviewers: chandlerc, xur.
eraman added subscribers: llvm-commits, davidxl.
davidxl added inline comments.Aug 10 2016, 4:22 PM
lib/Transforms/IPO/PassManagerBuilder.cpp
264 ↗(On Diff #67612)

I think it is better to make these two as optional field in InlineParams.

eraman added inline comments.Aug 10 2016, 5:11 PM
lib/Transforms/IPO/PassManagerBuilder.cpp
264 ↗(On Diff #67612)

Ok, it make sense. I'm sending a separate NFC patch soon.

chandlerc accepted this revision.Aug 10 2016, 6:11 PM
chandlerc edited edge metadata.

FWIW, LGTM with the obvious simplification provided by the patch Easwaran has already sent out. Make sure David is happy with it as well, as I've not been following the PGO instrumentation pipeline stuff as closely. But I'm happy with the inliner parts of this.

This revision is now accepted and ready to land.Aug 10 2016, 6:11 PM
eraman updated this revision to Diff 67700.Aug 11 2016, 10:08 AM
eraman edited edge metadata.

Rebase and do not set HotCallsiteThreshold as it is now an Optional.

xur accepted this revision.Aug 11 2016, 10:16 AM
xur edited edge metadata.

LGTM.

This revision was automatically updated to reflect the committed changes.