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

Chirag Khandelwal via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 15 09:49:51 PDT 2021


AMDChirag added inline comments.


================
Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:3579
+        SectionCBVector.push_back(SectionCB);
+      }
+    } else {
----------------
jdoerfert wrote:
> Why do we unpack the children here instead of making a single call back for the CapturedStmt?
Because there is a bunch of additional IR (creation of switch statement and its cases/blocks, loop counter based on count of children) that is generated by `createSections`. If the children are not unpacked and `CapturedStmt` is directly passed to `EmitOMPRegionBody` in the callback, `createSections` will not be able to generate the required IR to encase the `section` constructs with.


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