[PATCH] [OPENMP] Codegen for 'omp critical' directive.

hfinkel at anl.gov hfinkel at anl.gov
Mon Sep 22 00:38:00 PDT 2014


LGTM.

================
Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:231
@@ +230,3 @@
+  auto RuntimeCriticalName = Out.str();
+  auto LockIter = CriticalRegionVarNames.find(RuntimeCriticalName);
+  if (LockIter != CriticalRegionVarNames.end())
----------------
Instead of calling find here, when you call GetOrCreateValue below, return Elem.getValue() if it is non-null.


================
Comment at: test/OpenMP/critical_codegen.cpp:6
@@ +5,3 @@
+
+#ifndef HEADER
+#define HEADER
----------------
We don't need the inclusion guards here.

http://reviews.llvm.org/D5202






More information about the cfe-commits mailing list