[PATCH] D56413: [OpenMP] Avoid remainder operations for loop index values on a collapsed loop nest.

Alexey Bataev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 8 08:50:53 PST 2019


ABataev added inline comments.


================
Comment at: lib/Sema/SemaOpenMP.cpp:5520
+    ExprResult Acc =
+          SemaRef.ActOnIntegerConstant(SourceLocation(), 0).get();
+    for (unsigned int Cnt = 0; Cnt < NestedLoopCount; Cnt++) {
----------------
No need for `.get()` here


================
Comment at: lib/Sema/SemaOpenMP.cpp:5521
+          SemaRef.ActOnIntegerConstant(SourceLocation(), 0).get();
+    for (unsigned int Cnt = 0; Cnt < NestedLoopCount; Cnt++) {
       LoopIterationSpace &IS = IterSpaces[Cnt];
----------------
Use preincrement


================
Comment at: lib/Sema/SemaOpenMP.cpp:5529
+          SemaRef.ActOnIntegerConstant(SourceLocation(), 1).get();
+      for (unsigned int K = Cnt+1; K < NestedLoopCount; K++)
+        Prod =
----------------
1. Preincrement.
2. Format.


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56413/new/

https://reviews.llvm.org/D56413





More information about the cfe-commits mailing list