llvm/mlir/lib
Alex Zinenko 168213f91c [mlir] Move data layout from LLVMDialect to module Op attributes
Legacy implementation of the LLVM dialect in MLIR contained an instance of
llvm::Module as it was required to parse LLVM IR types. The access to the data
layout of this module was exposed to the users for convenience, but in practice
this layout has always been the default one obtained by parsing an empty layout
description string. Current implementation of the dialect no longer relies on
wrapping LLVM IR types, but it kept an instance of DataLayout for
compatibility. This effectively forces a single data layout to be used across
all modules in a given MLIR context, which is not desirable. Remove DataLayout
from the LLVM dialect and attach it as a module attribute instead. Since MLIR
does not yet have support for data layouts, use the LLVM DataLayout in string
form with verification inside MLIR. Introduce the layout when converting a
module to the LLVM dialect and keep the default "" description for
compatibility.

This approach should be replaced with a proper MLIR-based data layout when it
becomes available, but provides an immediate solution to compiling modules with
different layouts, e.g. for GPUs.

This removes the need for LLVMDialectImpl, which is also removed.

Depends On D85650

Reviewed By: aartbik

Differential Revision: https://reviews.llvm.org/D85652
2020-08-17 15:12:36 +02:00
..
Analysis [MLIR] Consider AffineIfOp when getting the index set of an Op wrapped in nested loops 2020-08-09 03:16:03 +05:30
Bindings Initial MLIR python bindings based on the C API. 2020-08-16 19:34:25 -07:00
CAPI Revert "Separate the Registration from Loading dialects in the Context" 2020-08-15 09:21:47 +00:00
Conversion [mlir] Move data layout from LLVMDialect to module Op attributes 2020-08-17 15:12:36 +02:00
Dialect [mlir] Move data layout from LLVMDialect to module Op attributes 2020-08-17 15:12:36 +02:00
EDSC [mlir] Remove EDSC BlockBuilder, BlockHandle and related functionality 2020-06-19 09:37:44 +02:00
ExecutionEngine Revert "Separate the Registration from Loading dialects in the Context" 2020-08-15 09:21:47 +00:00
Interfaces [mlir][Vector] NFC - Improve VectorInterfaces 2020-07-20 08:24:22 -04:00
IR Revert "Separate the Registration from Loading dialects in the Context" 2020-08-15 09:21:47 +00:00
Parser Revert "Separate the Registration from Loading dialects in the Context" 2020-08-15 09:21:47 +00:00
Pass Revert "Separate the Registration from Loading dialects in the Context" 2020-08-15 09:21:47 +00:00
Reducer Create Reduction Tree Pass 2020-08-07 23:17:31 +00:00
Support Refactor mlir-opt setup in a new helper function (NFC) 2020-08-15 20:09:06 +00:00
TableGen Revert "Separate the Registration from Loading dialects in the Context" 2020-08-15 09:21:47 +00:00
Target [mlir] Move data layout from LLVMDialect to module Op attributes 2020-08-17 15:12:36 +02:00
Transforms Revert "Separate the Registration from Loading dialects in the Context" 2020-08-15 09:21:47 +00:00
Translation [MLIR] Reapply: Adjust libMLIR building to more closely follow libClang 2020-05-04 20:47:57 -07:00
CMakeLists.txt Initial boiler-plate for python bindings. 2020-07-09 12:03:58 -07:00