[PATCH] D75206: [MLIR] Add explicit initial values for loop.parallel op.
Mehdi AMINI via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Mar 8 14:24:17 PDT 2020
mehdi_amini added inline comments.
================
Comment at: mlir/lib/Dialect/LoopOps/LoopOps.cpp:413
+ // Parse step value.
+ SmallVector<OpAsmParser::OperandType, 4> initVals;
----------------
Nit: the comment needs an update here.
================
Comment at: mlir/lib/Dialect/LoopOps/LoopOps.cpp:434
+
// Parse attributes and optional results (in case there is a reduce).
if (parser.parseOptionalAttrDict(result.attributes) ||
----------------
Have you considered having the type closer to the init?
%res = loop.parallel (%i0) = (%arg0) to (%arg1) step (%arg2) init (%zero : f32) {
or
%res = loop.parallel (%i0) = (%arg0) to (%arg1) step (%arg2) init (%zero) -> f32 {
Having to skip visually the body is not the most readable to me.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75206/new/
https://reviews.llvm.org/D75206
More information about the llvm-commits
mailing list