summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* [OPENMP] Add support for cancel constructs in `target teams distributeAlexey Bataev2017-11-227-10/+38
| | | | | | | | | parallel for`. Add support for cancel/cancellation point directives inside `target teams distribute parallel for` directives. llvm-svn: 318881
* [OPENMP] Add support for cancel constructs in [teams] distributeAlexey Bataev2017-11-2210-18/+80
| | | | | | | | | parallel for directives. Added codegen/sema support for cancel constructs in [teams] distribute parallel for directives. llvm-svn: 318872
* Revert "[CodeGen] Fix vtable not receiving hidden visibility when using ↵Petr Hosek2017-11-227-42/+19
| | | | | | | | push(visibility)" This reverts commit r318853: tests are failing on Windows bots llvm-svn: 318866
* [OPENMP] Added missed checks for for [simd] based directives.Alexey Bataev2017-11-227-2/+405
| | | | | | | Added missed checks/analysis for safelen/simdlen clauses + linear clause in for [simd] based directives. llvm-svn: 318860
* CachePruning: Allow limiting the number of files in the cache directory.Peter Collingbourne2017-11-221-0/+4
| | | | | | | | | | | The default limit is 1000000 but it can be configured with a cache policy. The motivation is that some filesystems (notably ext4) have a limit on the number of files that can be contained in a directory (separate from the inode limit). Differential Revision: https://reviews.llvm.org/D40327 llvm-svn: 318857
* [CodeGen] Fix vtable not receiving hidden visibility when using push(visibility)Petr Hosek2017-11-227-19/+42
| | | | | | | | | | This change should resolve https://bugs.llvm.org/show_bug.cgi?id=35022 Patch by Jake Ehrlich Differential Revision: https://reviews.llvm.org/D39627 llvm-svn: 318853
* [OPENMP] General improvement of code, NFC.Alexey Bataev2017-11-222-14/+27
| | | | llvm-svn: 318849
* [OPENMP] Do not mark captured variables as artificial in debug info.Alexey Bataev2017-11-223-6/+42
| | | | | | | Captured variables should not be marked as artificial parameters in outlined functions in debug info. llvm-svn: 318843
* [OpenMP] Adjust arguments of nvptx runtime functionsJonas Hahnfeld2017-11-225-25/+33
| | | | | | | | | | | | | In the future the compiler will analyze whether the OpenMP runtime needs to be (fully) initialized and avoid that overhead if possible. The functions already take an argument to transfer that information to the runtime, so pass in the default value 1. (This is needed for binary compatibility with libomptarget-nvptx currently being upstreamed.) Differential Revision: https://reviews.llvm.org/D40354 llvm-svn: 318836
* [OPENMP] Codegen for `target teams` directive.Alexey Bataev2017-11-224-11/+57
| | | | | | Added codegen of the clauses for `target teams` directive. llvm-svn: 318834
* [Docs] Update list of languages clang-format can formatMalcolm Parsons2017-11-221-1/+1
| | | | llvm-svn: 318827
* [Driver] Make the use of relax relocations a per target optionPetr Hosek2017-11-226-8/+10
| | | | | | | | | | | | | The support for relax relocations is dependent on the linker and different toolchains within the same compiler can be using different linkers some of which may or may not support relax relocations. Give toolchains the option to control whether they want to use relax relocations in addition to the existing (global) build system option. Differential Revision: https://reviews.llvm.org/D39831 llvm-svn: 318816
* [X86] Update CPUSupports code to reuse LLVM .def file [NFC]Erich Keane2017-11-222-102/+7
| | | | llvm-svn: 318815
* [AST] Fix some Clang-tidy modernize and Include What You Use warnings; other ↵Eugene Zelenko2017-11-2111-249/+364
| | | | | | minor fixes (NFC). llvm-svn: 318813
* [OpenMP] Fix tests after r318789Richard Trieu2017-11-214-15/+15
| | | | | | Update use of __tgt_target that had some 32bit types updated to 64bit. llvm-svn: 318811
* Avoid unecessary opsize byte in segment move to memoryNirav Dave2017-11-211-6/+6
| | | | | | | | | | | | | | | | | Segment moves to memory are always 16-bit. Remove invalid 32 and 64 bit variants. Recommiting with missing clang inline assembly test change. Fixes PR34478. Reviewers: rnk, craig.topper Subscribers: llvm-commits, hiraditya Differential Revision: https://reviews.llvm.org/D39847 llvm-svn: 318797
* The offsetof macro is intended to work with subobjects rather than simple ↵Aaron Ballman2017-11-213-16/+5
| | | | | | identifiers designating a member, making the -Wextended-offsetof diagnostic obsolete as this construct is not an extension. Implements WG14 DR496. llvm-svn: 318796
* Add an AST matcher for hasDefaultArgument() to match on parameter ↵Aaron Ballman2017-11-214-0/+28
| | | | | | | | declarations that have a default value. Patch by Julie Hockett. llvm-svn: 318794
* [Clang][OpenMP] New clang/libomptarget map interface: new function ↵George Rokos2017-11-2131-617/+633
| | | | | | | | | | | signatures, clang-side This clang patch changes the __tgt_* API function signatures in preparation for the new map interface. Changes are: Device IDs 32bits --> 64bits, Flags 32bits --> 64bits Differential revision: https://reviews.llvm.org/D40281 llvm-svn: 318789
* Add -finstrument-function-entry-bare flagHans Wennborg2017-11-216-11/+39
| | | | | | | | | | | | | | | | | This is an instrumentation flag that's similar to -finstrument-functions, but it only inserts calls on function entry, the calls are inserted post-inlining, and they don't take any arugments. This is intended for users who want to instrument function entry with minimal overhead. (-pg would be another alternative, but forces frame pointer emission and affects link flags, so is probably best left alone to be used for generating gcov data.) Differential revision: https://reviews.llvm.org/D40276 llvm-svn: 318785
* [OPENMP] Initial support for asynchronous data update, NFC.Alexey Bataev2017-11-218-64/+191
| | | | | | | | | OpenMP 5.0 introduces asynchronous data update/dependecies clauses on target data directives. Patch adds initial support for outer task regions to use task-based codegen for future async target data directives. llvm-svn: 318781
* Fix test/OpenMP/nvptx_data_sharing.cppJonas Hahnfeld2017-11-211-2/+2
| | | | | | This was an oversight that stayed in the test from development. llvm-svn: 318779
* [ASTImporter] Support new AST nodes:Aleksei Sidorin2017-11-214-20/+362
| | | | | | | | | | | | | | | | * UnresolvedUsingType * EmptyDecl * NamespaceAliasDecl * UsingDecl * UsingShadowDecl * UsingDirectiveDecl * UnresolvedUsingValueDecl * UnresolvedUsingTypenameDecl Refactor error handling in ImportTemplateArgumentLoc() method. Add a test for inline namespaces. llvm-svn: 318776
* [OpenMP] Add implicit data sharing support when offloading to NVIDIA GPUs ↵Gheorghe-Teodor Bercea2017-11-215-36/+247
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | using OpenMP device offloading Summary: This patch is part of the development effort to add support in the current OpenMP GPU offloading implementation for implicitly sharing variables between a target region executed by the team master thread and the worker threads within that team. This patch is the first of three required for successfully performing the implicit sharing of master thread variables with the worker threads within a team. The remaining two patches are: - Patch D38978 to the LLVM NVPTX backend which ensures the lowering of shared variables to an device memory which allows the sharing of references; - Patch (coming soon) is a patch to libomptarget runtime library which ensures that a list of references to shared variables is properly maintained. A simple code snippet which illustrates an implicit data sharing situation is as follows: ``` #pragma omp target { // master thread only int v; #pragma omp parallel { // worker threads // use v } } ``` Variable v is implicitly shared from the team master thread which executes the code in between the target and parallel directives. The worker threads must operate on the latest version of v, including any updates performed by the master. The code generated in this patch relies on the LLVM NVPTX patch (mentioned above) which prevents v from being lowered in the thread local memory of the master thread thus making the reference to this variable un-shareable with the workers. This ensures that the code generated by this patch is correct. Since the parallel region is outlined the passing of arguments to the outlined regions must preserve the original order of arguments. The runtime therefore maintains a list of references to shared variables thus ensuring their passing in the correct order. The passing of arguments to the outlined parallel function is performed in a separate function which the data sharing infrastructure constructs in this patch. The function is inlined when optimizations are enabled. Reviewers: hfinkel, carlo.bertolli, arpith-jacob, Hahnfeld, ABataev, caomhin Reviewed By: ABataev Subscribers: cfe-commits, jholewinski Differential Revision: https://reviews.llvm.org/D38976 llvm-svn: 318773
* Add target triples to openmp-offload-gpu.cJonas Hahnfeld2017-11-211-3/+6
| | | | | | This might fix the failure on Green Dragon. llvm-svn: 318767
* [OpenMP] Consistently use cubin extension for nvlinkJonas Hahnfeld2017-11-216-43/+99
| | | | | | | | | | | | This was previously done in some places, but for example not for bundling so that single object compilation with -c failed. In addition cubin was used for all file types during unbundling which is incorrect for assembly files that are passed to ptxas. Tighten up the tests so that we can't regress in that area. Differential Revision: https://reviews.llvm.org/D40250 llvm-svn: 318763
* [MINGW] normalize WIN32 macrosMartell Malone2017-11-218-38/+72
| | | | | | | | | | | | | | move _WIN64 and _WIN32 defines to lib/Basic/Targets/OSTargets.h move WIN32, WIN64 and __MINGW64__ to addMinGWDefines fixes __MINGW64__ not being defined for aarch64 adds WIN32 definition for x64 Reviewers: mstorsjo Differential Revision: https://reviews.llvm.org/D40285 llvm-svn: 318755
* [Analyzer] Stable iteration on indirect goto LabelDecl's to avoid ↵Aleksei Sidorin2017-11-212-1/+97
| | | | | | | | | | | | | | | | | | | | non-determinism (attempt 2) CFG wass built in non-deterministic order due to the fact that indirect goto labels' declarations (LabelDecl's) are stored in the llvm::SmallSet container. LabelDecl's are pointers, whose order is not deterministic, and llvm::SmallSet sorts them by their non-deterministic addresses after "small" container is exceeded. This leads to non-deterministic processing of the elements of the container. The fix is to use llvm::SmallSetVector that was designed to have deterministic iteration order. Patch by Ilya Palachev! Differential Revision: https://reviews.llvm.org/D40073 llvm-svn: 318754
* [Analyzer] Revert r318750 because incorrect files were added for commit.Aleksei Sidorin2017-11-212-388/+17
| | | | | | Sorry for the noise. llvm-svn: 318753
* [CodeGen] Generate TBAA type descriptors in a more reliable mannerIvan A. Kosarev2017-11-212-43/+64
| | | | | | | | | This patch introduces a couple of helper functions that make it possible to handle the caching logic in a single place. Differential Revision: https://reviews.llvm.org/D39953 llvm-svn: 318752
* [Analyzer] Non-determinism: stable iteration on indirect goto LabelDecl'sAleksei Sidorin2017-11-212-17/+388
| | | | | | | | | | | | | | | | | | CFG wass built in non-deterministic order due to the fact that indirect goto labels' declarations (LabelDecl's) are stored in the llvm::SmallSet container. LabelDecl's are pointers, whose order is not deterministic, and llvm::SmallSet sorts them by their non-deterministic addresses after "small" container is exceeded. This leads to non-deterministic processing of the elements of the container. The fix is to use llvm::SmallSetVector that was designed to have deterministic iteration order. Patch by Ilya Palachev! Differential Revision: https://reviews.llvm.org/D40073 llvm-svn: 318750
* [Modules TS] Added module re-export support.Hamza Sood2017-11-216-17/+62
| | | | | | | This implements [dcl.modules.export] from the C++ Modules TS, which lets a module re-export another module with the "export import" syntax. Differential Revision: https://reviews.llvm.org/D40270 llvm-svn: 318744
* [x86][inline-asm] allow recognition of MPX regs inside ms inline-asm blobCoby Tayree2017-11-212-0/+12
| | | | | | Differential Revision: https://reviews.llvm.org/D38445 llvm-svn: 318739
* [MS] add an init test for thumbv7-windows-msvcMartell Malone2017-11-211-0/+5
| | | | llvm-svn: 318736
* [MS] Increase default new alignment for win64 and test itReid Kleckner2017-11-213-4/+22
| | | | | | | | | | | | | | | | | | Summary: This raises __STDCPP_DEFAULT_NEW_ALIGNMENT__ from 8 to 16 on Win64. This matches platforms that follow the usual `2 * sizeof(void*)` alignment requirement for malloc. We might want to consider making that the default rather than relying on long double alignment. Fixes PR35356 Reviewers: STL_MSFT, rsmith Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D40277 llvm-svn: 318723
* Re-revert "Refactor debuginfo-tests."Zachary Turner2017-11-212-8/+2
| | | | | | | | | | This is still breaking greendragon. At this point I give up until someone can fix the greendragon bots, and I will probably abandon this effort in favor of using a private github repository. llvm-svn: 318722
* ASTMatchers{,Macros}.h: Add some extra macros to use for decl/def of matchersDavid Blaikie2017-11-213-10/+63
| | | | | | | Fix ODR violations caused by using internal linkage variables in non-internal inline functions. (also removes duplicate definitions, etc) llvm-svn: 318720
* FormatInternal.h: Add missing includes.David Blaikie2017-11-211-0/+4
| | | | llvm-svn: 318719
* [X86] Remove 'mm3now' from isValidFeatureName.Craig Topper2017-11-211-2/+0
| | | | | | The correct spelling is '3dnow' which is already in the list. llvm-svn: 318716
* [analyzer] Diagnose stack leaks via block capturesAlexander Shaposhnikov2017-11-203-99/+404
| | | | | | | | | | | This diff extends StackAddrEscapeChecker to catch stack addresses leaks via block captures if the block is executed asynchronously or returned from a function. Differential revision: https://reviews.llvm.org/D39438 llvm-svn: 318705
* Revert r318669/318694Erich Keane2017-11-2023-152/+56
| | | | | | Broke some libclang tests, so reverting for now. llvm-svn: 318698
* Resubmit "Refactor debuginfo-tests" again.Zachary Turner2017-11-202-2/+8
| | | | | | | | | | | | This was reverted due to the tests being run twice on some build bots. Each run had a slightly different configuration due to the way in which it was being invoked. This fixes the problem (albeit in a somewhat hacky way). Hopefully in the future we can get rid of the workflow of running debuginfo-tests as part of clang, and then this hack can go away. llvm-svn: 318697
* Include test files for rL318668Erich Keane2017-11-203-0/+53
| | | | | | Forgotten when doing my SVN commit. llvm-svn: 318694
* [OpenMP] Initial implementation of code generation for pragma 'teams ↵Carlo Bertolli2017-11-2015-18/+3526
| | | | | | | | | | distribute parallel for' on host https://reviews.llvm.org/D40187 This patch implements code gen for 'teams distribute parallel for' on the host, including all its clauses and related regression tests. llvm-svn: 318692
* [AutoComplete] Use stronger sort predicate for autocomplete candidates to ↵Mandeep Singh Grang2017-11-201-1/+5
| | | | | | | | | | | | | | | | | | remove non-deterministic ordering Summary: This fixes the failure in test/Driver/autocomplete.c uncovered by D39245. Reviewers: yamaguchi, teemperor, ruiu Reviewed By: yamaguchi, ruiu Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D40234 llvm-svn: 318681
* [Docs] Regenerate the command line option reference.Craig Topper2017-11-201-5/+45
| | | | llvm-svn: 318672
* For Linux/gnu compatibility, preinclude <stdc-predef.h> if the file is availableErich Keane2017-11-2020-56/+99
| | | | | | | | | | | | | | | | | | | | | | As reported in llvm bugzilla 32377. Here’s a patch to add preinclude of stdc-predef.h. The gcc documentation says “On GNU/Linux, <stdc-predef.h> is pre-included.” See https://gcc.gnu.org/gcc-4.8/porting_to.html; The preinclude is inhibited with –ffreestanding. Basically I fixed the failing test cases by adding –ffreestanding which inhibits this behavior. I fixed all the failing tests, including some in extra/test, there's a separate patch for that which is linked here Patch By: mibintc Differential Revision: https://reviews.llvm.org/D34158 llvm-svn: 318669
* Revert r318456 "Issue -Wempty-body warnings for else blocks"Hans Wennborg2017-11-203-25/+1
| | | | | | | | | | | | | | This caused warnings also when the if or else comes from macros. There was an attempt to fix this in r318556, but that introduced new problems and was reverted. Reverting this too until the whole issue is sorted. > This looks like it was just an oversight. > > Fixes http://llvm.org/pr35319 > > git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@318456 91177308-0d34-0410-b5e6-96231b3b80d8 llvm-svn: 318667
* Revert r318556 "Loosen -Wempty-body warning"Hans Wennborg2017-11-205-18/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It seems this somehow made -Wempty-body fire in some macro cases where it didn't before, e.g. ../../third_party/ffmpeg/libavcodec/bitstream.c(169,5): error: if statement has empty body [-Werror,-Wempty-body] ff_dlog(NULL, "new table index=%d size=%d\n", table_index, table_size); ^ ../../third_party/ffmpeg\libavutil/internal.h(276,80): note: expanded from macro 'ff_dlog' # define ff_dlog(ctx, ...) do { if (0) av_log(ctx, AV_LOG_DEBUG, __VA_ARGS__); } while (0) ^ ../../third_party/ffmpeg/libavcodec/bitstream.c(169,5): note: put the semicolon on a separate line to silence this warning Reverting until this can be figured out. > Do not show it when `if` or `else` come from macros. > E.g., > > #define USED(A) if (A); else > #define SOME_IF(A) if (A) > > void test() { > // No warnings are shown in those cases now. > USED(0); > SOME_IF(0); > } > > Patch by Ilya Biryukov! > > Differential Revision: https://reviews.llvm.org/D40185 llvm-svn: 318665
* [CodeGen] Move Reciprocals option from TargetOptions to CodeGenOptionsCraig Topper2017-11-204-4/+4
| | | | | | Diffrential Revision: https://reviews.llvm.org/D40226 llvm-svn: 318662
OpenPOWER on IntegriCloud