This is an archive of the discontinued LLVM Phabricator instance.

[WIP][llvm][Inline] Add helper function for inliner
AbandonedPublic

Authored by taolq on Jun 30 2021, 8:08 AM.

Details

Summary

Add helper function for inliner and move the big "while" loop into the helper function.

Diff Detail

Event Timeline

taolq created this revision.Jun 30 2021, 8:08 AM
taolq requested review of this revision.Jun 30 2021, 8:08 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 30 2021, 8:08 AM
taolq edited the summary of this revision. (Show Details)Jun 30 2021, 8:12 AM
taolq added reviewers: kazu, mtrofin, teemperor.

Can you detail a bit what motivates the change - do you plan to expose and reuse the code elsewhere? That would help in 2 ways:

  • understanding how to review
  • avoiding names like 'helper' in descriptions (or - not the case here - APIs). 'helper', like 'utility', communicates very little (it's not like an API would be otherwise called 'unhelpful')
llvm/lib/Transforms/IPO/Inliner.cpp
811

should this be a member function instead - to avoid passing so many parameters?

kazu added a comment.Jun 30 2021, 1:29 PM

Can you detail a bit what motivates the change - do you plan to expose and reuse the code elsewhere? That would help in 2 ways:

  • understanding how to review
  • avoiding names like 'helper' in descriptions (or - not the case here - APIs). 'helper', like 'utility', communicates very little (it's not like an API would be otherwise called 'unhelpful')

I think Liqiang is trying to factor out the bit while loop so that we can share it between the module inliner and the SCC inliner, but sure, he can clarify things both in the commit message and the source code.

taolq abandoned this revision.Jul 8 2021, 8:50 AM