[all-commits] [llvm/llvm-project] f09a28: [mlir][Transforms][NFC] Dialect conversion: Eagerl...
Matthias Springer via All-commits
all-commits at lists.llvm.org
Thu Aug 8 22:51:52 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f09a28e66cfc5815dbac3e42944b5d0432f970bc
https://github.com/llvm/llvm-project/commit/f09a28e66cfc5815dbac3e42944b5d0432f970bc
Author: Matthias Springer <me at m-sp.org>
Date: 2024-08-09 (Fri, 09 Aug 2024)
Changed paths:
M mlir/lib/Transforms/Utils/DialectConversion.cpp
Log Message:
-----------
[mlir][Transforms][NFC] Dialect conversion: Eagerly build reverse mapping (#101476)
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`.
Depends on #98805
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