[all-commits] [llvm/llvm-project] 0c29f4: [MLIR] Fix dialect conversion cancelRootUpdate
Uday Bondhugula via All-commits
all-commits at lists.llvm.org
Tue Jul 6 02:52:50 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0c29f45ac9e8e67a6481c0810e2e335a12bf3877
https://github.com/llvm/llvm-project/commit/0c29f45ac9e8e67a6481c0810e2e335a12bf3877
Author: Uday Bondhugula <uday at polymagelabs.com>
Date: 2021-07-06 (Tue, 06 Jul 2021)
Changed paths:
M mlir/lib/Transforms/Utils/DialectConversion.cpp
Log Message:
-----------
[MLIR] Fix dialect conversion cancelRootUpdate
Fix dialect conversion ConversionPatternRewriter::cancelRootUpdate: the
erasure of operations here from the list of root update was off by one.
Should have been:
```
rootUpdates.erase(rootUpdates.begin() + (rootUpdates.rend() - it - 1));
```
instead of
```
rootUpdates.erase(rootUpdates.begin() + (rootUpdates.rend() - it));
```
or more directly:
```
rootUpdates.erase(it.base() - 1)
```
While on this, add an assertion to improve dev experience when a cancel is
called on an op on which a root update hasn't been started.
Differential Revision: https://reviews.llvm.org/D105397
More information about the All-commits
mailing list