Carries out the lowering of the all intrinsic into HLFIR
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
flang/lib/Lower/ConvertCall.cpp | ||
---|---|---|
1417 | This is very similar to buildNumericalReductionIntrinsic. You could combine these into one by passing a boolean to control whether there is a separate mask value or not. The only tricky bit here would be the different number of arguments to the buildFunc. It is a bit messy, but I think the easiest would be to have an extra unused mlir::Value argument to the build functions for the logical reductions and initialize it with nullptr when it is unused. |
Comment Actions
Thanks for the review.
Combined the logic of buildNumericalReductionIntrinsic and
buildLogicalReductionIntrinsic into a single function.
This is very similar to buildNumericalReductionIntrinsic. You could combine these into one by passing a boolean to control whether there is a separate mask value or not.
The only tricky bit here would be the different number of arguments to the buildFunc. It is a bit messy, but I think the easiest would be to have an extra unused mlir::Value argument to the build functions for the logical reductions and initialize it with nullptr when it is unused.