[all-commits] [llvm/llvm-project] 052d24: [mlir] Introduce support for parametric side-effects

ftynse via All-commits all-commits at lists.llvm.org
Wed Nov 18 01:52:38 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 052d24af2913e8e2a0183bcab8af9c8c9cad94f1
      https://github.com/llvm/llvm-project/commit/052d24af2913e8e2a0183bcab8af9c8c9cad94f1
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2020-11-18 (Wed, 18 Nov 2020)

  Changed paths:
    A mlir/include/mlir/Interfaces/SideEffectInterfaceBase.td
    M mlir/include/mlir/Interfaces/SideEffectInterfaces.h
    M mlir/include/mlir/Interfaces/SideEffectInterfaces.td
    M mlir/test/IR/test-side-effects.mlir
    M mlir/test/lib/Dialect/Test/CMakeLists.txt
    M mlir/test/lib/Dialect/Test/TestDialect.cpp
    M mlir/test/lib/Dialect/Test/TestDialect.h
    A mlir/test/lib/Dialect/Test/TestInterfaces.cpp
    A mlir/test/lib/Dialect/Test/TestInterfaces.h
    M mlir/test/lib/Dialect/Test/TestInterfaces.td
    M mlir/test/lib/Dialect/Test/TestOps.td
    M mlir/test/lib/IR/TestSideEffects.cpp

  Log Message:
  -----------
  [mlir] Introduce support for parametric side-effects

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.

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D91493




More information about the All-commits mailing list