[Mlir-commits] [mlir] [MLIR] RemoveDeadValues: Allowing IRs with global constants to get dead values removed (PR #116519)
Perry Gibson
llvmlistbot at llvm.org
Mon Nov 18 02:07:03 PST 2024
================
@@ -579,7 +579,6 @@ void RemoveDeadValues::runOnOperation() {
if (op == module)
return WalkResult::advance();
if (isa<BranchOpInterface>(op) ||
- (isa<SymbolOpInterface>(op) && !isa<FunctionOpInterface>(op)) ||
(isa<SymbolUserOpInterface>(op) && !isa<CallOpInterface>(op))) {
op->emitError() << "cannot optimize an IR with non-function symbol ops, "
----------------
Wheest wrote:
So the original comment above says:
```cpp
// The removal of non-live values is performed iff there are no branch ops,
// all symbol ops present in the IR are function-like, and all symbol user ops
// present in the IR are call-like.
```
and the error message includes `non-call symbol user ops`. With this PR I believe that IR with non-call symbol user ops are no longer excluded?
Perhaps the error message/comment should be updated to reflect that.
https://github.com/llvm/llvm-project/pull/116519
More information about the Mlir-commits
mailing list