summaryrefslogtreecommitdiffstats
path: root/clang
Commit message (Collapse)AuthorAgeFilesLines
* Test commit. NFCPatrick Lyster2018-09-271-1/+1
| | | | llvm-svn: 343258
* [OpenMP] Make default distribute schedule for NVPTX target regions in SPMD ↵Gheorghe-Teodor Bercea2018-09-276-8/+35
| | | | | | | | | | | | | | | | mode achieve coalescing Summary: For the OpenMP NVPTX toolchain choose a default distribute schedule that ensures coalescing on the GPU when in SPMD mode. This significantly increases the performance of offloaded target code and reduces the number of registers used on the GPU side. Reviewers: ABataev, caomhin, Hahnfeld Reviewed By: ABataev, Hahnfeld Subscribers: Hahnfeld, jholewinski, guansong, cfe-commits Differential Revision: https://reviews.llvm.org/D52434 llvm-svn: 343253
* [clang][ubsan][NFC] Slight test cleanup in preparation for D50901Roman Lebedev2018-09-274-80/+73
| | | | | | | | | | | | Reviewers: vsk, vitalybuka, filcab Reviewed By: vitalybuka Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D52589 llvm-svn: 343251
* Fix greedy FileCheck expression in test/Driver/mips-abi.cJonas Hahnfeld2018-09-271-3/+3
| | | | | | | | | | | | 'ld{{.*}}"' seems to match the complete line for me which is failing the test. Only allow an optional '.exe' for Windows systems as most other tests do. Another possibility would be to collapse the greedy expression with the next check to avoid matching the full line. Differential Revision: https://reviews.llvm.org/D52619 llvm-svn: 343240
* [analyzer] Highlight nodes which have error reports in them in red in ↵George Karpenkov2018-09-271-25/+65
| | | | | | | | exploded graph Differential Revision: https://reviews.llvm.org/D52584 llvm-svn: 343239
* [OpenMP] Improve search for libomptarget-nvptxJonas Hahnfeld2018-09-273-6/+37
| | | | | | | | | | | | | | | When looking for the bclib Clang considered the default library path first while it preferred directories in LIBRARY_PATH when constructing the invocation of nvlink. The latter actually makes more sense because during development it allows using a non-default runtime library. So change the search for the bclib to start looking in directories given by LIBRARY_PATH. Additionally add a new option --libomptarget-nvptx-path= which will be searched first. This will be handy for testing purposes. Differential Revision: https://reviews.llvm.org/D51686 llvm-svn: 343230
* [Tooling] Get rid of uses of llvm::Twine::str which is slow. NFCEric Liu2018-09-271-4/+5
| | | | llvm-svn: 343224
* [AArch64][v8.5A] Test optional Armv8.5-A random number extensionOliver Stannard2018-09-271-0/+13
| | | | | | | | | | | The implementation of this is in TargetParser, so we only need to add a test for it in clang. Patch by Pablo Barrio! Differential revision: https://reviews.llvm.org/D52492 llvm-svn: 343220
* [OpenCL] Improve extension-version.cl and to_addr_builtin.cl testsSven van Haastregt2018-09-272-0/+88
| | | | | | | | | | | | | | Add cl_khr_depth_images to extension-version.cl. Extend to_addr_builtin.cl to additionally test the built-in methods to_private and to_local, and test assignment with to_global to incorrect types. Patch by Alistair Davies. Differential Revision: https://reviews.llvm.org/D52020 llvm-svn: 343207
* Revert untintentionally commited changesKristof Umann2018-09-271-3/+3
| | | | llvm-svn: 343205
* [Lex] TokenConcatenation now takes const PreprocessorKristof Umann2018-09-273-7/+7
| | | | | | Differential Revision: https://reviews.llvm.org/D52502 llvm-svn: 343204
* [Sema] Handle __va_start for Windows/ARM64 in the same way as for ARMMartin Storsjo2018-09-272-0/+2
| | | | | | | | This fixes PR39090. Differential Revision: https://reviews.llvm.org/D52571 llvm-svn: 343184
* Revert "[DebugInfo] Generate debug information for labels."Vitaly Buka2018-09-275-83/+0
| | | | | | | | This reverts commit r343148. It crashes on sanitizer-x86_64-linux-autoconf. llvm-svn: 343183
* clang-format: [JS] conditional types.Martin Probst2018-09-273-0/+17
| | | | | | | | | | | | | | | | | | | | | Summary: This change adds some rudimentary support for conditional types. Specifically it avoids breaking before `extends` and `infer` keywords, which are subject to Automatic Semicolon Insertion, so breaking before them creates incorrect syntax. The actual formatting of the type expression is odd, but there is as of yet no clear idea on how to format these. See https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-8.html#conditional-types. Reviewers: krasimir Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D52536 llvm-svn: 343179
* [driver][mips] Adjust target triple accordingly to provided ABI nameSimon Atanasyan2018-09-272-0/+35
| | | | | | | | | | | | | Explicitly selected MIPS ABI using the `-mabi` option implies corresponding target triple. For 'O32' ABI it's a 32-bit target triple like `mips-linux-gnu`. For 'N32' and 'N64' ABIs it's a 64-bit target triple like `mips64-linux-gnu`. This patch adjusts target triple accordingly these rules like we do for pseudo-target flags '-m64', '-m32' etc already. Differential revision: https://reviews.llvm.org/D52290 llvm-svn: 343169
* [analyzer] [NFC] Move the code for dumping the program point to ProgramPointGeorge Karpenkov2018-09-273-179/+178
| | | | | | | | So we can dump them outside of viewing the exploded grpah. Differential Revision: https://reviews.llvm.org/D52583 llvm-svn: 343160
* [analyzer] [NFC] Heavy refactoring of trackNullOrUndefValueGeorge Karpenkov2018-09-272-121/+56
| | | | | | Differential Revision: https://reviews.llvm.org/D52519 llvm-svn: 343159
* [analyzer] [testing] Pass through an extra argument for specifying extra ↵George Karpenkov2018-09-271-16/+22
| | | | | | | | analyzer options Differential Revision: https://reviews.llvm.org/D52585 llvm-svn: 343158
* Remove trailing space in rC343150Fangrui Song2018-09-261-1/+1
| | | | llvm-svn: 343152
* Init LookupResult::AmbiguityKindVitaly Buka2018-09-261-1/+3
| | | | | | | | We don't expect useful value there unless it's "ambiguous". However we use read it for copying and moving, so we need either init the field add login to avoid reading invalid values. Such reads trigger ubsan errors. llvm-svn: 343150
* [DebugInfo] Generate debug information for labels.Hsiangkai Wang2018-09-265-0/+83
| | | | | | | | | | | | | | Generate DILabel metadata and call llvm.dbg.label after label statement to associate the metadata with the label. After fixing PR37395. After fixing problems in LiveDebugVariables. After fixing NULL symbol problems in AddressPool when enabling split-dwarf-file. Differential Revision: https://reviews.llvm.org/D45045 llvm-svn: 343148
* llvm::sort(C.begin(), C.end(), ...) -> llvm::sort(C, ...)Fangrui Song2018-09-2634-89/+74
| | | | | | | | | | | | | | Summary: The convenience wrapper in STLExtras is available since rL342102. Reviewers: rsmith, #clang, dblaikie Reviewed By: rsmith, #clang Subscribers: mgrang, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D52576 llvm-svn: 343147
* P1008R1 Classes with user-declared constructors are never aggregates inRichard Smith2018-09-266-7/+90
| | | | | | C++20. llvm-svn: 343131
* [X86] For lzcnt/tzcnt intrinsics use cttz/ctlz intrinsics with zero_undef ↵Craig Topper2018-09-267-33/+43
| | | | | | | | | | | | flag set to false. Previously we used a select and the zero_undef=true intrinsic. In -O2 this pattern will get optimized to zero_undef=false. But in -O0 this optimization won't happen. This results in a compare and cmov being wrapped around a tzcnt/lzcnt instruction. By using the zero_undef=false intrinsic directly without the select, we can improve the -O0 codegen to just an lzcnt/tzcnt instruction. Differential Revision: https://reviews.llvm.org/D52392 llvm-svn: 343126
* [ARM/AArch64][v8.5A] Add Armv8.5-A targetOliver Stannard2018-09-264-0/+56
| | | | | | | | | | | This patch allows targetting Armv8.5-A from Clang. Most of the implementation is in TargetParser, so this is mostly just adding tests. Patch by Pablo Barrio! Differential revision: https://reviews.llvm.org/D52491 llvm-svn: 343111
* [analyzer] scan-build: if --status-bugs is passed, don't forget about the ↵Roman Lebedev2018-09-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | exit status of the actual build Summary: This has been bothering me for a while, but only now i have actually looked into this. I'm using one CI job for static analysis - clang static analyzers as compilers + clang-tidy via cmake. And i'd like for the build to fail if at least one of those finds issues. If clang-tidy finds issues, it will fail the build since the warnings-as-errors is set. If static analyzer finds anything, since --status-bugs is set, it will fail the build. But if clang-tidy find anything, but static analyzer does not, the build succeeds :/ Reviewers: sylvestre.ledru, alexfh, jroelofs, ygribov, george.karpenkov, krememek Reviewed By: jroelofs Subscribers: xazax.hun, szepet, a.sidorin, mikhail.ramalho, Szelethus, cfe-commits Differential Revision: https://reviews.llvm.org/D52530 llvm-svn: 343105
* Removed extra semicolon to fix Wpedantic. (NFCI).Simon Pilgrim2018-09-261-1/+1
| | | | llvm-svn: 343085
* clang-format: [JS] space after parameter naming.Martin Probst2018-09-262-1/+7
| | | | | | | | | | | | | | | | | | | Summary: Previously: foo(/*bar=*/baz); Now: foo(/*bar=*/ baz); The run-in parameter naming comment is not intended in JS. Reviewers: mboehme Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D52535 llvm-svn: 343080
* [clang-cl] Make /Gs imply default stack probes, not /Gs0 (PR39074)Hans Wennborg2018-09-262-5/+5
| | | | | | Differential revision: https://reviews.llvm.org/D52499 llvm-svn: 343077
* [CUDA] Fix two failed test cases using --cuda-path-ignore-envJiading Gai2018-09-262-3/+3
| | | | | | | | | | | Add --cuda-path-ignore-env option to those test cases to ensure the clang driver always pick the CUDA path specified by --sysroot. Reviewers: tra, Hahnfeld Differential Revision: https://reviews.llvm.org/D52259 llvm-svn: 343075
* [Frontend] Tidy up -print-decl-contexts conditionsFangrui Song2018-09-261-64/+41
| | | | | | | The existing conditions are not consistent. Some have braces and define a temporary Decl while others simply call `<< *cast<XXXDecl>(I)` (mostly the NamedDecl overload of operator<<). Just use the latter for consistency and brevity. llvm-svn: 343072
* P0859R0: List-initialization is potentially-constant-evaluated andRichard Smith2018-09-264-10/+84
| | | | | | | | | | | | triggers instantiation of constexpr functions. We mostly implemented this since Clang 6, but missed the template instantiation case. We do not implement the '&cast-expression' special case. It appears to be a mistake / oversight. I've mailed CWG to see if we can remove it. llvm-svn: 343064
* [OPENMP] Add support for OMP5 requires directive + unified_address clauseKelvin Li2018-09-2635-3/+483
| | | | | | | | | Add support for OMP5.0 requires directive and unified_address clause. Patches to follow will include support for additional clauses. Differential Revision: https://reviews.llvm.org/D52359 llvm-svn: 343063
* [analyzer] Fix a crash on casting symbolic pointers to derived classes.Artem Dergachev2018-09-262-1/+41
| | | | | | | | | | | Commit r340984 causes a crash when a pointer to a completely unrelated type UnrelatedT (eg., opaque struct pattern) is being casted from base class BaseT to derived class DerivedT, which results in an ill-formed region Derived{SymRegion{$<UnrelatedT x>}, DerivedT}. Differential Revision: https://reviews.llvm.org/D52189 llvm-svn: 343051
* Fix a bot failure from r343042.Erik Pilkington2018-09-251-2/+2
| | | | llvm-svn: 343050
* [analyzer] Add a testing facility for testing relationships between symbols.Artem Dergachev2018-09-254-521/+708
| | | | | | | | | | | | | | | | | | Tests introduced in r329780 was disabled in r342317 because these tests were accidentally testing dump infrastructure, when all they cared about was how symbols relate to each other. So when dump infrastructure changed, tests became annoying to maintain. Add a new feature to ExprInspection: clang_analyzer_denote() and clang_analyzer_explain(). The former adds a notation to a symbol, the latter expresses another symbol in terms of previously denoted symbols. It's currently a bit wonky - doesn't print parentheses and only supports denoting atomic symbols. But it's even more readable that way. Differential Revision: https://reviews.llvm.org/D52133 llvm-svn: 343048
* [clang-check-codegen][cfstring] Accept either @ or % for progbits to make ↵Kristina Brooks2018-09-251-1/+1
| | | | | | | | | | | | | | | | | ppc64be bots happy. PPC64BE bots use % instead of @ for directives like progbits. Since CFString tests also check asm output, they fail on the following: cfstring3.c:44:19: error: CHECK-ASM-ELF: expected string not found in input // CHECK-ASM-ELF: .section cfstring,"aw",@progbits <stdin>:30:2: note: possible intended match here .section cfstring,"aw",%progbits Updating that check with a {{[@%]}}progbits regex to make those bots happy. llvm-svn: 343044
* [Sema] Use a more civilized hash map to implement -Wduplicate-enum.Erik Pilkington2018-09-252-2/+10
| | | | | | | | | DenseMap<long, SOMETHING> used LONG_MAX as a tombstone, so it asserts when you try to insert it! rdar://44774672 llvm-svn: 343042
* Don't emit "will be treated as an identifier character" warning forRichard Smith2018-09-252-4/+7
| | | | | | | UTF-8 characters that aren't identifier characters in the current language mode. llvm-svn: 343040
* Reland "[Clang][CodeGen][ObjC]: Fix CoreFoundation on ELF with ↵Kristina Brooks2018-09-254-41/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `-fconstant-cfstrings`" Relanding rL342883 with more fragmented tests to test ELF-specific section emission separately from broad-scope CFString tests. Now this tests the following separately 1). CoreFoundation builds and linkage for ELF while building it. 2). CFString ELF section emission outside CF in assembly output. 3). Broad scope `cfstring3.c` tests which cover all object formats at bitcode level and assembly level (including ELF). This fixes non-bridged CoreFoundation builds on ELF targets that use -fconstant-cfstrings. The original changes from differential for a similar patch to PE/COFF (https://reviews.llvm.org/D44491) did not check for an edge case where the global could be a constant which surfaced as an issue when building for ELF because of different linkage semantics. This patch addresses several issues with crashes related to CF builds on ELF as well as improves data layout by ensuring string literals that back the actual CFConstStrings end up in .rodata in line with Mach-O. Change itself tested with CoreFoundation on Linux x86_64 but should be valid for BSD-like systems as well that use ELF as the native object format. Differential Revision: https://reviews.llvm.org/D52344 llvm-svn: 343038
* [analyzer] NFC: CallDescription: Improve array management.Artem Dergachev2018-09-252-24/+16
| | | | | | | | | | Combine the two constructor overrides into a single ArrayRef constructor to allow easier brace initializations and simplify how the respective field is used internally. Differential Revision: https://reviews.llvm.org/D51390 llvm-svn: 343037
* P0969R0: allow structured binding of accessible members, not only public ↵Richard Smith2018-09-257-54/+108
| | | | | | members. llvm-svn: 343036
* [analyzer] NFC: Legalize state manager factory injection.Artem Dergachev2018-09-255-83/+101
| | | | | | | | | | | | | | | | | | | | | When a checker maintains a program state trait that isn't a simple list/set/map, but is a combination of multiple lists/sets/maps (eg., a multimap - which may be implemented as a map from something to set of something), ProgramStateManager only contains the factory for the trait itself. All auxiliary lists/sets/maps need a factory to be provided by the checker, which is annoying. So far two checkers wanted a multimap, and both decided to trick the ProgramStateManager into keeping the auxiliary factory within itself by pretending that it's some sort of trait they're interested in, but then never using this trait but only using the factory. Make this trick legal. Define a convenient macro. One thing that becomes apparent once all pieces are put together is that these two checkers are in fact using the same factory, because the type that identifies it, ImmutableMap<const MemRegion *, ImmutableSet<SymbolRef>>, is the same. This situation is different from two checkers registering similar primitive traits. Differential Revision: https://reviews.llvm.org/D51388 llvm-svn: 343035
* Revert "[DRIVER][OFFLOAD] Do not invoke unbundler on unsupported fileAlexey Bataev2018-09-254-17/+2
| | | | | | | | | types." It reverts commit r342991 + several other commits intended to fix the tests. Still have some failed tests, need to investigate it. llvm-svn: 343002
* [OPENMP] Fix the test, NFC.Alexey Bataev2018-09-251-3/+2
| | | | | | Fixed test to pacify buildbot. llvm-svn: 342996
* [OPENMP] Fix failed test, NFC.Alexey Bataev2018-09-251-1/+0
| | | | llvm-svn: 342995
* [DRIVER][OFFLOAD] Do not invoke unbundler on unsupported file types.Alexey Bataev2018-09-254-3/+20
| | | | | | | | | clang-offload-bundler should not be invoked with the unbundling action when the input file type does not match the action type. For example, .so files should be unbundled during linking phase and should be linked only with the host code. llvm-svn: 342991
* [AArch64] Support adding X[8-15,18] registers as CSRs.Tri Vo2018-09-255-0/+133
| | | | | | | | | | | | | | | | | | Summary: Making X[8-15,18] registers call-saved is used to support CONFIG_ARM64_LSE_ATOMICS in Linux kernel. Signed-off-by: Tri Vo <trong@android.com> Reviewers: srhines, nickdesaulniers, javed.absar Reviewed By: nickdesaulniers Subscribers: kristof.beyls, jfb, cfe-commits Differential Revision: https://reviews.llvm.org/D52399 llvm-svn: 342990
* [clang-cl] Provide separate flags for all the /O variantsHans Wennborg2018-09-253-24/+51
| | | | | | | | | | | | | | | This provides better help text in "clang-cl /?". Also it cleans things up a bit: previously "/Od" could be handled either as a separate flag aliased to "-O0", or by the main optimization flag processing in TranslateOptArg. With this patch, all the flags get aliased back to /O so they're handled by TranslateOptArg. Thanks to Nico for the idea! Differential revision: https://reviews.llvm.org/D52266 llvm-svn: 342977
* [VFS] Add a proxy FS that delegates calls to underlying FS by default.Eric Liu2018-09-251-0/+36
| | | | | | | | | | | | | | Summary: This is useful when derived file systems want to override some calls and still proxy other calls. Reviewers: ilya-biryukov, sammccall Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D52462 llvm-svn: 342976
OpenPOWER on IntegriCloud