[PATCH] D64592: [OpenMP] Fix unified memory implementation for multiple compilation units

Alexey Bataev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 11 14:12:17 PDT 2019


ABataev added inline comments.


================
Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:2567
+      std::hash<std::string> HashFn;
+      size_t hash = 0;
+      if (!CGM.getCodeGenOpts().MainFileName.empty())
----------------
1. Capitalize the first letter in tbe variable name.
2. Why do you need to use hash? Could you use variable sourcelocation instead?
Also, what if the variable is defined in one file but declared in another one file. Will it be linked correctly?


================
Comment at: lib/Sema/SemaOpenMP.cpp:2625
+      bool IsUsingUnifiedMemory =
+          Stack->hasRequiresDeclWithClause<OMPUnifiedSharedMemoryClause>();
       if (VD->hasGlobalStorage() && CS && !CS->capturesVariable(VD) &&
----------------
I assume the changes in this file are from the different fix.


Repository:
  rC Clang

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

https://reviews.llvm.org/D64592





More information about the cfe-commits mailing list