llvm-project/mlir
Tobias Gysi f809eb4db2 [mlir] Argument and result attribute handling during inlining.
The revision adds the handleArgument and handleResult handlers that
allow users of the inlining interface to implement argument and result
conversions that take argument and result attributes into account. The
motivating use cases for this revision are taken from the LLVM dialect
inliner, which has to copy arguments that are marked as byval and that
also has to consider zeroext / signext when converting integers.

All type conversions are currently handled by the
materializeCallConversion hook. It runs before isLegalToInline and
supports only the introduction of a single cast operation since it may
have to rollback. The new handlers run shortly before and after
inlining and cannot fail. As a result, they can introduce more complex
ir such as copying a struct argument. At the moment, the new hooks
cannot be used to perform type conversions since all type conversions
have to be done using the materializeCallConversion. A follow up
revision will either relax this constraint or drop
materializeCallConversion in favor of the new and more flexible
handlers.

The revision also extends the CallableOpInterface to provide access
to the argument and result attributes if available.

Reviewed By: rriddle, Dinistro

Differential Revision: https://reviews.llvm.org/D145582
2023-03-22 09:02:15 +01:00
..
benchmark/python [mlir][sparse] Expose SparseTensor passes as enums instead of opaque numbers for vectorization and parallelization options. 2022-09-04 01:39:35 +00:00
cmake/modules [mlir] Don't use -z,defs on sanitizer builds 2023-03-13 14:04:31 -04:00
docs [mlir] Argument and result attribute handling during inlining. 2023-03-22 09:02:15 +01:00
examples [mlir] Argument and result attribute handling during inlining. 2023-03-22 09:02:15 +01:00
include [mlir] Argument and result attribute handling during inlining. 2023-03-22 09:02:15 +01:00
lib [mlir] Argument and result attribute handling during inlining. 2023-03-22 09:02:15 +01:00
python Revert "[mlir][Linalg][Transform] Avoid FunctionalStyleTransformOpTrait where unnecesseary to improve usability" 2023-03-20 07:07:27 -07:00
test [mlir] Argument and result attribute handling during inlining. 2023-03-22 09:02:15 +01:00
tools [mlir] Add missing registrations to runners. 2023-03-21 15:17:21 +01:00
unittests [mlir][sparse] fix crash when using pure constant index in indexing mapping (fixes #61530) 2023-03-21 23:45:20 +00:00
utils [mlir] Add Float8E5M2FNUZ and Float8E4M3FNUZ types to MLIR 2023-02-13 18:26:27 +00:00
.clang-format [mlir] Add missing newline at end of .clang-format file 2022-06-14 23:59:00 -07:00
.clang-tidy [mlir] Disable misc-const-correctness clang-tidy check. 2022-08-03 10:18:43 +02:00
CMakeLists.txt Revert "Reland "[CMake] Bumps minimum version to 3.20.0."" 2023-03-18 20:32:43 +01:00
LICENSE.TXT Add the Apache2 with LLVM exceptions license to MLIR 2019-12-24 00:58:06 -08:00
README.md mlir README.md: Fix the syntax 2019-12-24 13:31:07 +01:00

Multi-Level Intermediate Representation

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