[all-commits] [llvm/llvm-project] 82afd9: [mlir][Transforms][NFC] Dialect conversion: Eagerl...
Matthias Springer via All-commits
all-commits at lists.llvm.org
Sat Aug 3 00:00:59 PDT 2024
Branch: refs/heads/users/matthias-springer/eagerly_build_inverse_mapping
Home: https://github.com/llvm/llvm-project
Commit: 82afd9d07f6c693eeeed39a30b3d1e305a347d86
https://github.com/llvm/llvm-project/commit/82afd9d07f6c693eeeed39a30b3d1e305a347d86
Author: Matthias Springer <mspringer at nvidia.com>
Date: 2024-08-03 (Sat, 03 Aug 2024)
Changed paths:
M mlir/lib/Transforms/Utils/DialectConversion.cpp
Log Message:
-----------
[mlir][Transforms][NFC] Dialect conversion: Eagerly build reverse mapping
The "inverse mapping" is an inverse IRMapping that points from replaced values to their original values. This inverse mapping is needed when legalizing unresolved materializations, to figure out if a value has any uses. (It is not sufficient to examine the IR, because some IR changes have not been materialized yet.)
There was a check in `OperationConverter::finalize` that computed the inverse mapping only when needed. This check is not needed. `legalizeUnresolvedMaterializations` always computes the inverse mapping, so we can just do that in `OperationConverter::finalize` before calling `legalizeUnresolvedMaterializations`.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list