[PATCH] D114460: [fir] Add fir reduction builder

Andrzej Warzynski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 26 03:24:51 PST 2021


awarzynski added inline comments.


================
Comment at: flang/unittests/Optimizer/Builder/Runtime/ReductionTest.cpp:20
+  mlir::Value all = fir::runtime::genAll(*firBuilder, loc, undef, dim);
+  checkCallOp(all.getDefiningOp(), "_FortranAAll", 2);
+}
----------------
clementval wrote:
> awarzynski wrote:
> > clementval wrote:
> > > awarzynski wrote:
> > > > Same suggestion in other places.
> > > Does this really help?
> > Yes. `_FortranAll` is somewhat self-explanatory. But `2` is a magic number without the comment.
> Fells like more work for not so much
Not that much work:

**Add `/*fctName=*/ **
```lang=bash
awk '($1 ~ /checkCallOpFromResultBox/) && !($2 ~ /fctNam/) {printf("%s /*fctName=*/%s %s\n", $1, $2, $3)}' flang/unittests/Optimizer/Builder/Runtime/ReductionTest.cpp
```

**Add `/*nbArgs=*/ **
```lang=bash
awk '($1 ~ /checkCallOpFromResultBox/) && !($3 ~ /nbArgs/) {printf("%s %s /*nbArgs=*/%s\n", $1, $2, $3)}' flang/unittests/Optimizer/Builder/Runtime/ReductionTest.cpp
```

This is not a blocker for me.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D114460



More information about the llvm-commits mailing list