[PATCH] D78397: [mlir][Transforms] Add pass to perform sparse conditional constant propagation
River Riddle via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 18 01:03:27 PDT 2020
rriddle added inline comments.
================
Comment at: mlir/lib/Transforms/SCCP.cpp:323
+ if (op->getNumResults() == 0 || op->getNumRegions() != 0)
+ return markAllOverdefined(op->getResults());
+
----------------
bondhugula wrote:
> 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.
Oh duh, sorry about that. Thanks for pointing that out. Accidentally missed that when changing region handling.
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