[PATCH] D52434: [OpenMP] Make default schedules for NVPTX target regions in SPMD mode achieve coalescing

Alexey Bataev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 25 10:30:42 PDT 2018


ABataev added inline comments.


================
Comment at: lib/CodeGen/CGStmtOpenMP.cpp:2304
+      const auto *C = S.getSingleClause<OMPScheduleClause>();
+      if (C) {
+        // If schedule clause is present.
----------------
Restore original code here


================
Comment at: lib/CodeGen/CGStmtOpenMP.cpp:2317
+        // When schedule clause is absent we choose sensible defaults.
+        CGM.getOpenMPRuntime().chooseDefaultSchedule(&ScheduleKind.Schedule);
+        Chunk = CGM.getOpenMPRuntime().getDefaultChunkValue(
----------------
Why you don't want to have only one function for the default scheduling/chunk? Also, you should change `DistSchedule` code, not `Schedule`


================
Comment at: lib/CodeGen/CGStmtOpenMP.cpp:3337
       }
+
       const unsigned IVSize = getContext().getTypeSize(IVExpr->getType());
----------------
Restore original


Repository:
  rC Clang

https://reviews.llvm.org/D52434





More information about the cfe-commits mailing list