[Mlir-commits] [mlir] [mlir] Extend tests of SymbolTable::replaceAllSymbolUses. (PR #68780)

Ingo Müller llvmlistbot at llvm.org
Wed Oct 11 02:34:03 PDT 2023


ingomueller-net wrote:

I have become unsure about the fix in #68320. In [this testcase](https://github.com/llvm/llvm-project/blob/728a8d5a81/mlir/test/IR/test-symbol-rauw.mlir#L26-L30), the intention of a scope/limit seems to be "this op including the attributes but not the regions." That's the opposite of what I have implemented in the "fix."

What might be the actually deviation from that intention is [`collectSymbolScopes(Operation *symbol, Operation *limit)`](https://github.com/llvm/llvm-project/blob/479057887/mlir/lib/IR/SymbolTable.cpp#L661-L661), which says that it `collect[s] all of the symbol scopes from 'symbol' to (inclusive) 'limit'.` The fact that `limit` is inclusive here does not seem to fit the test above. Undoing my "fix" and making that function non-inclusive on `limit` might be another/a better way of making everything consistent. But I have the feeling that there might still be consequences I don't understand...

https://github.com/llvm/llvm-project/pull/68780


More information about the Mlir-commits mailing list