[PATCH] D78447: [mlir][SCCP] Add support for propagating constants across inter-region control flow

Uday Bondhugula via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 20 11:54:01 PDT 2020


bondhugula accepted this revision.
bondhugula marked an inline comment as done.
bondhugula added inline comments.
This revision is now accepted and ready to land.


================
Comment at: mlir/lib/Transforms/SCCP.cpp:141
 
+  /// Visit the users of the given IR.
+  template <typename T>
----------------
.. if they are in executable blocks. 


================
Comment at: mlir/lib/Transforms/SCCP.cpp:473
+    }
+    if (region->empty())
       continue;
----------------
I think this path is never tested. 


================
Comment at: mlir/test/Transforms/sccp-structured.mlir:132
+  return %result : i32
+}
----------------
bondhugula wrote:
> Every loop.if that you have in the test cases has an else. Add one or more without an else block?
Just realized that no values would be yielded without the else. And you are testing for empty regions at one place. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D78447





More information about the llvm-commits mailing list