llvm/mlir
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
..
cmake/modules [mlir] Make mlir_check_link_libraries() work with interface libraries 2020-08-14 11:39:04 -07:00
docs [mlir] Mention mandatory RFC process for changes in Standard dialect 2020-08-14 11:31:12 +02:00
examples Refactor mlir-opt setup in a new helper function (NFC) 2020-08-15 20:09:06 +00:00
include [mlir] Move data layout from LLVMDialect to module Op attributes 2020-08-17 15:12:36 +02:00
integration_test [mlir] [VectorOps] Add masked load/store operations to Vector dialect 2020-08-05 16:45:24 -07:00
lib [mlir] Move data layout from LLVMDialect to module Op attributes 2020-08-17 15:12:36 +02:00
test [mlir] Move data layout from LLVMDialect to module Op attributes 2020-08-17 15:12:36 +02:00
tools Refactor mlir-opt setup in a new helper function (NFC) 2020-08-15 20:09:06 +00:00
unittests Revert "Separate the Registration from Loading dialects in the Context" 2020-08-15 09:21:47 +00:00
utils [mlir][NFC] Remove usernames and google bug numbers from TODO comments. 2020-07-07 01:40:52 -07:00
.clang-format
.clang-tidy
CMakeLists.txt [mlir] Initial version of C APIs 2020-08-05 15:04:08 +02:00
LICENSE.TXT
README.md

Multi-Level Intermediate Representation

See https://mlir.llvm.org/ for more information.