forked from OSchip/llvm-project
Reset operation when canceling root update transaction
Should reset the operation to original state when canceling the updates. Reviewed By: rriddle, ftynse Differential Revision: https://reviews.llvm.org/D110176
This commit is contained in:
parent
cb793e1a36
commit
b2b63d1b91
|
@ -1485,6 +1485,7 @@ void ConversionPatternRewriter::cancelRootUpdate(Operation *op) {
|
|||
auto &rootUpdates = impl->rootUpdates;
|
||||
auto it = llvm::find_if(llvm::reverse(rootUpdates), stateHasOp);
|
||||
assert(it != rootUpdates.rend() && "no root update started on op");
|
||||
(*it).resetOperation();
|
||||
int updateIdx = std::prev(rootUpdates.rend()) - it;
|
||||
rootUpdates.erase(rootUpdates.begin() + updateIdx);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue