summaryrefslogtreecommitdiffstats
path: root/test/OpenMP/critical_codegen.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Remove unnecessary x86 backend requirements from OpenMP testsReid Kleckner2016-10-211-1/+0
| | | | | | Clang can generate LLVM IR for x86 without a registered x86 backend. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@284836 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Fix for codegen of captured variables in inlined directives.Alexey Bataev2016-04-271-0/+2
| | | | | | | | Currently there is a problem with codegen of inlined directives inside lambdas, it may cause a crash during codegen because of incorrect capturing of variables. Patch fixes this problem. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@267677 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Allow runtime insert its own code inside OpenMP regions.Alexey Bataev2016-03-291-0/+4
| | | | | | | | | | Solution unifies interface of RegionCodeGenTy type to allow insert runtime-specific code before/after main codegen action defined in CGStmtOpenMP.cpp file. Runtime should not define its own RegionCodeGenTy for general OpenMP directives, but must be allowed to insert its own (required) code to support target specific codegen. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@264700 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "[OPENMP] Allow runtime insert its own code inside OpenMP regions."Alexey Bataev2016-03-281-4/+0
| | | | | | Reverting because of failed tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@264577 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Allow runtime insert its own code inside OpenMP regions.Alexey Bataev2016-03-281-0/+4
| | | | | | | | | | Solution unifies interface of RegionCodeGenTy type to allow insert runtime-specific code before/after main codegen action defined in CGStmtOpenMP.cpp file. Runtime should not define its own RegionCodeGenTy for general OpenMP directives, but must be allowed to insert its own (required) code to support target specific codegen. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@264576 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "[OPENMP] Allow runtime insert its own code inside OpenMP regions."Alexey Bataev2016-03-281-4/+0
| | | | | | This reverts commit 3ee791165100607178073f14531a0dc90c622b36. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@264570 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Allow runtime insert its own code inside OpenMP regions.Alexey Bataev2016-03-281-0/+4
| | | | | | | | | | Solution unifies interface of RegionCodeGenTy type to allow insert runtime-specific code before/after main codegen action defined in CGStmtOpenMP.cpp file. Runtime should not define its own RegionCodeGenTy for general OpenMP directives, but must be allowed to insert its own (required) code to support target specific codegen. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@264569 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Fix for http://llvm.org/PR25878: Error compiling an OpenMP programAlexey Bataev2015-12-181-0/+8
| | | | | | | OpenMP codegen tried to emit the code for its constructs even if it was detected as a dead-code. Added checks to ensure that the code is emitted if the code is not dead. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@255990 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP 4.5] Fix test compatibility with 32 bit mode.Alexey Bataev2015-12-151-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@255640 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP 4.5] Codegen for 'hint' clause of 'critical' directiveAlexey Bataev2015-12-151-0/+6
| | | | | | | OpenMP 4.5 defines 'hint' clause for 'critical' directive. Patch adds codegen for this clause. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@255639 91177308-0d34-0410-b5e6-96231b3b80d8
* Stop messing with the 'g' group of options in CompilerInvocation.Douglas Katzman2015-10-081-1/+1
| | | | | | | | | | | | | | | | With this change, most 'g' options are rejected by CompilerInvocation. They remain only as Driver options. The new way to request debug info from cc1 is with "-debug-info-kind={line-tables-only|limited|standalone}" and "-dwarf-version={2|3|4}". In the absence of a command-line option to specify Dwarf version, the Toolchain decides it, rather than placing Toolchain-specific logic in CompilerInvocation. Also fix a bug in the Windows compatibility argument parsing in which the "rightmost argument wins" principle failed. Differential Revision: http://reviews.llvm.org/D13221 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@249655 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Fix for http://llvm.org/PR24674: assertion failed and and abort trapAlexey Bataev2015-09-041-0/+17
| | | | | | | Fix processing of shared variables with reference types in OpenMP constructs. Previously, if the variable was not marked in one of the private clauses, the reference to this variable was emitted incorrectly and caused an assertion later. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246846 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Revert r241620 and follow-up commits" and move the initializationAdrian Prantl2015-07-081-1/+1
| | | | | | of the llvm targets from clang/CodeGen into ClangCheck.cpp and CIndex.cpp. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241653 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r241620 and follow-up commits while investigating linux buildbot ↵Adrian Prantl2015-07-071-1/+1
| | | | | | failures. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241642 91177308-0d34-0410-b5e6-96231b3b80d8
* Wrap clang modules and pch files in an object file container.Adrian Prantl2015-07-071-1/+1
| | | | | | | | | | | | | This patch adds ObjectFilePCHContainerOperations uses the LLVM backend to put the contents of a PCH into a __clangast section inside a COFF, ELF, or Mach-O object file container. This is done to facilitate module debugging by makeing it possible to store the debug info for the types defined by a module alongside the AST. rdar://problem/20091852 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241620 91177308-0d34-0410-b5e6-96231b3b80d8
* Account for calling convention specifiers in function definitions in IR test ↵David Blaikie2015-06-291-7/+7
| | | | | | | | | | | | | cases Several tests wouldn't pass when executed on an armv7a_pc_linux triple due to the non-default arm_aapcs calling convention produced on the function definitions in the IR output. Account for this with the application of a little regex. Patch by Ying Yi. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@240971 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] -fopenmp enables OpenMP support (fix for http://llvm.org/PR23492)Alexey Bataev2015-05-201-4/+4
| | | | | | | | -fopenmp turns on OpenMP support and links libiomp5 as OpenMP library. Also there is -fopenmp={libiomp5|libgomp} option that allows to override effect of -fopenmp and link libgomp library (if -fopenmp=libgomp is specified). Differential Revision: http://reviews.llvm.org/D9736 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@237769 91177308-0d34-0410-b5e6-96231b3b80d8
* DebugInfo: Metadata constructs now start with DI*Duncan P. N. Exon Smith2015-04-291-2/+2
| | | | | | | | | | LLVM r236120 renamed debug info IR constructs to use a `DI` prefix, now that the `DIDescriptor` hierarchy has been gone for about a week. This commit was generated using the rename-md-di-nodes.sh upgrade script attached to PR23080, followed by running clang-format-diff.py on the `lib/` portion of the patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@236121 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Refactoring of codegen for OpenMP directives.Alexey Bataev2015-04-101-2/+2
| | | | | | | | Refactored API of OpenMPRuntime for compatibility with combined directives. Differential Revision: http://reviews.llvm.org/D8859 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@234564 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Fixed tests for non-debug builds. NFC.Alexey Bataev2015-03-101-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231758 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Improved code for generating debug info + generation of all OpenMP ↵Alexey Bataev2015-03-101-8/+19
| | | | | | | | | | regions in termination scope Patch adds proper generation of debug info for all OpenMP regions. Also, all OpenMP regions are generated in a termination scope, because standard does not allow to throw exceptions out of structured blocks, associated with the OpenMP regions Differential Revision: http://reviews.llvm.org/D7935 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231757 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "[OPENMP] Improved code for generating debug info + generation of all ↵Rafael Espindola2015-03-101-19/+8
| | | | | | | | | | | | | OpenMP regions in termination scope Patch adds proper generation of debug info for all OpenMP regions. Also, all OpenMP regions are generated in a termination scope, because standard does not allow to throw exceptions out of structured blocks, associated with the OpenMP regions Differential Revision: http://reviews.llvm.org/D7935" This reverts commit r231752. It was failing to link with cmake: lib64/libclangCodeGen.a(CGOpenMPRuntime.cpp.o):/home/espindola/llvm/llvm/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp:function clang::CodeGen::InlinedOpenMPRegionRAII::~InlinedOpenMPRegionRAII(): error: undefined reference to 'clang::CodeGen::EHScopeStack::popTerminate()' clang-3.7: error: linker command failed with exit code 1 (use -v to see invocation) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231754 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Improved code for generating debug info + generation of all OpenMP ↵Alexey Bataev2015-03-101-8/+19
| | | | | | | | | | regions in termination scope Patch adds proper generation of debug info for all OpenMP regions. Also, all OpenMP regions are generated in a termination scope, because standard does not allow to throw exceptions out of structured blocks, associated with the OpenMP regions Differential Revision: http://reviews.llvm.org/D7935 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@231752 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Fixed codegen for directives without function outlining.Alexey Bataev2015-02-261-0/+9
| | | | | | | Fixed crash on codegen for directives like 'omp for', 'omp single' etc. inside of the 'omp parallel', 'omp task' etc. regions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@230621 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Wrap clang module files in a Mach-O, ELF, or COFF container."Adrian Prantl2015-02-251-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@230454 91177308-0d34-0410-b5e6-96231b3b80d8
* Wrap clang module files in a Mach-O, ELF, or COFF container.Adrian Prantl2015-02-251-1/+1
| | | | | | | | | | | | | | | | | This is a necessary prerequisite for debugging with modules. The .pcm files become containers that hold the serialized AST which allows us to store debug information in the module file that can be shared by all object files that were built importing the module. This reapplies r230044 with a fixed configure+make build and updated dependencies and testcase requirements. Over the last iteration this version adds - missing target requirements for testcases that specify an x86 triple, - a missing clangCodeGen.a dependency to libClang.a in the make build. rdar://problem/19104245 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@230423 91177308-0d34-0410-b5e6-96231b3b80d8
* [OPENMP] Codegen for 'omp critical' directive.Alexey Bataev2014-09-221-0/+38
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