Page MenuHomePhabricator

Added one argument to the inline methods to collect all the inlined ops
Needs ReviewPublic

Authored by liufengdb on Nov 25 2020, 10:42 AM.

Details

Summary

This argument is added to return all the inlined operations. The caller
can fine-tune these inlined operations. The content is valid only when
the inlining is successful.

Diff Detail

Event Timeline

liufengdb created this revision.Nov 25 2020, 10:42 AM
liufengdb requested review of this revision.Nov 25 2020, 10:42 AM

fix the compiling

include more

  • fix the method
  • fix the method

I don't think this is necessary to add, given that the caller can always determine the operations that were inlined. The caller can grab iterators before/after the insertion point and walk the operations in between after inlining. The inliner guarantees that the operations get put in deterministically.

// Before inlining
^foo:
  ... // before call
  foo.call
  ... // after call

// After inlining a single block:
^foo:
  ... // before call
  foo.call
  <new-operations>
  ... // after call

// After inlining multiple blocks:
^foo:
  ... // before call
  foo.call
  <new-operations>
^<new-blocks>:
   <more-new-operations>
^foo.split.during.inlining:
  ... // after call

Let me try it out. Thanks for the suggestion!