[PATCH] D111155: [fir] Add affine promotion pass

Valentin Clement via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 7 08:49:03 PDT 2021


clementval added inline comments.


================
Comment at: flang/test/Fir/affine-promotion.fir:1
+// Test loop affine promotion
+
----------------
awarzynski wrote:
> This comment suggests that tests for `fir.if` and `fir.load` should go to a dedicated file.
I'll update the comment so both tests can be in the same file. 


================
Comment at: flang/test/Fir/affine-promotion.fir:93
+        %cond = cmpi "sgt", %im2, %c0 : index
+        fir.if %cond {
+          %a_idx = fir.array_coor %a(%dims) %i
----------------
awarzynski wrote:
> Would a test with `fir.if` _outside of_ `fir.do_loop` be possible? I think that it would nicely highlight  _what_ is being tested. Currently both versions of `@calc` look like tests for `fir.do_loop` specifically (that's the first thing that you notice). `fir.if`/affine.if` or `fir.load`/`affine.store` are not obvious to spot.
a `fir.if` outside of loop would never produce affine operations. `affine.if` has meaning in a loop only. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D111155



More information about the llvm-commits mailing list