[PATCH] D91054: [Clang][OpenMP] Frontend work for sections - D89671

Michael Kruse via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 9 15:23:36 PST 2020


Meinersbur added inline comments.


================
Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:3552-3554
+    using BodyGenCallbackTy =
+        llvm::function_ref<void(InsertPointTy AllocaIP, InsertPointTy CodeGenIP,
+                                llvm::BasicBlock & ContinuationBB)>;
----------------
Instead of duplicating it here, why not using `OpenMPIRBuilder::BodyGenCallbackTy`?


================
Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:3576
+    } else {
+      auto SectionCB = [this, CS](InsertPointTy AllocaIP,
+                                  InsertPointTy CodeGenIP,
----------------
In what situation would there be no `#pragma omp section` children?


================
Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:3584
+    }
+    ArrayRef<BodyGenCallbackTy> SectionCBs = makeArrayRef(SectionCBVector);
+
----------------
I think this is unnecessary; `SmallVector` converts implicitly to an `ArrayRef`


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D91054



More information about the cfe-commits mailing list