[all-commits] [llvm/llvm-project] 43c60f: [mlir][Transforms][WIP] Dialect conversion: Fix bu...

Matthias Springer via All-commits all-commits at lists.llvm.org
Fri Aug 16 11:44:39 PDT 2024


  Branch: refs/heads/users/matthias-springer/nec_mat_typo
  Home:   https://github.com/llvm/llvm-project
  Commit: 43c60fbeefc198eea8c426a9c7a71221d3e9f1a6
      https://github.com/llvm/llvm-project/commit/43c60fbeefc198eea8c426a9c7a71221d3e9f1a6
  Author: Matthias Springer <mspringer at nvidia.com>
  Date:   2024-08-16 (Fri, 16 Aug 2024)

  Changed paths:
    M mlir/lib/Transforms/Utils/DialectConversion.cpp
    M mlir/test/Transforms/test-legalize-type-conversion.mlir

  Log Message:
  -----------
  [mlir][Transforms][WIP] Dialect conversion: Fix bug in `computeNecessaryMaterializations`

There was a typo in the code path that removes unnecessary materializations.

Before: Update `opResult` (result of an op different from `user`) in mapping and remove `user`.
```
replaceMaterialization(rewriterImpl, opResult, inputOperands,
                       inverseMapping);
necessaryMaterializations.remove(materializationOps.lookup(user));
```

After: Update `user->getResults()` in mapping and remove `user`.
```
replaceMaterialization(rewriterImpl, user->getResults(), inputOperands,
                       inverseMapping);
necessaryMaterializations.remove(materializationOps.lookup(user));
```

TODO: test case



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