- Apr 27, 2015
-
-
Reid Kleckner authored
This was a bug in r218285 that prevented us from seeing subsequent virtual bases in the class hierarchy, leading to crashes later. Also add some comments to this function, now that we better understand what it's trying to do. Fixes PR21062 and PR21064. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@235899 91177308-0d34-0410-b5e6-96231b3b80d8
-
Alexey Bataev authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@235838 91177308-0d34-0410-b5e6-96231b3b80d8
-
Alexey Bataev authored
Emit the following code for 'taskwait' directive within tied task: call i32 @__kmpc_omp_taskwait(<loc>, i32 <thread_id>); Differential Revision: http://reviews.llvm.org/D9245 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@235836 91177308-0d34-0410-b5e6-96231b3b80d8
-
Alexey Bataev authored
Emit a code for reduction clause. Next code should be emitted for reductions: static kmp_critical_name lock = { 0 }; void reduce_func(void *lhs[<n>], void *rhs[<n>]) { *(Type0*)lhs[0] = ReductionOperation0(*(Type0*)lhs[0], *(Type0*)rhs[0]); ... *(Type<n>-1*)lhs[<n>-1] = ReductionOperation<n>-1(*(Type<n>-1*)lhs[<n>-1], *(Type<n>-1*)rhs[<n>-1]); } ... void *RedList[<n>] = {&<RHSExprs>[0], ..., &<RHSExprs>[<n>-1]}; switch (__kmpc_reduce{_nowait}(<loc>, <gtid>, <n>, sizeof(RedList), RedList, reduce_func, &<lock>)) { case 1: <LHSExprs>[0] = ReductionOperation0(*<LHSExprs>[0], *<RHSExprs>[0]); ... <LHSExprs>[<n>-1] = ReductionOperation<n>-1(*<LHSExprs>[<n>-1], *<RHSExprs>[<n>-1]); __kmpc_end_reduce{_nowait}(<loc>, <gtid>, &<lock>); break; case 2: Atomic(<LHSExprs>[0] = ReductionOperation0(*<LHSExprs>[0], *<RHSExprs>[0])); ... Atomic(<LHSExprs>[<n>-1] = ReductionOperation<n>-1(*<LHSExprs>[<n>-1], *<RHSExprs>[<n>-1])); break; default:; } Reduction variables are a kind of a private variables, they have private copies, but initial values are chosen in accordance with the reduction operation. If sections directive has only single section, then original shared variables are used instead with barrier at the end of the directive. Differential Revision: http://reviews.llvm.org/D9242 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@235835 91177308-0d34-0410-b5e6-96231b3b80d8
-
Alexey Bataev authored
#pragma omp sections lastprivate(<var>) <BODY>; This construct is translated into something like: <last_iter> = alloca i32 <init for lastprivates>; <last_iter> = 0 ; No initializer for simple variables or a default constructor is called for objects. ; For arrays perform element by element initialization by the call of the default constructor. ... OMP_FOR_START(...,<last_iter>, ..); sets <last_iter> to 1 if this is the last iteration. <BODY> ... OMP_FOR_END if (<last_iter> != 0) { <final copy for lastprivate>; Update original variable with the lastprivate value. } call __kmpc_cancel_barrier() ; an implicit barrier to avoid possible data race. If there is only one section, there is no special code generation, original shared variables are used + barrier is emitted at the end of the directive. Differential Revision: http://reviews.llvm.org/D9240 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@235834 91177308-0d34-0410-b5e6-96231b3b80d8
-
Alexey Bataev authored
If there are 2 or more sections in a 'section' directive the following code is generated: <default init for privates> @__kmpc_for_static_init_4(); <BODY for sections directive> @__kmpc_for_static_fini() If there is only one section, the following code is generated: if (@__kmpc_single()) { <default init for privates> @__kmpc_end_single(); } Differential Revision: http://reviews.llvm.org/D9239 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@235833 91177308-0d34-0410-b5e6-96231b3b80d8
-
Alexey Bataev authored
Emit the following code for 'single' directive with 'private' clause: if (@__kmpc_single()) { <default init for privates> @__kmpc_end_single(); } Differential Revision: http://reviews.llvm.org/D9238 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@235832 91177308-0d34-0410-b5e6-96231b3b80d8
-
David Majnemer authored
Make the canonicalization of array types more consistent. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@235831 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Apr 26, 2015
-
-
David Majnemer authored
We could probably make this work if we cared enough. However, we are far outside any language rules at this point. This fixes PR21834. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@235818 91177308-0d34-0410-b5e6-96231b3b80d8
-
David Majnemer authored
VerifyBitField must be called if we are to form a bitfield FieldDecl. We will not verify the bitfield if the decl is known to be malformed in other ways; pretend that we don't have a bitfield if this happens. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@235816 91177308-0d34-0410-b5e6-96231b3b80d8
-
John McCall authored
Fixes rdar://20621065. A more elegant fix would preclude this case by defining the rules such that zero-size classes are always formally empty. I believe the only extensions which create zero-size classes right now are flexible arrays and zero-length arrays; it's not abstractly unreasonable to say that those don't count as members for the purposes of emptiness, just as zero-width bitfields don't count. But that's an ABI-affecting change and requires further discussion; in the meantime, let's not assert / miscompile. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@235815 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Apr 25, 2015
-
-
Davide Italiano authored
Don't assume it's always is. This prevents a crash in Sema while trying to merge return type for a builtin w/out function prototype. PR: 23086 Differential Revision: http://reviews.llvm.org/D9235 Reviewed by: rsmith git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@235806 91177308-0d34-0410-b5e6-96231b3b80d8
-
Justin Bogner authored
This fixes a crash when we're emitting coverage and a macro appears between two binary conditional operators, ie, "foo ?: MACRO ?: bar", and fixes the interaction of macros and conditional operators in general. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@235793 91177308-0d34-0410-b5e6-96231b3b80d8
-
Nico Weber authored
Before this patch, passing a non-existent absolute path to clang-cl would cause stat'ing of impossible paths. For example, `clang-cl -c d:\adsfasdf.txt` would cause a stat of C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\LIBd:\asdfadsf.cc git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@235787 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Apr 24, 2015
-
-
David Blaikie authored
[opaque pointer type] Update test cases now that the type for an invoke is just a function type, not a pointer-to-function type git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@235756 91177308-0d34-0410-b5e6-96231b3b80d8
-
Lang Hames authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@235750 91177308-0d34-0410-b5e6-96231b3b80d8
-
Lang Hames authored
AsmPrinter owns the OutStreamer, so an owning pointer makes sense here. Using a reference for this is crufty. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@235749 91177308-0d34-0410-b5e6-96231b3b80d8
-
Daniel Jasper authored
Before: a() .aaaaa() .aaaaa() .aaaaa(); After: a().aaaaa() .aaaaa() .aaaaa(); git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@235707 91177308-0d34-0410-b5e6-96231b3b80d8
-
Daniel Jasper authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@235702 91177308-0d34-0410-b5e6-96231b3b80d8
-
Craig Topper authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@235698 91177308-0d34-0410-b5e6-96231b3b80d8
-
Alexey Bataev authored
Emit the following code for 'single' directive with 'firtstprivate' clause: if (@__kmpc_single()) { <init for firstprivates> @__kmpc_end_single(); } @__kmpc_cancel_barrier(); // To avoid data race in firstprivate init Differential Revision: http://reviews.llvm.org/D9223 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@235694 91177308-0d34-0410-b5e6-96231b3b80d8
-
David Majnemer authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@235693 91177308-0d34-0410-b5e6-96231b3b80d8
-
Alexey Bataev authored
Runtime function for 'copyprivate' directive generates implicit barriers, so no need to emit it. Differential Revision: http://reviews.llvm.org/D9215 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@235692 91177308-0d34-0410-b5e6-96231b3b80d8
-
Alexey Bataev authored
If there are 2 or more sections in a 'section' directive the following code is generated: <init for firstprivates> @__kmpc_cancel_barrier();// To avoid data race in firstprivate init @__kmpc_for_static_init_4(); <BODY for sections directive> @__kmpc_for_static_fini() If there is only one section, the following code is generated: if (@__kmpc_single()) { <init for firstprivates> @__kmpc_end_single(); } @__kmpc_cancel_barrier(); // To avoid data race in firstprivate init Differential Revision: http://reviews.llvm.org/D9214 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@235691 91177308-0d34-0410-b5e6-96231b3b80d8
-
David Majnemer authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@235682 91177308-0d34-0410-b5e6-96231b3b80d8
-
David Majnemer authored
Member pointers in the MS ABI have different alignment depending on whether they were created on the stack or live in a record. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@235681 91177308-0d34-0410-b5e6-96231b3b80d8
-
David Majnemer authored
No functional change intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@235680 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
The surrounding infrastructure isn't quite ready for this yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@235677 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@235669 91177308-0d34-0410-b5e6-96231b3b80d8
-
Justin Bogner authored
The RegionCounter type does a lot of legwork, but most of it is only meaningful within the implementation of CodeGenPGO. The uses elsewhere in CodeGen generally just want to increment or read counters, so do that directly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@235664 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
[modules] Properly attribute macros to modules if they're in a file textually included into a file in the module. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@235661 91177308-0d34-0410-b5e6-96231b3b80d8
-
- Apr 23, 2015
-
-
Sergey Matveev authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@235650 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
Since we now track module macros separately from their visibility state, this is no longer necessary. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@235648 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
[modules] Store a ModuleMacro* on an imported macro directive rather than duplicating the info within it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@235644 91177308-0d34-0410-b5e6-96231b3b80d8
-
Sergey Matveev authored
Moved from https://code.google.com/p/address-sanitizer/wiki/AsanCoverage git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@235643 91177308-0d34-0410-b5e6-96231b3b80d8
-
Richard Smith authored
Previously we'd defer this determination until writing the AST, which doesn't allow us to use this information when building other submodules of the same module. This change also allows us to use a uniform mechanism for writing module macro records, independent of whether they are local or imported. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@235614 91177308-0d34-0410-b5e6-96231b3b80d8
-
Reid Kleckner authored
In r235553, Clang started emitting lifetime markers more often. This caused false negative in MSan, because MSan only poisons all allocas once at function entry. Eventually, MSan should poison allocas at lifetime start and probably also lifetime end, but until then, let's not emit markers that aren't going to be useful. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@235613 91177308-0d34-0410-b5e6-96231b3b80d8
-
Aaron Ballman authored
Extend format specifier checking to include field function pointers in addition to variable function pointers. Addresses PR21082. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@235606 91177308-0d34-0410-b5e6-96231b3b80d8
-
Aaron Ballman authored
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@235605 91177308-0d34-0410-b5e6-96231b3b80d8
-
Daniel Jasper authored
Before: LoooooooooooooooooooooooooooooooooooooooongType LoooooooooooooooooooooooooooooooooooooongVariable([A a]); After: LoooooooooooooooooooooooooooooooooooooooongType LoooooooooooooooooooooooooooooooooooooongVariable([A a]); git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@235599 91177308-0d34-0410-b5e6-96231b3b80d8
-