Skip to content
This repository has been archived by the owner on Mar 15, 2022. It is now read-only.

Implement inlining in LLILC #239

Closed
AndyAyersMS opened this issue Mar 4, 2015 · 0 comments
Closed

Implement inlining in LLILC #239

AndyAyersMS opened this issue Mar 4, 2015 · 0 comments

Comments

@AndyAyersMS
Copy link
Member

Inlining is an important optimization. Getting it enabled in LLILC is going to take some work. While there are a number of different ways we could go about inlining, I'd recommend something like the following:

  1. Ensure the reader can be re-invoked by the LLVM pass manager to read in inlinees.
  2. Make sure we retain sufficient context in the LLVM IR (or perhaps via metadata) to do the appropriate legality checks outside of the reader.
  3. Implement any special behavior needed in the reader when reading an inlinee.
  4. Determine whether the right approach is to add inlinees as methods to the module we use for the root method, or do something else. The appeal of adding them to the module is that if there are multiple call sites that invoke a given method we may be able to easily reuse the IR. But if we do that we need to make sure to remove or mark these as not needing actual processing or code gen; only the root method can be emitted.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant