aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorMatthias Springer <me@m-sp.org>2024-06-25 08:43:28 +0200
committerGitHub <noreply@github.com>2024-06-25 08:43:28 +0200
commitf1e0657d144f5a3cfef4b625d0f875f4dacd21d1 (patch)
tree71e87a98603fb13930a43031c0be03d347aea009 /clang/lib/CodeGen/CodeGenModule.cpp
parent62d44fbd50e28a6cfe479fc07164b8c970f049c6 (diff)
downloadllvm-f1e0657d144f5a3cfef4b625d0f875f4dacd21d1.zip
llvm-f1e0657d144f5a3cfef4b625d0f875f4dacd21d1.tar.gz
llvm-f1e0657d144f5a3cfef4b625d0f875f4dacd21d1.tar.bz2
[mlir][Transforms] Dialect conversion: Simplify handling of dropped arguments (#96207)
This commit simplifies the handling of dropped arguments and updates some dialect conversion documentation that is outdated. When converting a block signature, a `BlockTypeConversionRewrite` object and potentially multiple `ReplaceBlockArgRewrite` are created. During the "commit" phase, uses of the old block arguments are replaced with the new block arguments, but the old implementation was written in an inconsistent way: some block arguments were replaced in `BlockTypeConversionRewrite::commit` and some were replaced in `ReplaceBlockArgRewrite::commit`. The new `BlockTypeConversionRewrite::commit` implementation is much simpler and no longer modifies any IR; that is done only in `ReplaceBlockArgRewrite` now. The `ConvertedArgInfo` data structure is no longer needed. To that end, materializations of dropped arguments are now built in `applySignatureConversion` instead of `materializeLiveConversions`; the latter function no longer has to deal with dropped arguments. Other minor improvements: - Improve variable name: `origOutputType` -> `origArgType`. Add an assertion to check that this field is only used for argument materializations. - Add more comments to `applySignatureConversion`. Note: Error messages around failed materializations for dropped basic block arguments changed slightly. That is because those materializations are now built in `legalizeUnresolvedMaterialization` instead of `legalizeConvertedArgumentTypes`. This commit is in preparation of decoupling argument/source/target materializations from the dialect conversion.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions