[flang-commits] [flang] [flang][openacc] Lower loop directive to the new acc.loop op design (PR #65417)

Razvan Lupusoru via flang-commits flang-commits at lists.llvm.org
Wed Sep 6 12:39:21 PDT 2023


================
@@ -1343,11 +1345,21 @@ static void genWaitClause(Fortran::lower::AbstractConverter &converter,
   }
 }
 
+mlir::Type getTypeFromIvTypeSize(fir::FirOpBuilder &builder,
+                                 const Fortran::semantics::Symbol &ivSym) {
+  std::size_t ivTypeSize = ivSym.size();
+  if (ivTypeSize == 0)
+    llvm::report_fatal_error("unexpected induction variable size");
+  return builder.getIntegerType(ivTypeSize * 8);
----------------
razvanlupusoru wrote:

A comment explaining the mapping here would be useful. It is not immediately obvious what ivSym.size() produces or what 8 is.

https://github.com/llvm/llvm-project/pull/65417


More information about the flang-commits mailing list