[compiler-rt] [libcxxabi] [libcxx] [llvm] [libc] [clang-tools-extra] [lldb] [flang] [lld] [clang] [Flang][OpenMP] Push genEval calls to individual operations, NFC (PR #77758)

Kiran Chandramohan via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 15 03:49:57 PST 2024


================
@@ -110,6 +110,34 @@ static void gatherFuncAndVarSyms(
   }
 }
 
+static Fortran::lower::pft::Evaluation *
+getCollapsedEval(Fortran::lower::pft::Evaluation &eval, int collapseValue) {
+  // Return the Evaluation of the innermost collapsed loop, or the current
+  // evaluation, if there is nothing to collapse.
+  if (collapseValue == 0)
+    return &eval;
----------------
kiranchandramohan wrote:

Nit: Is it better to convert this to an assert (for > 0) and move this code to the parent function?

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


More information about the cfe-commits mailing list