This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Introduce support for parametric side-effects
ClosedPublic

Authored by ftynse on Nov 15 2020, 6:44 AM.

Details

Summary

The side effect infrastructure is based on the Effect and Resource class
templates, instances of instantiations of which are constructed as
thread-local singletons. With this scheme, it is impossible to further
parameterize either of those, or the EffectInstance class that contains
pointers to an Effect and Resource instances. Such a parameterization is
necessary to express more detailed side effects, e.g. those of a loop or
a function call with affine operations inside where it is possible to
precisely specify the slices of accessed buffers.

Include an additional Attribute to EffectInstance class for further
parameterization. This allows to leverage the dialect-specific
registration and uniquing capabilities of the attribute infrastructure
without requiring Effect or Resource instantiations to be attached to a
dialect themselves.

Split out the generic part of the side effect Tablegen classes into a
separate file to avoid generating built-in MemoryEffect interfaces when
processing any .td file that includes SideEffectInterfaceBase.td.

Diff Detail

Event Timeline

ftynse created this revision.Nov 15 2020, 6:44 AM
ftynse requested review of this revision.Nov 15 2020, 6:44 AM
This revision is now accepted and ready to land.Nov 16 2020, 10:50 AM
This revision was automatically updated to reflect the committed changes.