This is an archive of the discontinued LLVM Phabricator instance.

[mlir] FuncInlinerInterface: Control whether a CallOp will be inlined
Needs RevisionPublic

Authored by mamrami on Jan 10 2023, 4:44 AM.

Details

Diff Detail

Event Timeline

mamrami created this revision.Jan 10 2023, 4:44 AM
mamrami requested review of this revision.Jan 10 2023, 4:44 AM
rriddle requested changes to this revision.Jan 12 2023, 10:56 AM

The func dialect has no notion of a "noinline" attribute. Are you trying to propose such a thing here?

This revision now requires changes to proceed.Jan 12 2023, 10:56 AM
mamrami added a comment.EditedJan 15 2023, 3:57 AM

I had a scenario where I wanted the callOp not to be inlined.
This is how I solved it, based on your change in Test dialect: https://reviews.llvm.org/D90359
Do you think I should implement it differently?

River's point is more that this attribute is not documented nor load bearing today, the legality depending on an attribute has not been specified and if you intend to propose this attribute as a load bearing concept for this op.

Now whether legal to inline may be getting should only be inlined in some case (there is an ongoing discussion on this on the forum).

Do you suggest adding this attribute to the func dialect? Or do you suggest discussing the whole idea of not always returning true?