|  | Commit message (Collapse) | Author | Age | Files | Lines | 
|---|
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | Summary:
This patch implements the launching of a target region in the presence of a nested teams region, i.e calls tgt_target_teams with the required arguments gathered from the enclosed teams directive.
The actual codegen of the region enclosed by the teams construct will be contributed in a separate patch.
Reviewers: hfinkel, arpith-jacob, kkwli0, carlo.bertolli, ABataev
Subscribers: cfe-commits, caomhin, fraggamuffin
Differential Revision: http://reviews.llvm.org/D17019
llvm-svn: 262625 | 
| | 
| 
| 
| | llvm-svn: 262619 | 
| | 
| 
| 
| 
| 
| | Differential Revision: http://reviews.llvm.org/D17826
llvm-svn: 262617 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | Applying the following restrictions for block types in OpenCL (v2.0 s6.12.5):
 - __block storage class is disallowed
 - every block declaration must be const qualified and initialized
 - a block can't be used as a return type of a function
 - a blocks can't be used to declare a structure or union field
 - extern speficier is disallowed
Corrected image and sampler types diagnostics with struct and unions.
Review: http://reviews.llvm.org/D16928
llvm-svn: 262616 | 
| | 
| 
| 
| 
| 
| | Differential Revision: http://reviews.llvm.org/D17814
llvm-svn: 262611 | 
| | 
| 
| 
| 
| 
| | Differential Revision: http://reviews.llvm.org/D17814
llvm-svn: 262609 | 
| | 
| 
| 
| 
| 
| | Differential Revision: http://reviews.llvm.org/D17812
llvm-svn: 262598 | 
| | 
| 
| 
| 
| 
| | Differential Revision: http://reviews.llvm.org/D17754
llvm-svn: 262593 | 
| | 
| 
| 
| 
| 
| 
| | I've tried to keep the infrastructure behind parameter ABI
treatments fairly general.
llvm-svn: 262587 | 
| | 
| 
| 
| 
| 
| | protocols.
llvm-svn: 262584 | 
| | 
| 
| 
| | llvm-svn: 262583 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | Add parsing, sema analysis and serialization/deserialization for 'declare reduction' construct.
User-defined reductions are defined as
#pragma omp declare reduction( reduction-identifier : typename-list : combiner ) [initializer ( initializer-expr )]
These custom reductions may be used in 'reduction' clauses of OpenMP constructs. The combiner specifies how partial results can be combined into a single value. The
combiner can use the special variable identifiers omp_in and omp_out that are of the type of the variables being reduced with this reduction-identifier. Each of them will
denote one of the values to be combined before executing the combiner. It is assumed that the special omp_out identifier will refer to the storage that holds the resulting
combined value after executing the combiner.
As the initializer-expr value of a user-defined reduction is not known a priori the initializer-clause can be used to specify one. Then the contents of the initializer-clause
will be used as the initializer for private copies of reduction list items where the omp_priv identifier will refer to the storage to be initialized. The special identifier
omp_orig can also appear in the initializer-clause and it will refer to the storage of the original variable to be reduced.
Differential Revision: http://reviews.llvm.org/D11182
llvm-svn: 262582 | 
| | 
| 
| 
| 
| 
| 
| 
| | OpenMP 4.5 allows to privatize data members of current class in member
functions. Patch adds initial support for privatization of data members
in 'linear' clause, no codegen support.
llvm-svn: 262578 | 
| | 
| 
| 
| 
| 
| | Like r262539, but for pointers_to_members.
llvm-svn: 262552 | 
| | 
| 
| 
| 
| 
| 
| | fix a bug with the instantiation of ns_consumed parameter
attributes in ARC.
llvm-svn: 262551 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| | the test directory.
Also fix a bug with /Fp and absolute paths uncovered by this.
Follow-up to r262487.
llvm-svn: 262541 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | pragma ms_struct has an effect on struct decls, and the effect is serialized
correctly already.  But the "is ms_struct currently on" state wasn't before
this change.
This uses the same approach as `pragma clang optimize`: When writing a module,
the state isn't serialized, only when writing a pch file.
llvm-svn: 262539 | 
| | 
| 
| 
| 
| 
| 
| 
| | It will now be on by default on Darwin.
rdar://problem/6953275
llvm-svn: 262526 | 
| | 
| 
| 
| 
| 
| 
| 
| | It will now be on by default on Darwin.
rdar://problem/6927496
llvm-svn: 262524 | 
| | 
| 
| 
| | llvm-svn: 262520 | 
| | 
| 
| 
| 
| 
| 
| 
| | * Run cc with -triple x86_64-linux-gnu to make symbol mangling predictable.
* Use temporary file as a fake GPU input so its content
  does not interfere with pattern matching.
llvm-svn: 262516 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | This patch changes cc1 option for PGO profile use from
-fprofile-instr-use=<path> to -fprofile-instrument-use-path=<path>.
-fprofile-instr-use=<path> is now a driver only option.
In addition to decouple the cc1 option from the driver level option, this patch
also enables IR level profile use. cc1 option handling now reads the profile
header and sets CodeGenOpt ProfileUse (valid values are {None, Clang, LLVM}
-- this is a common enum for -fprofile-instrument={}, for the profile
instrumentation), and invoke the pipeline to enable the respective PGO use pass.
Reviewers: silvas, davidxl
Differential Revision: http://reviews.llvm.org/D17737
llvm-svn: 262515 | 
| | 
| 
| 
| | llvm-svn: 262508 | 
| | 
| 
| 
| 
| 
| 
| | This is like r262493, but for pragma detect_mismatch instead of pragma comment.
The two pragmas have similar behavior, so use the same approach for both.
llvm-svn: 262506 | 
| | 
| 
| 
| | llvm-svn: 262503 | 
| | 
| 
| 
| 
| 
| | Differential Revision: http://reviews.llvm.org/D17780
llvm-svn: 262499 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | ... and register them with CUDA runtime.
This is needed for commonly used cudaMemcpy*() APIs that use address of
host-side shadow to access their counterparts on device side.
Fixes PR26340
Differential Revision: http://reviews.llvm.org/D17779
llvm-svn: 262498 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | `#pragma comment` was handled by Sema calling a function on ASTConsumer, and
CodeGen then implementing this function and writing things to its output.
Instead, introduce a PragmaCommentDecl AST node and hang one off the
TranslationUnitDecl for every `#pragma comment` line, and then use the regular
serialization machinery. (Since PragmaCommentDecl has codegen relevance, it's
eagerly deserialized.)
http://reviews.llvm.org/D17799
llvm-svn: 262493 | 
| | 
| 
| 
| 
| 
| 
| | location as we cannot assume the location of the input file to be
writable.
llvm-svn: 262487 | 
| | 
| 
| 
| 
| 
| | Differential Revision: http://reviews.llvm.org/D17706
llvm-svn: 262481 | 
| | 
| 
| 
| 
| 
| | Differential Revision: http://reviews.llvm.org/D17699
llvm-svn: 262471 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | Sema allows max values up to 2**28, use unsigned instead of unsiged
short to hold values that large.
Differential Revision: http://reviews.llvm.org/D17248
Patch by Don Hinton!
llvm-svn: 262466 | 
| | 
| 
| 
| 
| 
| 
| 
| | OpenMP 4.5 allows to privatize non-static data members of current class
in non-static member functions. Patch supports codegen for non-static
data members in 'reduction' clauses.
llvm-svn: 262460 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | Summary:
This change just adds tests for some corner cases of dllimport/dllexport,
primarily for some static methods.
We plan to enable dllimport/dllexport support for the PS4, and these
additional tests are for points we previously were testing internally.
-Warren Ristow
SN Systems - Sony Computer Entertainment Group
Reviewers: rnk
Subscribers: silvas
Differential Revision: http://reviews.llvm.org/D17775
llvm-svn: 262442 | 
| | 
| 
| 
| 
| 
| | This is useful when paired with the distribution targets to build prerequisites for running tests.
llvm-svn: 262429 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | In the gcc precompiled header model, one explicitly runs clang with `-x
c++-header` on a .h file to produce a gch file, and then includes the header
with `-include foo.h` and if a .gch file exists for that header it gets used.
This is documented at
http://clang.llvm.org/docs/UsersManual.html#precompiled-headers
cl.exe's model is fairly different, and controlled by the two flags /Yc and
/Yu. A pch file is generated as a side effect of a regular compilation when
/Ycheader.h is passed. While the compilation is running, the compiler keeps
track of #include lines in the main translation unit and writes everything up
to an `#include "header.h"` line into a pch file. Conversely, /Yuheader.h tells
the compiler to skip all code in the main TU up to and including `#include
"header.h"` and instead load header.pch. (It's also possible to use /Yc and /Yu
without an argument, in that case a `#pragma hrdstop` takes the role of
controlling the point where pch ends and real code begins.)
This patch implements limited support for this in that it requires the pch
header to be passed as a /FI force include flag – with this restriction,
it can be implemented almost completely in the driver with fairly small amounts
of code. For /Yu, this is trivial, and for /Yc a separate pch action is added
that runs before the actual compilation. After r261774, the first failing
command makes a compilation stop – this means if the pch fails to build the
main compilation won't run, which is what we want. However, in /fallback builds
we need to run the main compilation even if the pch build fails so that the
main compilation's fallback can run. To achieve this, add a ForceSuccessCommand
that pretends that the pch build always succeeded in /fallback builds (the main
compilation will then fail to open the pch and run the fallback cl.exe
invocation).
If /Yc /Yu are used in a setup that clang-cl doesn't implement yet, clang-cl
will now emit a "not implemented yet; flag ignored" warning that can be
disabled using -Wno-clang-cl-pch.
Since clang-cl doesn't yet serialize some important things (most notably
`pragma comment(lib, ...)`, this feature is disabled by default and only
enabled by an internal driver flag. Once it's more stable, this internal flag
will disappear.
(The default stdafx.h setup passes stdafx.h as explicit argument to /Yc but not
as /FI – instead every single TU has to `#include <stdafx.h>` as first thing it
does. Implementing support for this should be possible with the approach in
this patch with minimal frontend changes by passing a --stop-at / --start-at
flag from the driver to the frontend. This is left for a follow-up. I don't
think we ever want to support `#pragma hdrstop`, and supporting it with this
approach isn't easy: This approach relies on the driver knowing the pch
filename in advance, and `#pragma hdrstop(out.pch)` can set the output
filename, so the driver can't know about it in advance.)
clang-cl now also honors /Fp and puts pch files in the same spot that cl.exe
would put them, but the pch file format is of course incompatible. This has
ramifications on /fallback, so /Yc /Yu aren't passed through to cl.exe in
/fallback builds.
http://reviews.llvm.org/D17695
llvm-svn: 262420 | 
| | 
| 
| 
| 
| 
| | equivalent tests
llvm-svn: 262418 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | ARC ownership-convention function type modifications.
According to the Itanium ABI, vendor extended qualifiers are
supposed to be mangled in reverse-alphabetical order before
any CVR qualifiers.  The ARC function type conventions are
plausibly order-significant (they are associated with the
function type), which permits us to ignore the need to correctly
inter-order them with any other vendor qualifiers on the parameter
and return types.
Implementing these rules correctly is technically an ABI break.
Apple is comfortable with the risk of incompatibility here for
the ARC features, and I believe that address-space qualification
is still uncommon enough to allow us to adopt the conforming
rule without serious risk.  Still, targets which make heavy
use of address space qualification may want to revert to the
non-conforming order.
llvm-svn: 262414 | 
| | 
| 
| 
| 
| 
| 
| | This should fix clang-cmake-mips builder since MIPS does not have IAS enabled
by default (yet).
llvm-svn: 262409 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| | We'd lose track of the parent CodeGenFunction, leading us to get
confused with regard to which function a nested finally belonged to.
Differential Revision: http://reviews.llvm.org/D17752
llvm-svn: 262379 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | vec_vsx_st intrinsics
Issue: https://llvm.org/bugs/show_bug.cgi?id=26720
Fix compile error when building ffmpeg for PowerPC64LE because of some
vec_vsx_ld/vec_vsx_st intrinsics are not supported by current clang.
New added intrinsics:
(vector) {signed|unsigned} {short|char} vec_vsx_ld: (total: 8)
bool vec_vsx_ld: (total: 1)
(vector) {signed|unsigned} {short|char} vec_vsx_st: (total: 8)
bool vec_vsx_st: (total: 1)
Total: 18 intrinsics
Phabricator: http://reviews.llvm.org/D17637
llvm-svn: 262359 | 
| | 
| 
| 
| 
| 
| | Differential Revision: http://reviews.llvm.org/D17714
llvm-svn: 262355 | 
| | 
| 
| 
| 
| 
| 
| | This should fix clang-cmake-mips builder since MIPS does not have IAS enabled
by default (yet).
llvm-svn: 262350 | 
| | 
| 
| 
| 
| 
| | Differential Revision: http://reviews.llvm.org/D17718
llvm-svn: 262326 | 
| | 
| 
| 
| 
| 
| | in the test.
llvm-svn: 262325 | 
| | 
| 
| 
| 
| 
| | Differential Revision: http://reviews.llvm.org/D17693
llvm-svn: 262321 | 
| | 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| | This behavior is enabled when the new CXTranslationUnit_KeepGoing
option is passed to clang_parseTranslationUnit{,2}. It is geared
towards use by IDEs and similar consumers of the clang-c API where
fatal errors may arise when parsing incomplete code mid-edit, or
when include paths are not properly configured yet. In such situations
one still wants to get as much information as possible about a TU.
Previously, the semantic analysis would not instantiate templates
or report additional fatal errors after the first fatal error was
encountered.
Fixes PR24268.
Patch by Milian Wolff.
llvm-svn: 262318 | 
| | 
| 
| 
| | llvm-svn: 262311 | 
| | 
| 
| 
| 
| 
| | related test.
llvm-svn: 262295 | 
| | 
| 
| 
| 
| 
| 
| | -bitcode_bundle is only passed to the darwin ld64 linker and it is only
implemented there. Remove the check on the linker flag.
llvm-svn: 262286 |