summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [X86] Lower all ISD::MGATHER nodes to X86ISD:MGATHER.Craig Topper2017-11-224-137/+71
| | | | | | | | Now we consistently represent the mask result without relying on isel ignoring it. We now have a more general SDNode and type constraints to represent these nodes in isel patterns. This allows us to present both both vXi1 and XMM/YMM mask types with a single set of constraints. llvm-svn: 318821
* [SelectionDAG] Add a isel matcher op to check the type of node results other ↵Craig Topper2017-11-223-5/+23
| | | | | | | | than result 0. I plan to use this to check the type of the mask result of masked gathers in the X86 backend. llvm-svn: 318820
* [SCEV] Strengthen variance condition in calculateLoopDispositionMax Kazantsev2017-11-222-2/+123
| | | | | | | | | | | | | | | | | | | | | | | | | Given loops `L1` and `L2` with AddRecs `AR1` and `AR2` varying in them respectively. When identifying loop disposition of `AR2` w.r.t. `L1`, we only say that it is varying if `L1` contains `L2`. But there is also a possible situation where `L1` and `L2` are consecutive sibling loops within the parent loop. In this case, `AR2` is also varying w.r.t. `L1`, but we don't correctly identify it. It can lead, for exaple, to attempt of incorrect folding. Consider: AR1 = {a,+,b}<L1> AR2 = {c,+,d}<L2> EXAR2 = sext(AR1) MUL = mul AR1, EXAR2 If we incorrectly assume that `EXAR2` is invariant w.r.t. `L1`, we can end up trying to construct something like: `{a * {c,+,d}<L2>,+,b * {c,+,d}<L2>}<L1>`, which is incorrect because `AR2` is not available on entrance of `L1`. Both situations "`L1` contains `L2`" and "`L1` preceeds sibling loop `L2`" can be handled with one check: "header of `L1` dominates header of `L2`". This patch replaces the old insufficient check with this one. Differential Revision: https://reviews.llvm.org/D39453 llvm-svn: 318819
* Add some tests for operations on const associative containers. Part of LWG#2542Marshall Clow2017-11-226-9/+32
| | | | llvm-svn: 318818
* [SCCP] Pick the right lattice value for constants.Davide Italiano2017-11-222-2/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | After the dataflow algorithm proves that an argument is constant, it replaces it value with the integer constant and drops the lattice value associated to the DEF. e.g. in the example we have @f() that's called twice: call @f(undef, ...) call @f(2, ...) `undef` MEET 2 = 2 so we replace the argument and all its uses with the constant 2. Shortly after, tryToReplaceWithConstantRange() tries to get the lattice value for the argument we just replaced, causing an assertion. This function is a little peculiar as it runs when we're doing replacement and not as part of the solver but still queries the solver. The fix is that of checking whether we replaced the value already and get a temporary lattice value for the constant. Thanks to Zhendong Su for the report! Fixes PR35357. llvm-svn: 318817
* [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
* [X86] Move the information about the feature bits used by compiler-rt and ↵Craig Topper2017-11-213-102/+117
| | | | | | | | shared by Host.cpp to a .def file and TargetParser.h so clang can make use of it. Since we keep Host.cpp and compiler-rt relatively in sync, clang can use this information as a proxy. llvm-svn: 318814
* [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
* Replace assert(true) in tests with actual asserts. Reviewed as ↵Billy Robert O'Neal III2017-11-211-2/+2
| | | | | | | | | | | | | | https://reviews.llvm.org/D40324 In a17cd7c641c34b6c4bd4845a4d4fb590cb6c238c Marshall added assert(true) to the vector<bool>::size tests, which break on C1XX: D:\Contest\gl0qojfu.5pe\src\qa\vc\libs\libcxx\upstream\test\std\containers\sequences\vector.bool\size.pass.cpp(62): error C2220: warning treated as error - no 'object' file generated d:\contest\gl0qojfu.5pe\src\qa\vc\libs\libcxx\upstream\test\std\containers\sequences\vector.bool\size.pass.cpp(33) : warning C6326: Potential comparison of a constant with another constant. d:\contest\gl0qojfu.5pe\src\qa\vc\libs\libcxx\upstream\test\std\containers\sequences\vector.bool\size.pass.cpp(52) : warning C6326: Potential comparison of a constant with another constant. The corresponding test for vector::size asserts assert(c.size() == 3);, so I changed it to do that here. llvm-svn: 318812
* [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
* Remove a broken win32 locale function redirectionMartin Storsjo2017-11-211-1/+0
| | | | | | | | | | | | | | | | One can't replace vsscanf(_l) with a sscanf(_l) that doesn't take a va_list. This has been untouched since it was added in SVN r140728, so apparently it hasn't been used since. One reason for this mistake originally might have been that there was no _vsscanf_l until MSVC 2015. Since it's unused, just remove this define. Differential Revision: https://reviews.llvm.org/D40323 llvm-svn: 318810
* Silence some MSVC warnings about not all control paths returning a value; NFC.Aaron Ballman2017-11-212-0/+2
| | | | llvm-svn: 318809
* Add missing test_macros.h inclusion.Billy Robert O'Neal III2017-11-211-0/+1
| | | | llvm-svn: 318808
* [Hexagon] Add HexagonSubtarget::getVectorLength()Krzysztof Parzyszek2017-11-211-0/+9
| | | | llvm-svn: 318807
* [CodeGen] Detect empty domain because of parameters context.Michael Kruse2017-11-212-0/+88
| | | | | | | | | | | | | | | | | | | Isl does not allow generating isl_ast_expr from an isl_pw_aff that has an empty domain (i.e. has no pieces). We already detected the case if the isl_pw_aff comes with an empty domain. isl_ast_build also considers the domain empty if it is disjoint with the parameter context (e.g. parameters values that we exclude by runtime versioning). Intersect the access relation domain with the parameter context to also detect such practically empty access domains. The effective pointer used in the generated code is unimportand because it will never be executed. This fixes llvm.org/PR35362 llvm-svn: 318806
* Object: Improve COFF irsymtab comdat representation.Peter Collingbourne2017-11-212-13/+57
| | | | | | | | | | | | Change the representation of COFF comdats so that a COFF linker is able to accurately resolve comdats between IR and native object files. Specifically, apply name mangling to comdat names consistently with native object files, and do not export comdats with an internal leader because they do not affect symbol resolution. Differential Revision: https://reviews.llvm.org/D40278 llvm-svn: 318805
* Change (void) casts to TEST_IGNORE_NODISCARD, as requested by Eric. Reviewed ↵Billy Robert O'Neal III2017-11-2165-96/+103
| | | | | | as https://reviews.llvm.org/D40065 llvm-svn: 318804
* [TableGen] Improve error reportingEvandro Menezes2017-11-213-14/+19
| | | | | | | | | When searching for a resource unit, use the reference location instead of the definition location in case of an error. Differential revision: https://reviews.llvm.org/D40263 llvm-svn: 318803
* [scudo] Make getNumberOfCPUs Fuchsia compliant v2Kostya Kortchinsky2017-11-217-8/+93
| | | | | | | | | | | | | | | | | | | Summary: This change allows Fuchsia to boot properly using the Scudo allocator. A first version of this commit was reverted by rL317834 because it broke Android builds for toolchains generated with older NDKs. This commit introduces a fall back to solve that issue. Reviewers: cryptoad, krytarowski, rnk, alekseyshl Reviewed By: cryptoad, krytarowski, alekseyshl Subscribers: llvm-commits, srhines, kubamracek, krytarowski Differential Revision: https://reviews.llvm.org/D40121 llvm-svn: 318802
* [Hexagon] Make sure that RDF does not remove EH_LABELsKrzysztof Parzyszek2017-11-212-1/+19
| | | | | | | Since EH_LABELs (and other labels) no longer have "side-effects", they should be checked for separately. llvm-svn: 318801
* [X86] Allow vpclmulqdq instructions to be commuted during isel to allow load ↵Craig Topper2017-11-212-41/+39
| | | | | | | | folding. The commuting patterns for the AVX version actually still had priority over the new patterns. llvm-svn: 318800
* [X86] Add BITALG, VAES, VBMI2, VNNI, VPCLMULQDQ, and VPOPCNTDQ instructions ↵Craig Topper2017-11-211-1/+7
| | | | | | | | to icelake CPU. This is based on table 1-1 of the October 2017 revision of Intel® Architecture Instruction Set Extensions and Future Features Programming Reference llvm-svn: 318799
* [clangd] avoid divide by literal zero to satisfy msvcSam McCall2017-11-211-1/+1
| | | | llvm-svn: 318798
* Avoid unecessary opsize byte in segment move to memoryNirav Dave2017-11-2110-42/+38
| | | | | | | | | | | | | | | | | 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
* Run polly-update-format. NFC.Michael Kruse2017-11-216-10/+10
| | | | | | | polly-check-format has been failing since at least r318517, due to more than one cause. llvm-svn: 318795
* 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
* [clangd] use u8 strings in tests to avoid problems on windowsSam McCall2017-11-211-4/+4
| | | | llvm-svn: 318793
* [X86] Sort bits in getHostCPUFeatures again.Craig Topper2017-11-211-11/+5
| | | | llvm-svn: 318792
* [clangd] Add JSON tests with invalid unicodeSam McCall2017-11-211-1/+4
| | | | llvm-svn: 318791
* [Clang][OpenMP] New clang/libomptarget map interface: new function ↵George Rokos2017-11-212-57/+57
| | | | | | | | | | | signatures, libomptarget-side This is the libomptarget-side patch which 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/D40313 llvm-svn: 318790
* [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
* [AArch64] Mark mrs of TPIDR_EL0 (thread pointer) as *having* side effects.Chad Rosier2017-11-212-62/+1
| | | | | | | | | | | | | | | | | | | This partially reverts r298851. The the underlying issue is that we don't currently model the dependency between mrs (read system register) and msr (write system register) instructions. Something like the below should never be reordered: msr TPIDR_EL0, x0 ;; set thread pointer mrs x8, TPIDR_EL0 ;; read thread pointer but was being reordered after r298851. The functional part of the patch that wasn't reverted needed to remain in place in order to not break r299462. PR35317 llvm-svn: 318788
* Fix r318786Hans Wennborg2017-11-211-2/+2
| | | | llvm-svn: 318787
* removed unused private method decl. NFCNuno Lopes2017-11-211-3/+2
| | | | llvm-svn: 318786
* 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
* Rename test/Transforms/CountingFunctionInserter -> EntryExitInstrumenterHans Wennborg2017-11-211-0/+0
| | | | | | The pass was renamed in r318195. llvm-svn: 318784
* EntryExitInstrumenter: support __cyg_profile_func_enter_bareHans Wennborg2017-11-212-1/+7
| | | | | | It works just like __cyg_profile_func_enter but takes no arguments. llvm-svn: 318783
* [clangd] Include the right header for std::isxdigitSam McCall2017-11-211-0/+10
| | | | llvm-svn: 318782
* [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
* [clangd] Satisfy GCC: 'changes meaning of Error'Sam McCall2017-11-211-5/+5
| | | | llvm-svn: 318780
* 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
* [clangd] Fix dumb && || bug from r318774Sam McCall2017-11-211-1/+1
| | | | llvm-svn: 318778
* [ARM] Remove pre-UAL FLDM/FSTM aliasesOliver Stannard2017-11-215-170/+10
| | | | | | | | | | | | | These are pre-UAL syntax, and we don't support any other pre-UAL instructions, with the exception of FLDMX/FSTMX, which don't have a UAL equivalent. Therefore there's no reason to keep them or their AsmParser hacks around. With the AsmParser hacks removed, the FLDMX and FSTMX instructions get the same operand diagnostics as the UAL instructions. Differential revision: https://reviews.llvm.org/D39196 llvm-svn: 318777
* [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
* [sanitizer] Define SANITIZER_USE_GETAUXVAL for AndroidKostya Kortchinsky2017-11-211-2/+3
| | | | | | | | | | | | | | | | Summary: Android for API level >= 21 has `getauxval`. Enable `SANITIZER_USE_GETAUXVAL` when those requirements are met. Correct a typo in the header. Reviewers: alekseyshl Reviewed By: alekseyshl Subscribers: srhines, llvm-commits, kubamracek Differential Revision: https://reviews.llvm.org/D40260 llvm-svn: 318775
* [clangd] Add parsing and value inspection to JSONExpr.Sam McCall2017-11-213-32/+550
| | | | | | | | | | | | | | | | | | | | | Summary: This will replace the places where we're using YAMLParser to parse JSON now: - the new marshalling code (T::parse()) should handle fewer cases and require fewer explicit casts - we'll early-reject invalid JSON that YAMLParser accepts - we'll be able to fix protocol-parsing bugs caused by the fact that YAML can only parse forward I plan to do the conversion as soon as this lands, but I don't want it in one patch as the protocol.cpp changes are conflict-prone. Reviewers: ioeric Subscribers: ilya-biryukov, cfe-commits Differential Revision: https://reviews.llvm.org/D40182 llvm-svn: 318774
* [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 MemorySSA as loop dependency, disabled by default [NFC].Alina Sbirlea2017-11-217-11/+43
| | | | | | | | | | | | | | | | | Summary: First step in adding MemorySSA as dependency for loop pass manager. Adding the dependency under a flag. New pass manager: MSSA pointer in LoopStandardAnalysisResults can be null. Legacy and new pass manager: Use cl::opt EnableMSSALoopDependency. Disabled by default. Reviewers: sanjoy, davide, gberry Subscribers: mehdi_amini, Prazek, llvm-commits Differential Revision: https://reviews.llvm.org/D40274 llvm-svn: 318772
OpenPOWER on IntegriCloud