]> granicus.if.org Git - clang/commit
[OPENMP] Codegen for 'omp critical' directive.
authorAlexey Bataev <a.bataev@hotmail.com>
Mon, 22 Sep 2014 10:01:53 +0000 (10:01 +0000)
committerAlexey Bataev <a.bataev@hotmail.com>
Mon, 22 Sep 2014 10:01:53 +0000 (10:01 +0000)
commitdbf602a154064ec2d229a3dc3f78abf19b6d19be
tree9f7263f5198b021953d37783b0215ea432197ce9
parent5acd9709d79e3c80e92a0d43884c671a034e2a01
[OPENMP] Codegen for 'omp critical' directive.
This patch adds codegen for constructs:
#pragma omp critical [name]
<body>

It generates global variable ".gomp_critical_user_[name].var" of type int32[8]. Then it generates library call "kmpc_critical(loc, gtid, .gomp_critical_user_[name].var)", code for <body> statement and final call "kmpc_end_critical(loc, gtid, .gomp_critical_user_[name].var)".
Differential Revision: http://reviews.llvm.org/D5202

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@218239 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGOpenMPRuntime.cpp
lib/CodeGen/CGOpenMPRuntime.h
lib/CodeGen/CGStmtOpenMP.cpp
test/OpenMP/critical_codegen.cpp [new file with mode: 0644]