[PATCH] D75837: [MLIR] Introduce scf.execute_region op
Uday Bondhugula via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 9 16:59:47 PDT 2021
bondhugula marked 2 inline comments as done.
bondhugula added inline comments.
================
Comment at: mlir/include/mlir/Dialect/SCF/SCFOps.td:114
+ // inline.
+ let hasCanonicalizer = 0;
+
----------------
mehdi_amini wrote:
> bondhugula wrote:
> > mehdi_amini wrote:
> > > Seems like a canonicalization could be that it would return an SSA value defined in the enclosing region.
> > Did you mean moving the slice that generates the yield values to the enclosing region (if they were inside the scf.execute_region)? This can't be done in O(1) time in general nor are the utilities that allow one to do that available in IR libraries - can be part of `Transforms/` though.
> I mean that if you have:
>
> ```
> %value = ...
> %execute_results:2 = scf.execute_region {
> ...
> %x = ...
> ...
> scf.yield %x, %value
> }
> ```
>
> Here `%execute_results#1` can be RAUW with `%value` and the code turned to:
>
> ```
> %value = ...
> %execute_results = scf.execute_region {
> ...
> %x = ...
> ...
> scf.yield %x
> }
> ```
Okay, sure. (This is completely different than what I understood from your statement. Perhaps better stated as: "... canonicalization in the situation where it's returning a value defined in the enclosing region".)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75837/new/
https://reviews.llvm.org/D75837
More information about the llvm-commits
mailing list