[PATCH] D78592: [mlir][SCCP] Add support for propagating across symbol based calls
Uday Bondhugula via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 22 10:19:58 PDT 2020
bondhugula added inline comments.
================
Comment at: mlir/lib/IR/SymbolTable.cpp:230
+ for (Block &block : region)
+ for (Operation &nested : block)
+ walkSymbolTables(&nested, allSymUsesVisible, callback);
----------------
Nit: `nested` -> `nestedOp`
================
Comment at: mlir/lib/IR/SymbolTable.cpp:233
+
+ // If 'op' was a symbol table, visit it after any nested symbol tables.
+ if (isSymbolTable)
----------------
was a symbol table -> had a symbol table trait
================
Comment at: mlir/lib/Transforms/SCCP.cpp:770
+ return;
+ assert(callable->getNumResults() == 0 && "expected symbol callable");
+
----------------
Callable things can never have results, right? Can't you assert for the trait instead? Also, this should be moved to before the check right above.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78592/new/
https://reviews.llvm.org/D78592
More information about the llvm-commits
mailing list