[PATCH] [OPENMP] Codegen for 'omp critical' directive.
Alexey Bataev
a.bataev at hotmail.com
Mon Sep 22 01:25:31 PDT 2014
Hal, Thanks!
================
Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:231
@@ +230,3 @@
+ auto RuntimeCriticalName = Out.str();
+ auto LockIter = CriticalRegionVarNames.find(RuntimeCriticalName);
+ if (LockIter != CriticalRegionVarNames.end())
----------------
hfinkel wrote:
> Instead of calling find here, when you call GetOrCreateValue below, return Elem.getValue() if it is non-null.
>
Ok, done.
================
Comment at: test/OpenMP/critical_codegen.cpp:6
@@ +5,3 @@
+
+#ifndef HEADER
+#define HEADER
----------------
hfinkel wrote:
> We don't need the inclusion guards here.
No, we need it, because of "-include-pch %t" in the third RUN command. Without inclusion guard there are errors because of duplicated symbols.
http://reviews.llvm.org/D5202
More information about the cfe-commits
mailing list