llvm-project/mlir/test/lib
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
..
Analysis [ADT][mlir][NFCI] Do not use non-const lvalue-refs with enumerate 2023-03-15 10:43:56 -04:00
Conversion [mlir][spirv][vector] Add pattern to convert reduction to SPIR-V dot prod 2023-03-10 13:54:16 -05:00
Dialect [mlir] Argument and result attribute handling during inlining. 2023-03-22 09:02:15 +01:00
Interfaces [mlir][IR][NFC] Rename RewriterBase::replaceUseIf to replaceUsesWithIf 2023-02-22 16:13:18 +01:00
IR [mlir][IR] Add ReverseDominanceIterator for IR walkers 2023-03-22 09:01:58 +01:00
Pass
Reducer
Rewrite
Tools
Transforms [mlir][IR] Use Listener for IR callbacks in OperationFolder 2023-02-23 08:56:43 +01:00
CMakeLists.txt