[PATCH] D78397: [mlir][Transforms] Add pass to perform sparse conditional constant propagation

Uday Bondhugula via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 18 01:03:28 PDT 2020


bondhugula added inline comments.


================
Comment at: mlir/lib/Transforms/SCCP.cpp:323
+  if (op->getNumResults() == 0 || op->getNumRegions() != 0)
+    return markAllOverdefined(op->getResults());
+
----------------
rriddle wrote:
> bondhugula wrote:
> > But getResults() is empty!
> getResults isn't necessarily empty if the operations has regions. 
But you've already handled the > 0 regions case in the block above and have returned for all those cases. You don't need the '|| conditional' altogether here.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78397/new/

https://reviews.llvm.org/D78397





More information about the llvm-commits mailing list