summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix newline handling in clang-query parserStephen Kelly2019-12-292-1/+9
| | | | Don't prematurely remove characters from the end of the string
* Fix handling of newlines in clang-queryStephen Kelly2019-12-292-3/+19
| | | | Replace assert with diagnostic for missing newline.
* [Attributor] AAUndefinedBehavior: Check for branches on undef value.Hideto Ueno2019-12-296-65/+333
| | | | | | | | | | | | | | | A branch is considered UB if it depends on an undefined / uninitialized value. At this point this handles simple UB branches in the form: `br i1 undef, ...` We query `AAValueSimplify` to get a value for the branch condition, so the branch can be more complicated than just: `br i1 undef, ...`. Patch By: Stefanos Baziotis (@baziotis) Reviewers: jdoerfert, sstefan1, uenoku Reviewed By: uenoku Differential Revision: https://reviews.llvm.org/D71799
* [X86] Stop accidentally custom type legalizing v4i32->v4f32 on SSE1 only ↵Craig Topper2019-12-281-2/+3
| | | | | | | | | targets. We had a Custom operation action for v4i32 on SSE1. But since v4i32 isn't legal until SSE2 this was not what was intended. The code that get executed was intended for op legalization and creates a bunch of v4i32 nodes that all end up scalarized.
* [LV] Use getMask() when printing recipe [NFCI]Gil Rapaport2019-12-292-3/+4
| | | | | | Use dedicated API for getting the mask instead of duplicating it. Differential Revision: https://reviews.llvm.org/D71964
* [X86] Remove a redundant (scalar_to_vector (extract_vector_elt X))) in ↵Craig Topper2019-12-281-6/+1
| | | | LowerUINT_TO_FP_i32. NFCI
* [X86] Fix -enable-machine-outliner for x86-32 after D48683Fangrui Song2019-12-281-3/+1
| | | | D48683 accidentally disabled -enable-machine-outliner for x86-32.
* [mlir] Fix the wrong computation of dynamic strides for lowering AllocOp to LLVMTung Le Duc2019-12-282-7/+8
| | | | | Leftover change from before the MLIR merge, reviewed at accepted at https://github.com/tensorflow/mlir/pull/338.
* Revert "[COFF] Make the autogenerated .weak.<name>.default symbols static"Martin Storsjö2019-12-284-17/+13
| | | | | | | This reverts commit 7ca86ee6494d4307333b300bae80e42df4a5140f. Apparently this change causes MS link.exe to error out with "LNK1235: corrupt or invalid COFF symbol table".
* [lldb][NFC] Remove GetASTContext call in ClangPersistentVariablesRaphael Isemann2019-12-283-27/+36
| | | | | | | | We try to build a CompilerType from the persistent decls so we need a ClangASTContext. With this patch the ClangPersistentVariables store the associated ClangASTContext of the persistent decls (which is always the scratch ClangASTContext) and no longer call GetASTContext to map back from clang::ASTContext to ClangASTContext.
* Allow redeclaration of __declspec(uuid)Zachary Henkel2019-12-283-3/+15
| | | | | | | | | msvc allows a subsequent declaration of a uuid attribute on a struct/class. Mirror this behavior in clang-cl. Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D71439
* [COFF] Make the autogenerated .weak.<name>.default symbols staticMartin Storsjö2019-12-284-13/+17
| | | | | | | | | | | | | | If we have references to the same extern_weak in multiple objects, all of them would generate external symbols with the same name. Make them static to avoid duplicate definitions; nothing should need to refer to this symbol outside of the current object. GCC/binutils seems to handle the same by not using a fixed string for the ".default" suffix, but instead using the name of some other defined external symbol from the same object (which is supposed to be unique among objects unless there's other duplicate definitions). Differential Revision: https://reviews.llvm.org/D71711
* [CMake] Fix lld detection after D69685Fangrui Song2019-12-281-1/+1
| | | | | | | | | | | | | | | | | | | D69685 actually broke lld detection for my build (probably due to CMake processing order). Before: ``` build projects/compiler-rt/lib/sanitizer_common/tests/Sanitizer-x86_64-Test-Nolibc: ... bin/clang || ... ``` After: ``` build projects/compiler-rt/lib/sanitizer_common/tests/Sanitizer-x86_64-Test-Nolibc: ... bin/clang bin/lld || ... ``` Differential Revision: https://reviews.llvm.org/D71950
* [X86] Add test cases for v4i64->v4f32 and v8i64->v8f32 ↵Craig Topper2019-12-282-0/+474
| | | | strict_sint_to_fp/strict_uint_to_fp to vec-strict-inttofp-256.ll and vec-strict-inttofp-512.ll. NFC
* Fix bots after a9ad65a2b34fNemanja Ivanovic2019-12-281-0/+1
| | | | | In the last commit, I neglected to initialize the new subtarget feature I added which caused failures on a few bots. This should fix that.
* [PowerPC] Change default for unaligned FP access for older subtargetsNemanja Ivanovic2019-12-285-2/+55
| | | | | | | | | | | This is a fix for https://bugs.llvm.org/show_bug.cgi?id=40554 Some CPU's trap to the kernel on unaligned floating point access and there are kernels that do not handle the interrupt. The program then fails with a SIGBUS according to the PR. This just switches the default for unaligned access to only allow it on recent server CPUs that are known to allow this. Differential revision: https://reviews.llvm.org/D71954
* SimplifyDemandedBits - Remove duplicate getOperand() call. NFC.Simon Pilgrim2019-12-281-9/+7
| | | | Pulled out from D56387 - cleanup variable names, move shift amount legalization inside if() of its only user and remove duplicate getOperand() call.
* Fix crash in getFullyQualifiedName for inline namespaceAlexey Bader2019-12-282-1/+12
| | | | | | | | | | | | | | Summary: The ICE happens when the most outer namespace is an inline namespace. Reviewers: bkramer, ilya-biryukov Reviewed By: ilya-biryukov Subscribers: ebevhan, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D71962
* [lldb][NFC] Remove GetASTContext call in ClangDeclVendorRaphael Isemann2019-12-285-22/+20
| | | | | | | | Instead of returning NamedDecls and then calling GetASTContext to find back the ClangASTContext we used can just implement the FindDecl variant that returns CompilerDecls (and implement the other function by throwing away the ClangASTContext part of the compiler decl).
* [PowerPC] Modify the hasSideEffects of some VSX instructions from 1 to 0Kang Zhang2019-12-282-31/+33
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: If we didn't set the value for hasSideEffects bit in our td file, `llvm-tblgen` will set it as true for those instructions which has no match pattern. Below 6 instructions don't set the hasSideEffects flag and don't have match pattern, so their hasSideEffects flag will be set true by llvm-tblgen. But in fact below instructions don't modify any special register and don't have other SideEffects, they shouldn't have SideEffects. This patch is to modify the hasSideEffects of below instructions from 1 to 0. ``` VEXTUHLX VEXTUHRX VEXTUWLX VEXTUWRX VSPLTBs VSPLTHs ``` Reviewed By: jsji Differential Revision: https://reviews.llvm.org/D71391
* [TargetLowering] Update comment to reference the correct compiler-rt ↵Craig Topper2019-12-271-1/+1
| | | | function the code is based on. NFC
* [mlir] Merge the successor operand count into BlockOperand.River Riddle2019-12-275-79/+98
| | | | | | | | Summary: The successor operand counts are directly tied to block operands anyways, and this simplifies the trailing objects of Operation(i.e. one less computation to perform). Reviewed By: mehdi_amini Differential Revision: https://reviews.llvm.org/D71949
* [ADT] Fix FoldingSet documentation typosBrian Gesiak2019-12-271-5/+5
| | | | | | | | | | | * "If found then M with be non-NULL" should be "will be non-NULL". * The documentation examples (1) and (2) declare and use a variable `MyNode *M`, but examples (3) and (4) switch midway to using a variable named `N`. Unify the examples to all use `M`. * The examples demonstrate the use of member functions of `FoldingSet`, but (3) and (4) invoke these as if they were free functions. Modify them to call member functions on the `MyFoldingSet` object constructed in the code above example (1).
* Delete setjmp_undefined_for_msvc workaround after llvm.setjmp was removedFangrui Song2019-12-272-16/+0
|
* [Intrinsic] Delete tablegen rules of llvm.{sig,}{setjmp,longjmp}Fangrui Song2019-12-272-34/+0
|
* lld: Remove explicit copy ops from AssociatedIterator, relying on implicit ↵David Blaikie2019-12-271-5/+0
| | | | operators
* DebugInfo: Fix rangesBaseAddress DICompileUnit bitcode ↵David Blaikie2019-12-275-6/+7
| | | | | | serialization/deserialization Follow-up to r346788 review feedback from Adrian Prantl.
* AMDGPU: Adjust test so it will work with GlobalISelMatt Arsenault2019-12-271-8/+8
| | | | This is mostly a workaround for not handling the mubuf store path yet.
* [ELF] Improve the condition to create .interpFangrui Song2019-12-273-10/+8
| | | | | | | | | | | | | | | This restores commit 1417558e4a61794347c6bfbafaff7cd96985b2c3 and its follow-up, reverted by commit c3dbd782f1e0578c7ebc342f2e92f54d9644cff7. After this commit: clang -fuse-ld=bfd -no-pie -nostdlib a.c => .interp not created clang -fuse-ld=bfd -pie -fPIE -nostdlib a.c => .interp created clang -fuse-ld=gold -no-pie -nostdlib a.c => .interp not created clang -fuse-ld=gold -pie -fPIE -nostdlib a.c => .interp created clang -fuse-ld=lld -no-pie -nostdlib a.c => .interp created clang -fuse-ld=lld -pie -fPIE -nostdlib a.c => .interp created
* [sanitizer] Link Sanitizer-x86_64-Test-Nolibc with -staticFangrui Song2019-12-271-1/+1
| | | | | | | | | | | Pass -static so that clang will not pass -Wl,--dynamic-linker,... to the linker. The test is not expected to run under a ld.so. (Technically it works under a ld.so but glibc expects to see a PT_DYNAMIC. lld intentionally does not follow GNU ld's complex rules regarding PT_DYNAMIC.) This allows commit 1417558e4a61794347c6bfbafaff7cd96985b2c3 to be relanded.
* AMDGPU/GlobalISel: Use SReg_32 for readfirstlane constrainingMatt Arsenault2019-12-279-16/+16
| | | | | This matches the DAG behavior where we don't use SReg_32_XM0 everywhere anymore, and fixes not coalescing the copies into m0.
* Hexagon: Fix missing tablegen mode commentMatt Arsenault2019-12-271-1/+1
|
* TII: Fix using Register for a subregister index argumentMatt Arsenault2019-12-273-3/+3
|
* AMDGPU: Use RegisterMatt Arsenault2019-12-271-9/+9
|
* [mlir][spirv] Add basic definitions for supporting availabilityLei Zhang2019-12-2715-23/+728
| | | | | | | | | | | | | | | | | | | | | | | | SPIR-V has a few mechanisms to control op availability: version, extension, and capabilities. These mechanisms are considered as different availability classes. This commit introduces basic definitions for modelling SPIR-V availability classes. Specifically, an `Availability` class is added to SPIRVBase.td, along with two subclasses: MinVersion and MaxVersion for versioning. SPV_Op is extended to take a list of `Availability`. Each `Availability` instance carries information for generating op interfaces for the corresponding availability class and also the concrete availability requirements. With the availability spec on ops, we can now auto-generate the op interfaces of all SPIR-V availability classes and also synthesize the op's implementations of these interfaces. The interface generation is done via new TableGen backends -gen-avail-interface-{decls|defs}. The op's implementation is done via -gen-spirv-avail-impls. Differential Revision: https://reviews.llvm.org/D71930
* Revert "[ELF] Improve the condition to create .interp"Reid Kleckner2019-12-273-8/+10
| | | | | | | | This reverts commit 1417558e4a61794347c6bfbafaff7cd96985b2c3. Also reverts commit 019a92bb2832447092bb5c1faf9d03bb03b8c9c8. This causes check-sanitizer to fail. The "-Nolib" variant of the test crashes on startup in the loader.
* Support powerpc and sparc when building without init_array.Sterling Augustine2019-12-271-7/+25
| | | | | | | | | | | | Summary: Support powerpc and sparc when building without init_array. Reviewers: rdhindsa, gribozavr Subscribers: jyknight, nemanjai, fedor.sergeev, jsji, shchenz, steven.zhang, #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D71944
* [PowerPC][LoopVectorize]Add floating point reg usage testJinsong Ji2019-12-271-0/+91
| | | | Copied two tests from x86 to test floating point reg usage.
* [mlir][spirv] Update docs regarding how to define new ops and typesLei Zhang2019-12-271-2/+48
| | | | | | | This commit expands on the steps of defining a new SPIR-V op and also provides pointers on how to define a new SPIR-V specific type. Differential Revision: https://reviews.llvm.org/D71928
* Revert "CWG2352: Allow qualification conversions during reference binding."David Blaikie2019-12-2710-250/+153
| | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit de21704ba96fa80d3e9402f12c6505917a3885f4. Regressed/causes this to error due to ambiguity: void f(const int * const &); void f(int *); int main() { int * x; f(x); } (in case it's important - the original case where this turned up was a member function overload in a class template with, essentially: f(const T1&) f(T2*) (where T1 == X const *, T2 == X)) It's not super clear to me if this ^ is expected behavior, in which case I'm sorry about the revert & happy to look into ways to fix the original code.
* [mlir] Convert std.and/std.or ops to spv.LogicalAnd/spv.LogicalOrMaheshRavishankar2019-12-272-7/+49
| | | | | | | | | The conversion from std.and/std.or to spv.LogicalAnd/spv.LogicalOr is only valid for boolean (i1) types. Modify BinaryOpPattern in StandardToSPIRV.td to allow limiting the type of the operands for which the pattern is applied. Differential Revision: https://reviews.llvm.org/D71881
* Reland "[msan] Intercept qsort, qsort_r."Reid Kleckner2019-12-273-0/+165
| | | | | | | This reverts commit 8fcce5ac73d49981656d9126e6c88391c1f6bf01. I spoke too soon, the revert does not actually cause the startup crash to go away.
* Revert "[msan] Intercept qsort, qsort_r."Reid Kleckner2019-12-273-165/+0
| | | | | | | | | | | | | | | | | | | This reverts commit 7a9ebe95125ea87a494d0c18f44f10bd70e12188, and dependent commit 54c522420347e58aa7bae1892cf5c5672b57c875, which disables qsort interception for some iOS platforms. After this change, the -Nolibc sanitizer common test binary crashes on startup on my regular Linux workstation, as well as on our bots: https://ci.chromium.org/p/chromium/builders/try/linux_upload_clang/740 ******************** Failing Tests (1): SanitizerCommon-Unit :: ./Sanitizer-x86_64-Test/SanitizerCommon.NolibcMain Loading it up in gdb shows that it crashes during relocation processing, which suggests that some glibc loader versions do not support the THREADLOCAL data added in this interceptor.
* TailDuplication: Clear NoPHIs propertyMatt Arsenault2019-12-272-0/+46
| | | | | | The early tail duplicator pass introduces new ones, so a MIR test that infers no phis since there were none on the input would fail the verifier after running.
* [VFS] Don't run symlink test on Windows, it may pass or failReid Kleckner2019-12-271-1/+1
| | | | | | | | | | | | | This test was XFAILed because of symlinks, but some versions of ln -s seem to work on Windows, so the test was unexpectedly passing on our bot: http://lab.llvm.org:8011/builders/clang-x64-windows-msvc/builds/13233 Unexpected Passing Tests (1): Clang :: VFS/subframework-symlink.m I don't know how or why, but it seems dependent on system configuration, and is not something worth debugging. Avoid the problem by marking the test UNSUPPORTED: system-windows instead of XFAIL: system-windows.
* [compiler-rt] [netbsd] Add support for versioned statvfs interceptorsKamil Rytarowski2019-12-274-1/+177
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Add support for NetBSD 9.0 and newer versions of interceptors operating on struct statvfs: fstatvfs, fstatvfs1, getmntinfo, getvfsstat, statvfs, statvfs1. The default promoted interceptors are for NetBSD 9.99.26. Older ones (currently 9.0) are kept in a new NetBSD specific file: /sanitizer_common_interceptors_netbsd_compat.inc. This file defines compat interceptors and mangles `INIT_*` macros, concatenating the current interceptors and the compat ones. This redefinition is not elegant, but it avoids preprocessor madness. Define struct_statvfs90_sz for the compat purposes. Reviewers: mgorny, kcc, vitalybuka, joerg Reviewed By: mgorny Subscribers: dberris, llvm-commits, #sanitizers Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D71700
* [ConstantRange] Respect destination bitwidth for cast results.Florian Hahn2019-12-272-2/+24
| | | | | | | | | | | We returning a full set, we should use ResultBitWidth. Otherwise we might it assertions when the resulting constant ranges are used later on. Reviewers: nikic, spatel, reames Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D71937
* [OpenCL] Fixed printing of __private in AMDGPU testAnastasia Stulova2019-12-271-2/+2
| | | | Tags: #clang
* [OpenCL] Fix inconsistency between opencl and c11 atomic fetch max/minYaxun (Sam) Liu2019-12-272-4/+4
| | | | | | | | | | | | There is some inconsistency between opencl and c11 atomic fetch max/min after https://reviews.llvm.org/D46386 https://reviews.llvm.org/D55562 It is not reasonable to have such inconsistencies. This patch fixes that. Differential Revision: https://reviews.llvm.org/D71725
* [Matrix] Propagate and use shape info for binary operators.Florian Hahn2019-12-273-8/+171
| | | | | | | | | | | | | This patch extends the current shape propagation and shape aware lowering to also support binary operators. Those operators are uniform with respect to their shape (shape of the input operands is the same as the shape of their result). Reviewers: anemet, Gerolf, reames, hfinkel, andrew.w.kaylor Reviewed By: anemet Differential Revision: https://reviews.llvm.org/D70898
OpenPOWER on IntegriCloud