aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorMatthias Springer <me@m-sp.org>2024-09-30 21:19:32 +0200
committerGitHub <noreply@github.com>2024-09-30 21:19:32 +0200
commit023f7c9382599111244e682ea6b26011dbf7fc56 (patch)
tree59563031b4244fd0ace75e93f7b5d2da6b1b8019 /flang/lib/Frontend/CompilerInvocation.cpp
parentdf3f291d2a64bb01bc8fab69f296923c1c798909 (diff)
downloadllvm-023f7c9382599111244e682ea6b26011dbf7fc56.zip
llvm-023f7c9382599111244e682ea6b26011dbf7fc56.tar.gz
llvm-023f7c9382599111244e682ea6b26011dbf7fc56.tar.bz2
[mlir][Transforms][NFC] Dialect Conversion: Update docs for `remapValues` (#110414)
Simplify the nesting structure of "if" checks in `remapValues` and update the code comments. This is what the comments stated in case there is no type converter: ``` // TODO: What we should do here is just set `desiredType` to `origType` // and then handle the necessary type conversions after the conversion // process has finished. Unfortunately a lot of patterns currently rely on // receiving the new operands even if the types change, so we keep the // original behavior here for now until all of the patterns relying on // this get updated. ``` However, without a type converter it is not possible to perform any materializations. Furthermore, the absence of a type converter indicates that the pattern does not care about type legality. Therefore, the current implementation is correct and this TODO can be removed. Note: Patterns that actually require a remapped type to match the original operand type can be equipped with a type converter that maps each type to itself. This TODO is outdated: ``` // TODO: There currently isn't any mechanism to do 1->N type conversion // via the PatternRewriter replacement API, so for now we just ignore it. ``` 1->N type conversions are already possible as part of block signature conversions. It is incorrect to just ignore such cases. However, there is currently no better way to handle 1->N conversions in this function because of infrastructure limitations. This is now clarified in the comments.
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions