[Mlir-commits] [mlir] [mlir][transform] Fix handling of transitive include in interpreter. (PR #67560)
Oleksandr Alex Zinenko
llvmlistbot at llvm.org
Wed Oct 4 08:47:40 PDT 2023
Ingo =?utf-8?q?Müller?= <ingomueller at google.com>,
Ingo =?utf-8?q?Müller?= <ingomueller at google.com>,
Ingo =?utf-8?q?Müller?= <ingomueller at google.com>,
Ingo =?utf-8?q?Müller?= <ingomueller at google.com>,
Ingo =?utf-8?q?Müller?= <ingomueller at google.com>,
Ingo =?utf-8?q?Müller?= <ingomueller at google.com>,
Ingo =?utf-8?q?Müller?= <ingomueller at google.com>,
Ingo =?utf-8?q?Müller?= <ingomueller at google.com>,
Ingo =?utf-8?q?Müller?= <ingomueller at google.com>,
Ingo =?utf-8?q?Müller?= <ingomueller at google.com>
Message-ID:
In-Reply-To: <llvm/llvm-project/pull/67560/mlir at github.com>
================
@@ -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())))
----------------
ftynse wrote:
I doubt this is somehow intended, especially given that functions seem to share the implementation via templates. Can you investigate more?
https://github.com/llvm/llvm-project/pull/67560
More information about the Mlir-commits
mailing list