This is an archive of the discontinued LLVM Phabricator instance.

Provide loop info to inliner
AbandonedPublic

Authored by hiraditya on Apr 5 2016, 12:54 PM.

Details

Reviewers
chandlerc
Summary

Currently, the inliner does not take into account if a call is inside a loop. Providing LoopInfo to the inliner would make more informed inlining decisions for calls which are inside a loop.
Passes regression tests.

I'll can more benchmark numbers if this approach appears good enough. If there is a better way to port loop info, please let me know as I can work towards implementing that.

Diff Detail

Repository
rL LLVM

Event Timeline

hiraditya updated this revision to Diff 52726.Apr 5 2016, 12:54 PM
hiraditya retitled this revision from to Provide loop info to inliner.
hiraditya updated this object.
hiraditya added reviewers: chandlerc, mcrosier.
hiraditya set the repository for this revision to rL LLVM.
hiraditya added subscribers: llvm-commits, sebpop.
hiraditya added a subscriber: apazos.
chandlerc requested changes to this revision.Apr 7 2016, 1:28 AM
chandlerc edited edge metadata.

This or other variations have been proposed before.

The real solution here is a design that makes analyses generally available to the inliner, not just a one-off for LoopInfo (or some other analysis). I've been working on redesigning the pass manager with this in mind. I would suggest helping out on various parts of that effort rather than hacking the loop info in here. For example, help porting passes is always welcome, and there are many passes that need to be ported.

This revision now requires changes to proceed.Apr 7 2016, 1:28 AM

This or other variations have been proposed before.

The real solution here is a design that makes analyses generally available to the inliner, not just a one-off for LoopInfo (or some other analysis). I've been working on redesigning the pass manager with this in mind. I would suggest helping out on various parts of that effort rather than hacking the loop info in here. For example, help porting passes is always welcome, and there are many passes that need to be ported.

Sure, I would be glad to help. It will be helpful if you could point to a pass which has been ported already so that I can get some ideas from there.

Thanks,

mcrosier resigned from this revision.Apr 28 2016, 11:52 AM
mcrosier removed a reviewer: mcrosier.
hiraditya abandoned this revision.Mar 1 2017, 9:47 AM