[PATCH] D102180: [Clang][OpenMP] Emit dependent PreInits before directive.

Alexey Bataev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 10 10:27:35 PDT 2021


ABataev added inline comments.


================
Comment at: clang/lib/AST/StmtOpenMP.cpp:128-129
+    llvm::function_ref<bool(unsigned, Stmt *)> Callback,
+    llvm::function_ref<bool(OMPLoopBasedDirective *)>
+        OnTransformationCallback) {
   CurStmt = CurStmt->IgnoreContainers();
----------------
Do we need `bool` return in the callback? I see that it returns `false` always.


================
Comment at: clang/lib/AST/StmtOpenMP.cpp:132-140
+    while (true) {
+      if (auto *Dir = dyn_cast<OMPTileDirective>(CurStmt)) {
+        if (OnTransformationCallback(Dir))
+          return false;
+        CurStmt = Dir->getTransformedStmt();
+        continue;
+      }
----------------
```
while (auto *Dir = dyn_cast<OMPTileDirective>(CurStmt)) {
  if (OnTransformationCallback(Dir))
    return false;
  CurStmt = Dir->getTransformedStmt();
}
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D102180



More information about the cfe-commits mailing list