[mlir] Data layout for integer and float typesAdd support for integer and float types into the data layout subsystem withdefault logic similar to LLVM IR. Given the flexibility of the sybsystem, t
[mlir] Data layout for integer and float typesAdd support for integer and float types into the data layout subsystem withdefault logic similar to LLVM IR. Given the flexibility of the sybsystem, thelogic can be easily overwritten by operations if necessary. This provides theconnection necessary, e.g., for the GPU target where alignment requirements forintegers and floats differ from those provided by default (although stillcompatible with the LLVM IR model). Previously, it was impossible to usenon-default alignment requirements for integer and float types, which couldlead to incorrect address and size calculations when targeting GPUs.Depends On D120737Reviewed By: wsmosesDifferential Revision: https://reviews.llvm.org/D120739
show more ...
[mlir] support data layout specs on ModuleOpModuleOp is a natural place to provide scoped data layout information. However,it is undesirable for ModuleOp to implement the entirety ofDataLayoutOpI
[mlir] support data layout specs on ModuleOpModuleOp is a natural place to provide scoped data layout information. However,it is undesirable for ModuleOp to implement the entirety ofDataLayoutOpInterface because that would require either pushing the interfaceinside the IR library instead of a separate library, or putting the defaultimplementation of the interface as inline functions in headers leading tobinary bloat. Instead, ModuleOp accepts an arbitrary data layout spec attributeand has a dedicated hook to extract it, and DataLayout is modified to knowabout ModuleOp particularities.Reviewed By: herhut, nicolasvasilacheDifferential Revision: https://reviews.llvm.org/D98500
[mlir] Introduce data layout modeling subsystemData layout information allows to answer questions about the size and alignmentproperties of a type. It enables, among others, the generation of vari
[mlir] Introduce data layout modeling subsystemData layout information allows to answer questions about the size and alignmentproperties of a type. It enables, among others, the generation of variouslinear memory addressing schemes for containers of abstract types and deeperreasoning about vectors. This introduces the subsystem for modeling datalayouts in MLIR.The data layout subsystem is designed to scale to MLIR's open type andoperation system. At the top level, it consists of attribute interfaces thatcan be implemented by concrete data layout specifications; type interfaces thatshould be implemented by types subject to data layout; operation interfacesthat must be implemented by operations that can serve as data layout scopes(e.g., modules); and dialect interfaces for data layout properties unrelated tospecific types. Built-in types are handled specially to decrease the overallquery cost.A concrete default implementation of these interfaces is provided in the newTarget dialect. Defaults for built-in types that match the current behavior arealso provided.Reviewed By: rriddleDifferential Revision: https://reviews.llvm.org/D97067