This is an archive of the discontinued LLVM Phabricator instance.

[mlir][Inliner] Add a `wouldBeCloned` flag to each of the `isLegalToInline` hooks.
ClosedPublic

Authored by rriddle on Oct 28 2020, 6:00 PM.

Details

Summary

Often times the legality of inlining can change depending on if the callable is going to be inlined in-place, or cloned. For example, some operations are not allowed to be duplicated and can only be inlined if the original callable will cease to exist afterwards. The new wouldBeCloned flag allows for dialects to hook into this when determining legality.

Depends On D90359

Diff Detail

Event Timeline

rriddle created this revision.Oct 28 2020, 6:00 PM
rriddle requested review of this revision.Oct 28 2020, 6:00 PM
silvas accepted this revision.Oct 28 2020, 6:36 PM
This revision is now accepted and ready to land.Oct 28 2020, 6:36 PM
This revision was landed with ongoing or failed builds.Oct 28 2020, 9:55 PM
This revision was automatically updated to reflect the committed changes.