[Mlir-commits] [mlir] [mlir][transform] Fix handling of transitive include in interpreter. (PR #67560)
Ingo Müller
llvmlistbot at llvm.org
Fri Oct 6 00:36:00 PDT 2023
================
@@ -218,6 +218,79 @@ StringAttr SymbolTable::insert(Operation *symbol, Block::iterator insertPt) {
return getSymbolName(symbol);
}
+LogicalResult SymbolTable::rename(StringAttr from, StringAttr to) {
+ Operation *op = lookup(from);
+ return rename(op, to);
+}
+
+LogicalResult SymbolTable::rename(Operation *op, StringAttr to) {
+ StringAttr from = getNameIfSymbol(op);
+
+ assert(from && "expected valid 'name' attribute");
+ assert(op->getParentOp() == symbolTableOp &&
+ "expected this operation to be inside of the operation with this "
+ "SymbolTable");
+ assert(lookup(from) == op && "current name does not resolve to op");
+ assert(lookup(to) == nullptr && "new name already exists");
+
+ if (failed(SymbolTable::replaceAllSymbolUses(op, to, getOp())))
----------------
ingomueller-net wrote:
For the record: fixed by #68320.
https://github.com/llvm/llvm-project/pull/67560
More information about the Mlir-commits
mailing list