This is an archive of the discontinued LLVM Phabricator instance.

[MLIR][LLVM] Move the LLVM inliner interface into a separate file.
ClosedPublic

Authored by definelicht on Mar 22 2023, 6:14 AM.

Details

Summary

A fully fledged LLVM inliner will require a lot of logic. Since
LLVMDialect.cpp is large enough as it is, preemptively outline the
inlining logic into a separate .cpp file. This will also allow us to
add a DEBUG_TYPE for debugging the inliner.

The name LLVMInlining was chosen over LLVMInlinerInterface to keep
the option open for exposing inlining functionality even when not
invoked through the DialectInlinerInterface.

Depends on D146616

Diff Detail

Event Timeline

definelicht created this revision.Mar 22 2023, 6:14 AM
Herald added a reviewer: dcaballe. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
definelicht requested review of this revision.Mar 22 2023, 6:14 AM
gysit accepted this revision.Mar 22 2023, 7:20 AM

LGTM

mlir/lib/Dialect/LLVMIR/IR/LLVMInlining.h
23

nit: I would probably put the method in the detail namespace since it is for internal use only.

This revision is now accepted and ready to land.Mar 22 2023, 7:20 AM

Move into detail namespace.

Add documentation to addLLVMInlinerInterface.

This revision was landed with ongoing or failed builds.Mar 23 2023, 6:31 AM
This revision was automatically updated to reflect the committed changes.