summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* [OPENMP] Do not create offloading entry for declare target variablesAlexey Bataev2018-08-292-1/+13
| | | | | | | | | declarations. We should not create offloading entries for declare target var declarations as it causes compiler crash. llvm-svn: 340968
* Add predefined macro __gnu_linux__ for proper aux-tripleYaxun Liu2018-08-292-1/+4
| | | | | | | | | | | | Clang predefine macro __linx__ for aux-triple with Linux OS but does not predefine macro __gnu_linux__. This causes some compilation error for certain applications, e.g. Eigen. This patch fixes that. Differential Revision: https://reviews.llvm.org/D51441 llvm-svn: 340967
* [analyzer] Resolve the crash in ReturnUndefCheckerGeorge Karpenkov2018-08-293-2/+25
| | | | | | | | | | | By making sure the returned value from getKnownSVal is consistent with the value used inside expression engine. PR38427 Differential Revision: https://reviews.llvm.org/D51252 llvm-svn: 340965
* [analyzer] [NFC] Move class definition out of the functionGeorge Karpenkov2018-08-291-41/+40
| | | | | | Differential Revision: https://reviews.llvm.org/D51322 llvm-svn: 340964
* [analyzer] Move analyzer-eagerly-assume to AnalyzerOptions, enable by defaultGeorge Karpenkov2018-08-2976-142/+151
| | | | | | Differential Revision: https://reviews.llvm.org/D51251 llvm-svn: 340963
* [analyzer] [NFC] Remove unused "state" argument from makeSymExprValNNGeorge Karpenkov2018-08-293-9/+8
| | | | | | Differential Revision: https://reviews.llvm.org/D51250 llvm-svn: 340962
* [analyzer] Better retain count rules for OSObjectsGeorge Karpenkov2018-08-292-37/+38
| | | | | | Differential Revision: https://reviews.llvm.org/D51184 llvm-svn: 340961
* [analyzer] [NFC] Follow the convention when naming classesGeorge Karpenkov2018-08-291-24/+24
| | | | | | | | Renames InvalidateRegionsWorker and RemoveDeadBindingsWorker Differential Revision: https://reviews.llvm.org/D51324 llvm-svn: 340960
* Revert "[libFuzzer] Port to Windows"Matt Morehouse2018-08-291-13/+0
| | | | | | This reverts r340949 due to bot breakage again. llvm-svn: 340954
* [OPENMP][NVPTX] Add support for lightweight runtime.Alexey Bataev2018-08-2911-102/+720
| | | | | | | | If the target construct can be executed in SPMD mode + it is a loop based directive with static scheduling, we can use lightweight runtime support. llvm-svn: 340953
* [libFuzzer] Port to WindowsMatt Morehouse2018-08-291-0/+13
| | | | | | | | | | | | | | | | | | Summary: Port libFuzzer to windows-msvc. This patch allows libFuzzer targets to be built and run on Windows, using -fsanitize=fuzzer and/or fsanitize=fuzzer-no-link. It allows these forms of coverage instrumentation to work on Windows as well. It does not fix all issues, such as those with -fsanitize-coverage=stack-depth, which is not usable on Windows as of this patch. It also does not fix any libFuzzer integration tests. Nearly all of them fail to compile, fixing them will come in a later patch, so libFuzzer tests are disabled on Windows until them. Reviewers: morehouse, rnk Reviewed By: morehouse, rnk Subscribers: #sanitizers, delcypher, morehouse, kcc, eraman Differential Revision: https://reviews.llvm.org/D51022 llvm-svn: 340949
* [MinGW] Don't mark external variables as DSO localMartin Storsjo2018-08-297-6/+44
| | | | | | | | | | | | Since MinGW supports automatically importing external variables from DLLs even without the DLLImport attribute, we shouldn't mark them as DSO local unless we actually know them to be local for sure. Keep marking thread local variables as DSO local. Differential Revision: https://reviews.llvm.org/D51382 llvm-svn: 340941
* [Tooling] Do not restore working dir in ClangToolIlya Biryukov2018-08-292-19/+26
| | | | | | | | | | | | | | | | | | | | | | | Summary: Resolve all relative paths before running the tool instead. This fixes the usage of ClangTool in AllTUsExecutor. The executor will try running multiple ClangTool instances in parallel with compile commands that usually have the same working directory. Changing working directory is a global operation, so we end up changing working directory in the middle of running other actions, which leads to spurious compile errors. Reviewers: ioeric, sammccall Reviewed By: ioeric Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D51407 llvm-svn: 340937
* [OPENMP] Create non-const ident_t objects.Mike Rice2018-08-2944-67/+68
| | | | | | | | | | | Currently ident_t objects are created const when debug info is not enabled, but the libittnotify libray in the OpenMP runtime writes to the reserved_2 field (See __kmp_itt_region_forking in openmp/runtime/src/kmp_itt.inl). Now create ident_t objects non-const. Differential Revision: https://reviews.llvm.org/D51331 llvm-svn: 340934
* [Preamble] Fix incorrect usage of std::error_categoryAlexandre Ganea2018-08-291-1/+3
| | | | | | Differential Revision: https://reviews.llvm.org/D51380 llvm-svn: 340929
* [ARM] Set __ARM_FEATURE_SIMD32 for +dsp coresSam Parker2018-08-292-5/+9
| | | | | | | | | | | | | | ARM_FEATURE_DSP is already set for targets with the +dsp feature. In the backend, this target feature is also used to represent the availability of the of the instructions that the ACLE guard through the __ARM_FEATURE_SIMD32 macro. We don't have any cores that implement one and not the other, so set this macro for cores later than V6 or for Cortex-M cores that the target parser, or user, reports that the 'dsp' instructions are supported. Differential Revision: https://reviews.llvm.org/D51093 llvm-svn: 340911
* Start reserving x18 by default on Android targets.Peter Collingbourne2018-08-291-0/+3
| | | | | | Differential Revision: https://reviews.llvm.org/D45588 llvm-svn: 340889
* [X86] Add kadd intrinsics to match gcc and icc.Craig Topper2018-08-286-1/+101
| | | | | | | | | | | | This adds the following intrinsics: _kadd_mask64 _kadd_mask32 _kadd_mask16 _kadd_mask8 These are missing from the Intel Intrinsics Guide, but are implemented by both gcc and icc. llvm-svn: 340879
* [HIP] Fix output file extensionYaxun Liu2018-08-282-1/+10
| | | | | | | | | | | | | | | | | | OffloadBundlingJobAction constructor accepts a list of JobAction as inputs. The host JobAction is the last one. The file type of OffloadBundlingJobAction should be determined by the host JobAction (the last one) instead of the first one. Since HIP emits LLVM bitcode for device compilation, device JobAction has different file type as host Job Action. This bug causes incorrect output file extension for HIP. This patch fixes it by using the last input JobAction (host JobAction) to determine file type of OffloadBundlingJobAction. Differential Revision: https://reviews.llvm.org/D51336 llvm-svn: 340873
* Revert "[libFuzzer] Port to Windows"Matt Morehouse2018-08-281-13/+0
| | | | | | This reverts commit r340860 due to failing tests. llvm-svn: 340867
* [libFuzzer] Port to WindowsMatt Morehouse2018-08-281-0/+13
| | | | | | | | | | | | | | | | | | | | Summary: Port libFuzzer to windows-msvc. This patch allows libFuzzer targets to be built and run on Windows, using -fsanitize=fuzzer and/or fsanitize=fuzzer-no-link. It allows these forms of coverage instrumentation to work on Windows as well. It does not fix all issues, such as those with -fsanitize-coverage=stack-depth, which is not usable on Windows as of this patch. It also does not fix any libFuzzer integration tests. Nearly all of them fail to compile, fixing them will come in a later patch, so libFuzzer tests are disabled on Windows until them. Patch By: metzman Reviewers: morehouse, rnk Reviewed By: morehouse, rnk Subscribers: morehouse, kcc, eraman Differential Revision: https://reviews.llvm.org/D51022 llvm-svn: 340860
* Define variables in test case rather than using values from functionsAkira Hatanaka2018-08-281-2/+2
| | | | | | emitted ealier. llvm-svn: 340854
* [ubsan] Enable -fsanitize=vptr on Apple devices and simulatorsVedant Kumar2018-08-282-2/+17
| | | | | | | | | It seems like an oversight that this check was not always enabled for on-device or device simulator targets. Differential Revision: https://reviews.llvm.org/D51239 llvm-svn: 340849
* [Driver] Delete last reference of lld -flavor old-gnuFangrui Song2018-08-281-8/+1
| | | | | | This is dead code because lld -flavor old-gnu was removed in 2016 by rLLD262158. llvm-svn: 340845
* Parse compile commands lazily in InterpolatingCompilationDatabaseIlya Biryukov2018-08-282-60/+67
| | | | | | | | | | | | | | | | | Summary: This greatly reduces the time to read 'compile_commands.json'. For Chromium on my machine it's now 0.7 seconds vs 30 seconds before the change. Reviewers: sammccall, jfb Reviewed By: sammccall Subscribers: mgrang, jfb, cfe-commits Differential Revision: https://reviews.llvm.org/D51314 llvm-svn: 340838
* [Analyzer] Iterator Checker - Part 3: Invalidation check, first for (copy) ↵Adam Balogh2018-08-285-49/+218
| | | | | | | | | | | assignments We add check for invalidation of iterators. The only operation we handle here is the (copy) assignment. Differential Revision: https://reviews.llvm.org/D32747 llvm-svn: 340805
* [X86] Add kortest intrinsics for 8, 32, and 64 bit masks. Add new intrinsic ↵Craig Topper2018-08-288-6/+275
| | | | | | | | names for 16 bit masks. This matches gcc and icc despite not being documented in the Intel Intrinsics Guide. llvm-svn: 340798
* [OpenMP][NVPTX] Use appropriate _CALL_ELF macro when offloadingGheorghe-Teodor Bercea2018-08-272-5/+12
| | | | | | | | | | | | | | Summary: When offloading to a device and using the powerpc64le version of the auxiliary triple, the _CALL_ELF macro is not set correctly to 2 resulting in the attempt to include a header that does not exist. This patch fixes this problem. Reviewers: Hahnfeld, ABataev, caomhin Reviewed By: Hahnfeld Subscribers: guansong, cfe-commits Differential Revision: https://reviews.llvm.org/D51312 llvm-svn: 340772
* [PPC] Remove Darwin support from POWER backend.Kit Barton2018-08-276-57/+7
| | | | | | | | | | | | | | This patch removes uses of the Darwin ABI for PowerPC related test cases. This is the first step in removing Darwin support from the POWER backend. clang/test/CodeGen/darwin-ppc-varargs.c was deleted because it was a darwin/ppc specific test case. All other tests were updated to remove the darwin/ppc specific invocation. Phabricator Review: https://reviews.llvm.org/D50989. llvm-svn: 340770
* [Sema/Attribute] Make types declared with address_space an AttributedTypeLeonard Chan2018-08-273-13/+26
| | | | | | | | | | | | | | | Currently an address_space is stored in a qualifier. This makes any type declared with an address_space attribute in the form `__attribute__((address_space(1))) int 1;` be wrapped in an AttributedType. This is for a later patch where if `address_space` is declared in a macro, any diagnostics that would normally print the address space will instead dump the macro name. This will require saving any macro information in the AttributedType. Differential Revision: https://reviews.llvm.org/D51229 llvm-svn: 340765
* fix comment typoNico Weber2018-08-271-1/+1
| | | | llvm-svn: 340743
* Try to fix this clang driver test case after r340709.Chandler Carruth2018-08-271-2/+2
| | | | | | | | If any of the bots complain about this, I'll just revert. This test case is essentially trying to test the exact change made, but I think this matches the intent of the patch in question. llvm-svn: 340727
* [X86] Add intrinsics for kand/kandn/knot/kor/kxnor/kxor with 8, 32, and ↵Craig Topper2018-08-278-12/+427
| | | | | | | | | | 64-bit mask registers. This also adds a second intrinsic name for the 16-bit mask versions. These intrinsics match gcc and icc. They just aren't published in the Intel Intrinsics Guide so I only recently found they existed. llvm-svn: 340719
* [X86] Remove min_vector_width 512 from some intrinsics that operate only on ↵Craig Topper2018-08-271-0/+2
| | | | | | k-registers. llvm-svn: 340718
* [X86] Rename __DEFAULT_FN_ATTRS to a__DEFAULT_FN_ATTRS512 in ↵Craig Topper2018-08-272-297/+295
| | | | | | | | avx512dqintrin.h and avx512bwintrin.h. This is preparation for adding removing min_vector_width 512 from some intrinsics. llvm-svn: 340717
* [X86] Undef __DEFAULT_FN_ATTRS in avx512fintrin.h.Craig Topper2018-08-271-0/+1
| | | | | | Fixes test failure after r340713 llvm-svn: 340714
* [X86] Don't set min_vector_width to 512 on intrinsics that only operate on k ↵Craig Topper2018-08-271-12/+13
| | | | | | registers. llvm-svn: 340713
* [Xray] Darwin - Enable in the driver sideDavid Carlier2018-08-275-3/+12
| | | | | | | | | | Reviewers: dberris Reviered By: dberris Differential Revision: https://reviews.llvm.org/D51269 llvm-svn: 340712
* [Driver] Change MipsLinux default linker from "lld" to "ld.lld"Fangrui Song2018-08-261-1/+1
| | | | | | | | | | | | Reviewers: kzhuravl, atanasyan Reviewed By: atanasyan Subscribers: sdardis, arichardson, jrtc27, atanasyan, cfe-commits Differential Revision: https://reviews.llvm.org/D51234 llvm-svn: 340709
* [index] Introduce 'ProtocolInterface' as part of SymbolPropertySetArgyrios Kyrtzidis2018-08-264-5/+12
| | | | | | | This is useful to directly infer that a method or property is from a protocol interface at the point of the symbol occurrences. llvm-svn: 340696
* [CUDA/OpenMP] Define only some host macros during device compilationJonas Hahnfeld2018-08-253-8/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When compiling CUDA or OpenMP device code Clang parses header files that expect certain predefined macros from the host architecture. To make this work the compiler passes the host triple via the -aux-triple argument and (until now) pulls in all macros for that "auxiliary triple" unconditionally. However this results in defines like __SSE_MATH__ that will trigger inline assembly making use of the "advertised" target features. See the discussion of D47849 and PR38464 for a detailed explanation of the encountered problems. Instead of blacklisting "known bad" examples this patch starts adding defines that are needed for certain headers like bits/wordsize.h and bits/mathinline.h. The disadvantage of this approach is that it decouples the definitions from their target toolchain. However in my opinion it's more important to keep definitions for one header close together. For one this will include a clear documentation why these particular defines are needed. Furthermore it simplifies maintenance because adding defines for a new header or support for a new aux-triple only needs to touch one piece of code. Differential Revision: https://reviews.llvm.org/D50845 llvm-svn: 340681
* Revert r323281 "Adjust MaxAtomicInlineWidth for i386/i486 targets."Hans Wennborg2018-08-242-64/+5
| | | | | | | | | | | | | | | | | | | | | | | | As reported on http://lists.llvm.org/pipermail/cfe-dev/2018-August/058760.html, this broke i386-freebsd11 due to its lack of atomic 64 bit primitives. While that's not really this commit's fault, let's revert back to the old behaviour until this can be fixed. This means generating cmpxchg8b etc for i386 and i486 which don't technically support those, but that's been the behaviour for a long time, so a little longer probably doesn't hurt that much. > Adjust MaxAtomicInlineWidth for i386/i486 targets. > > This is to fix the bug reported in https://bugs.llvm.org/show_bug.cgi?id=34347#c6. > Currently, all MaxAtomicInlineWidth of x86-32 targets are set to 64. However, > i386 doesn't support any cmpxchg related instructions. i486 only supports cmpxchg. > So in this patch MaxAtomicInlineWidth is reset as follows: > For i386, the MaxAtomicInlineWidth should be 0 because no cmpxchg is supported. > For i486, the MaxAtomicInlineWidth should be 32 because it supports cmpxchg. > For others 32 bits x86 cpu, the MaxAtomicInlineWidth should be 64 because of cmpxchg8b. > > Differential Revision: https://reviews.llvm.org/D42154 llvm-svn: 340666
* Reland r340552, "Driver: Enable address-significance tables by default when ↵Peter Collingbourne2018-08-242-1/+3
| | | | | | | | | | targeting COFF." which was reverted in r340579. The underlying problem that caused the revert was fixed in r340648. Differential Revision: https://reviews.llvm.org/D51049 llvm-svn: 340649
* Add REQUIRES: x86-registered-target to test.Eli Friedman2018-08-241-0/+1
| | | | | | | (This isn't really x86-specific, but we have to pick some non-Apple triple to exercise the right codepath.) llvm-svn: 340644
* [LTO] Fix -save-temps with LTO and unnamed globals.Eli Friedman2018-08-242-2/+14
| | | | | | | | | If all LLVM passes are disabled, we can't emit a summary because there could be unnamed globals in the IR. Differential Revision: https://reviews.llvm.org/D51198 llvm-svn: 340640
* Thread safety analysis no longer hands when analyzing a self-referencing ↵Aaron Ballman2018-08-242-0/+11
| | | | | | | | initializer. This fixes PR38640. llvm-svn: 340636
* [ASTImporter] Add test for PackExpansionExprRaphael Isemann2018-08-242-0/+23
| | | | | | | | | | | | Reviewers: a.sidorin, a_sidorin Reviewed By: a_sidorin Subscribers: martong, cfe-commits Differential Revision: https://reviews.llvm.org/D51142 llvm-svn: 340627
* [clang-format] fix PR38557 - comments between "default" and ':' causes the ↵Jonas Toth2018-08-242-1/+20
| | | | | | | | | | | | | | | | | | | case label to be treated as an identifier Summary: The Bug was reported and fixed by Owen Pan. See the original bug report here: https://bugs.llvm.org/show_bug.cgi?id=38557 Patch by Owen Pan! Reviewers: krasimir, djasper, klimek Reviewed By: klimek Subscribers: JonasToth, cfe-commits Differential Revision: https://reviews.llvm.org/D50697 llvm-svn: 340624
* [clang-format] fix PR38525 - Extraneous continuation indent spaces with ↵Jonas Toth2018-08-242-1/+14
| | | | | | | | | | | | | | | | | | BreakBeforeBinaryOperators set to All Summary: See bug report https://bugs.llvm.org/show_bug.cgi?id=38525 for more details. Reviewers: djasper, klimek, krasimir, sammccall Reviewed By: sammccall Subscribers: hiraditya, JonasToth, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D50699 llvm-svn: 340623
* [Hexagon] Remove unneeded strings from builtin definitions, NFCKrzysztof Parzyszek2018-08-241-815/+815
| | | | llvm-svn: 340622
OpenPOWER on IntegriCloud