summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert r333347 "[X86] Rewrite the max and min reduction intrinsics to make ↵Craig Topper2018-05-262-2716/+2506
| | | | | | | | better use of other functions and to reduce width to 256 and 128 bits were possible." This wasn't supposed to be commited yet. llvm-svn: 333349
* [X86] Remove mask from avx512ifma builtins. Use a select instruction instead.Craig Topper2018-05-265-110/+88
| | | | | | This reduces from 12 builtins to 6 since we no longer need a mask and maskz version. llvm-svn: 333348
* [X86] Rewrite the max and min reduction intrinsics to make better use of ↵Craig Topper2018-05-262-2506/+2716
| | | | | | | | | | | | | | | | | | | other functions and to reduce width to 256 and 128 bits were possible. Summary: We only need to use 512 bit vectors all the way through v8i64 reductions since those max instructions are new to avx512f and only available in 512 bits until SKX. For v16i32 and floating point we have legacy 128/256 bit instructions we can use. I've tried to use other intrinsics to reduce the verbosity of the code and avoid having to mention all the shuffles. I've also removed all the -1 shuffle indices so the output sequence is fully specified and not left to backend optimization. Reviewers: RKSimon, spatel, GBuella Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D47401 llvm-svn: 333347
* [ClangDiagnostics] Silence warning about fallthrough after PrintFatalErrorDavid Bolvansky2018-05-261-1/+1
| | | | | | | | | | | | | | | | | | | | Summary: ClangDiagnosticsEmitter.cpp:1047:57: warning: this statement may fall through [-Wimplicit-fallthrough=] Builder.PrintFatalError("Unknown modifier type: " + Modifier); ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ ClangDiagnosticsEmitter.cpp:1048:5: note: here case MT_Select: { ^ Reviewers: rsmith, rtrieu Reviewed By: rtrieu Subscribers: rtrieu, ilya-biryukov, ioeric, MaskRay, jkorous, cfe-commits Differential Revision: https://reviews.llvm.org/D47340 llvm-svn: 333340
* Test commit; please ignore.George Burgess IV2018-05-261-1/+1
| | | | llvm-svn: 333333
* [analyzer] Add security checks for bcmp(), bcopy(), bzero().Artem Dergachev2018-05-264-0/+205
| | | | | | | | | | | These functions are obsolete. The analyzer would advice to replace them with memcmp(), memcpy() or memmove(), or memset(). Patch by Tom Rix! Differential Revision: https://reviews.llvm.org/D41881 llvm-svn: 333326
* Fix typo + reflow comment; NFCGeorge Burgess IV2018-05-251-4/+4
| | | | | | Reflow brings said comment below 80 cols llvm-svn: 333324
* [X86] Add const to another builtin that was missed from r331814.Craig Topper2018-05-251-1/+1
| | | | llvm-svn: 333321
* [X86] Correct the target features on two avx512bw builtins that were ↵Craig Topper2018-05-251-2/+2
| | | | | | incorrectly labeled as avx512f. llvm-svn: 333320
* Revert "[DebugInfo] Don't bother with MD5 checksums of preprocessed files."Paul Robinson2018-05-253-26/+4
| | | | | | | This reverts commit d734f2aa3f76fbf355ecd2bbe081d0c1f49867ab. Also known as r333311. A very small but nonzero number of bots fail. llvm-svn: 333319
* [X86] Mark a few more builtins const that were missed in r331814.Craig Topper2018-05-251-3/+3
| | | | llvm-svn: 333318
* Support Swift calling convention for PPC64 targetsBob Wilson2018-05-252-2/+20
| | | | | | | This adds basic support for the Swift calling convention with PPC64 targets. Patch provided by Atul Sowani in bug report #37223 llvm-svn: 333316
* [DebugInfo] Don't bother with MD5 checksums of preprocessed files.Paul Robinson2018-05-253-4/+26
| | | | | | | | | | The checksum will not reflect the real source, so there's no clear reason to include them in the debug info. Also this was causing a crash on the DWARF side. Differential Revision: https://reviews.llvm.org/D47260 llvm-svn: 333311
* [Support] Avoid normalization in sys::getDefaultTargetTriplePetr Hosek2018-05-251-1/+2
| | | | | | | | | | | | | | | | | | | | | | The return value of sys::getDefaultTargetTriple, which is derived from -DLLVM_DEFAULT_TRIPLE, is used to construct tool names, default target, and in the future also to control the search path directly; as such it should be used textually, without interpretation by LLVM. Normalization of this value may lead to unexpected results, for example if we configure LLVM with -DLLVM_DEFAULT_TARGET_TRIPLE=x86_64-linux-gnu, normalization will transform that value to x86_64--linux-gnu. Driver will use that value to search for tools prefixed with x86_64--linux-gnu- which may be confusing. This is also inconsistent with the behavior of the --target flag which is taken as-is without any normalization and overrides the value of LLVM_DEFAULT_TARGET_TRIPLE. Users of sys::getDefaultTargetTriple already perform their own normalization as needed, so this change shouldn't impact existing logic. Differential Revision: https://reviews.llvm.org/D47153 llvm-svn: 333307
* Convert clang-interpreter to ORC JIT APIStephane Sezer2018-05-256-506/+84
| | | | | | | | | | | | | | Summary: This mostly re-uses code from the KaleidoscopeJIT example. Reviewers: ddunbar, lhames Reviewed By: lhames Subscribers: mgrang, alexshap, mgorny, xiaobai, cfe-commits Differential Revision: https://reviews.llvm.org/D45897 llvm-svn: 333302
* [OPENMP, NVPTX] Fixed codegen for orphaned parallel region.Alexey Bataev2018-05-252-34/+23
| | | | | | | | | | | | | | If orphaned parallel region is found, the next code must be emitted: ``` if(__kmpc_is_spmd_exec_mode() || __kmpc_parallel_level(loc, gtid)) Serialized execution. else if (IsMasterThread()) Prepare and signal worker. else Outined function call. ``` llvm-svn: 333301
* Follow-up fix for nonnull atomic non-member functionsJF Bastien2018-05-252-3/+68
| | | | | | | | Handling of the third parameter was only checking for *_n and not for the C11 variant, which means that cmpxchg of a 'desired' 0 value was erroneously warning. Handle C11 properly, and add extgensive tests for this as well as NULL pointers in a bunch of places. Fixes r333246 from D47229. llvm-svn: 333290
* [Sema] Add tests for weak functionsJonas Hahnfeld2018-05-251-0/+3
| | | | | | | | I found these checks to be missing, just add some simple cases. Differential Revision: https://reviews.llvm.org/D47200 llvm-svn: 333283
* [analyzer] Added a getLValue method to ProgramState for basesKristof Umann2018-05-251-0/+23
| | | | | | Differential Revision: https://reviews.llvm.org/D46891 llvm-svn: 333278
* Fix members initialization order in constructor (fails with -Werror)Ivan Donchevskii2018-05-251-3/+3
| | | | llvm-svn: 333276
* [analyzer] Added template argument lists to the Pathdiagnostic outputKristof Umann2018-05-253-2/+133
| | | | | | | | | | | Because template parameter lists were not displayed in the plist output, it was difficult to decide in some cases whether a given checker found a true or a false positive. This patch aims to correct this. Differential Revision: https://reviews.llvm.org/D46933 llvm-svn: 333275
* Optionally add code completion results for arrow instead of dotIvan Donchevskii2018-05-2510-93/+251
| | | | | | | | | | | | | Currently getting such completions requires source correction, reparsing and calling completion again. And if it shows no results and rollback is required then it costs one more reparse. With this change it's possible to get all results which can be later filtered to split changes which require correction. Differential Revision: https://reviews.llvm.org/D41537 llvm-svn: 333272
* [ASTImporter] Fix ClassTemplateSpecialization in wrong DCGabor Marton2018-05-252-3/+7
| | | | | | | | | | | | | | Summary: ClassTemplateSpecialization is put in the wrong DeclContex if implicitly instantiated. This patch fixes it. Reviewers: a.sidorin, r.stahl, xazax.hun Subscribers: rnkovacs, dkrupp, cfe-commits Differential Revision: https://reviews.llvm.org/D47058 llvm-svn: 333269
* [x86] invpcid intrinsicGabor Buella2018-05-2512-0/+88
| | | | | | | | | | | | An intrinsic for an old instruction, as described in the Intel SDM. Reviewers: craig.topper, rnk Reviewed By: craig.topper, rnk Differential Revision: https://reviews.llvm.org/D47142 llvm-svn: 333256
* Make atomic non-member functions as nonnullJF Bastien2018-05-252-19/+107
| | | | | | | | | | | | | | | | | Summary: As a companion to libc++ patch https://reviews.llvm.org/D47225, mark builtin atomic non-member functions which accept pointers as nonnull. The atomic non-member functions accept pointers to std::atomic / std::atomic_flag as well as to the non-atomic value. These are all dereferenced unconditionally when lowered, and therefore will fault if null. It's a tiny gotcha for new users, especially when they pass in NULL as expected value (instead of passing a pointer to a NULL value). <rdar://problem/18473124> Reviewers: arphaman Subscribers: aheejin, cfe-commits Differential Revision: https://reviews.llvm.org/D47229 llvm-svn: 333246
* Improve diagonstic for braced-init-list as operand to ?: expression.Richard Smith2018-05-242-7/+25
| | | | llvm-svn: 333234
* Switch a couple of users of LangOpts::GNUMode to the more appropriate ↵Richard Smith2018-05-242-3/+3
| | | | | | LangOpts::GNUKeywords. llvm-svn: 333233
* Improve diagnostics for config mismatches with -fmodule-file.Richard Smith2018-05-244-12/+18
| | | | | | | | Unless the user uses -Wno-module-file-config-mismatch (or -Wno-error=...), allow the AST reader to produce errors describing the nature of the config mismatch. llvm-svn: 333220
* [X86] Fix a bad cast in _mm512_mask_abs_epi32 and _mm512_maskz_abs_epi32.Craig Topper2018-05-241-2/+2
| | | | llvm-svn: 333211
* [bash-completion] Fix tab separation on macOSBen Langmuir2018-05-241-1/+2
| | | | | | | | We have a regex that needs to match a tab character in the command output, but on macOS sed doesn't support '\t', causing it to split on the 't' character instead. Fix by having bash expand the \t first. llvm-svn: 333202
* Disable an in-memory vfs file path test on windows.Eric Liu2018-05-241-0/+2
| | | | | | | | | The test uses unix paths and doesn't make sense to run on windows. Fix bot failure caused by r333172: http://lab.llvm.org:8011/builders/clang-x64-ninja-win7/builds/10799 llvm-svn: 333186
* [analyzer] Move RangeSet related declarations into the ↵Mikhail R. Gadelha2018-05-242-236/+256
| | | | | | | | | | | | | | | | | | RangedConstraintManager header. Summary: I could also move `RangedConstraintManager.h` under `include/` if you agree as it seems slightly out of place under `lib/`. Patch by Réka Kovács Reviewers: NoQ, george.karpenkov, dcoughlin, rnkovacs Reviewed By: NoQ Subscribers: mikhail.ramalho, whisperity, xazax.hun, baloghadamsoftware, szepet, a.sidorin, dkrupp, cfe-commits Differential Revision: https://reviews.llvm.org/D45920 llvm-svn: 333179
* [VFS] Implement getRealPath in InMemoryFileSystem.Eric Liu2018-05-243-0/+43
| | | | | | | | | | Reviewers: bkramer Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D47262 llvm-svn: 333172
* [clang-format] Fix putting ObjC message arguments in one line for multiline ↵Jacek Olesiak2018-05-242-0/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | receiver Summary: Reapply reverted changes from D46879. Currently BreakBeforeParameter is set to true everytime message receiver spans multiple lines, e.g.: ``` [[object block:^{ return 42; }] aa:42 bb:42]; ``` will be formatted: ``` [[object block:^{ return 42; }] aa:42 bb:42]; ``` even though arguments could fit into one line. This change fixes this behavior. Test Plan: make -j12 FormatTests && tools/clang/unittests/Format/FormatTests Reviewers: benhamilton, krasimir Reviewed By: benhamilton, krasimir Subscribers: djasper, klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D47195 llvm-svn: 333171
* Fix ASTImporterTest on Windows after r333082Hans Wennborg2018-05-241-2/+2
| | | | | | | With MS compatibility, Sema adds an implicit definition of type_info, which was causing the matchers to return 3 instead of 2. llvm-svn: 333170
* [ASTImporter] Add unit tests for structural equivalenceGabor Marton2018-05-246-53/+322
| | | | | | | | | | | | | | | Summary: This patch add new tests for structural equivalence. For that a new common header is created which holds the test related language specific types and functions. Reviewers: a.sidorin, xazax.hun, szepet Subscribers: rnkovacs, dkrupp, cfe-commits Differential Revision: https://reviews.llvm.org/D46867 llvm-svn: 333166
* [X86] NFC Include immintrin.h in CodeGen testsGabor Buella2018-05-2428-28/+28
| | | | | | | Following r333110: "Move all Intel defined intrinsic includes into immintrin.h" llvm-svn: 333160
* [Sparc] Use the leon arch for Leon3's when using an external assemblerDaniel Cederman2018-05-242-8/+84
| | | | | | | | | | | | | | Summary: This allows the use of the casa instruction available in most Leon3's. Reviewers: jyknight Reviewed By: jyknight Subscribers: joerg, fedor.sergeev, jrtc27, cfe-commits Differential Revision: https://reviews.llvm.org/D47138 llvm-svn: 333157
* Add Builtins.def support for fread and fwrite to ensure that -fno-builtin-Eric Christopher2018-05-242-1/+18
| | | | | | works with them and test accordingly. llvm-svn: 333156
* Migrate libcalls-fno-builtin.c test from checking optimized assemblyEric Christopher2018-05-242-50/+67
| | | | | | | | | | | to checking for attributes on the call site - and fix up builtin functions that we were testing for but not ensuring wouldn't be optimized by the backend. Leave one set of asm tests to make sure that we're also communicating builtin-ness to TLI. llvm-svn: 333154
* [Sema][ObjC] Do not DiagnoseUseOfDecl in LookupMemberExprSteven Wu2018-05-242-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | Summary: Remove the call to DiagnoseUseOfDecl in LookupMemberExpr because: 1. LookupMemberExpr eagerly lookup both getter and setter, reguardless if they are used or not. It causes wrong diagnostics if you are only using getter. 2. LookupMemberExpr only diagnoses getter, but not setter. 3. ObjCPropertyOpBuilder already DiagnoseUseOfDecl when building getter and setter. Doing it again in LookupMemberExpr causes duplicated diagnostics. rdar://problem/38479756 Reviewers: erik.pilkington, arphaman, doug.gregor Reviewed By: arphaman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D47280 llvm-svn: 333148
* Use zeroinitializer for (trailing zero portion of) large array initializersRichard Smith2018-05-235-79/+178
| | | | | | | | more reliably. This re-commits r333044 with a fix for PR37560. llvm-svn: 333141
* Rework __builtin_classify_type support to better match GCC and to not assert onRichard Smith2018-05-233-86/+134
| | | | | | | | | | | | | | | | | | | | | | unusual types. Following the observed behavior of GCC, we now return -1 for vector types (along with all of our extensions that GCC doesn't support), and for atomic types we classify the underlying type. GCC appears to have changed its classification for function and array arguments between version 5 and version 6. Previously it would classify them as pointers in C and as functions or arrays in C++, but from version 6 onwards, it classifies them as pointers. We now follow the more recent GCC behavior rather than emulating what I can only assume to be a historical bug in their C++ support for this builtin. Finally, no version of GCC that I can find has ever used the "method" classification for C++ pointers to member functions. Instead, GCC classifies them as record types, presumably reflecting an internal implementation detail, but whatever the reason we now produce compatible results. llvm-svn: 333126
* [X86] Move the include of clzerointrin.h from immintrin.h back to x86intrin.h.Craig Topper2018-05-232-4/+5
| | | | | | This is an AMD intrinsic not an Intel intrinsic so it shouldn't be in immintrin.h llvm-svn: 333124
* [modules] Mark __wmmintrin_pclmul.h/__wmmintrin_aes.h as textualRaphael Isemann2018-05-231-8/+3
| | | | | | | | | | | | | | | | | | | | | | | Summary: Since clang r332929 these two headers throw errors when included from somewhere else than their wrapper header. It seems marking them as textual is the best way to fix the builds. Fixes this new module build error: While building module '_Builtin_intrinsics' imported from ...: In file included from <module-includes>:2: In file included from lib/clang/7.0.0/include/immintrin.h:54: In file included from lib/clang/7.0.0/include/wmmintrin.h:29: lib/clang/7.0.0/include/__wmmintrin_aes.h:25:2: error: "Never use <__wmmintrin_aes.h> directly; include <wmmintrin.h> instead." #error "Never use <__wmmintrin_aes.h> directly; include <wmmintrin.h> instead." Reviewers: rsmith, v.g.vassilev, craig.topper Reviewed By: craig.topper Subscribers: craig.topper, cfe-commits Differential Revision: https://reviews.llvm.org/D47277 llvm-svn: 333123
* [X86] Move all Intel defined intrinsic includes into immintrin.hCraig Topper2018-05-2311-66/+50
| | | | | | | | | | This matches the Intel documentation which shows them available by importing immintrin.h. x86intrin.h also includes immintrin.h so anyone including x86intrin.h will still get them. This is different than gcc, but I don't think we were a perfect match there already. I'm unclear what gcc's policy is about how they choose which to add things to. Differential Revision: https://reviews.llvm.org/D47182 llvm-svn: 333110
* [CUDA] Fixed the list of GPUs supported by CUDA-9.Artem Belevich2018-05-231-2/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D47268 llvm-svn: 333098
* Test Commit. Fix namespace commentMikhail R. Gadelha2018-05-231-2/+2
| | | | | Signed-off-by: Mikhail Ramalho <mikhail.ramalho@gmail.com> llvm-svn: 333094
* [clang-format] fix buildbots after r333085Krasimir Georgiev2018-05-231-47/+46
| | | | | | Old gcc versions don't like raw string literals in macros. llvm-svn: 333092
* [ASTImporter] Fix missing implict CXXRecordDecl in ↵Gabor Marton2018-05-232-3/+25
| | | | | | | | | | | | | | | | ClassTemplateSpecializationDecl Summary: Currently we do not import the implicit CXXRecordDecl of a ClassTemplateSpecializationDecl. This patch fixes it. Reviewers: a.sidorin, xazax.hun, r.stahl Subscribers: rnkovacs, dkrupp, cfe-commits Differential Revision: https://reviews.llvm.org/D47057 llvm-svn: 333086
OpenPOWER on IntegriCloud