summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [x86] add tests for vector extend + logic ops; NFCSanjay Patel2018-12-231-0/+504
| | | | llvm-svn: 350031
* [xray] Detect MPROTECT and error out when it's enabled (on NetBSD)Michal Gorny2018-12-237-0/+38
| | | | | | | | | | Add a CheckMPROTECT() routine to detect when pax MPROTECT is enabled on NetBSD, and error xray out when it is. The solution is adapted from existing CheckASLR(). Differential Revision: https://reviews.llvm.org/D56049 llvm-svn: 350030
* [xray] Disable alignas() for thread_local objects on NetBSDMichal Gorny2018-12-233-2/+14
| | | | | | | | | | | | | | | | Disable enforcing alignas() for structs that are used as thread_local data on NetBSD. The NetBSD ld.so implementation is buggy and does not enforce correct alignment; however, clang seems to take it for granted and generates instructions that segv on wrongly aligned objects. Therefore, disable those alignas() statements on NetBSD until we can establish a better fix. Apparently, std::aligned_storage<> does not have any real effect at the moment, so we can leave it as-is. Differential Revision: https://reviews.llvm.org/D56000 llvm-svn: 350029
* [Driver] Disable -faddrsig on Gentoo by defaultMichal Gorny2018-12-233-0/+8
| | | | | | | | | | | | | | Gentoo supports combining clang toolchain with GNU binutils, and many users actually do that. As -faddrsig is not supported by GNU strip, this results in a lot of warnings. Disable it by default and let users enable it explicitly if they want it; with the intent of reevaluating when the underlying feature becomes standarized. See also: https://bugs.gentoo.org/667854 Differential Revision: https://reviews.llvm.org/D56047 llvm-svn: 350028
* [Distro] Support detecting GentooMichal Gorny2018-12-233-0/+44
| | | | | | | | | | | Add support for distinguishing plain Gentoo distribution, and a unit test for it. This is going to be used to introduce distro-specific customizations in the driver code; most notably, it is going to be used to disable -faddrsig. Differential Revision: https://reviews.llvm.org/D56024 llvm-svn: 350027
* [gn build] Add build files for ↵Nico Weber2018-12-234-0/+60
| | | | | | | | | | clang/tools/{arcmt-test,clang-check,clang-func-mapping} Needed for check-clang. Differential Revision: https://reviews.llvm.org/D56056 llvm-svn: 350026
* [gn build] Add build files for clang/tools/{clang-refactor,clang-rename}, ↵Nico Weber2018-12-235-0/+75
| | | | | | | | | | clang/utils/hmaptool, clang/lib/Tooling/Refactoring Needed for check-clang. Differential Revision: https://reviews.llvm.org/D56055 llvm-svn: 350025
* [gn build] Add build files for ↵Nico Weber2018-12-236-0/+95
| | | | | | | | | | clang/tools/{clang-diff,clang-import-test,diagtool and clang/lib/Tooling, clang/lib/Tooling/ASTDiff Needed for check-clang. Differential Revision: https://reviews.llvm.org/D56054 llvm-svn: 350024
* [ORC] Rename register in the OrcMips64 resolver code comments. NFCSimon Atanasyan2018-12-231-2/+2
| | | | | | | The `fp` and `s8` register names are synonyms. But `fp` better reflects a purpose of the register. llvm-svn: 350023
* [ORC] clang-format OrcMips32 and OrcMips64 code. NFCSimon Atanasyan2018-12-231-24/+16
| | | | llvm-svn: 350022
* [ORC] Remove redundant instruction from MIPS resolver code. NFCSimon Atanasyan2018-12-232-9/+8
| | | | | | It's redundant to restore the `$a3` register twice. llvm-svn: 350021
* Set the default SANITIZER_CXX_ABI library to libc++ for FreeBSD, andDimitry Andric2018-12-231-1/+1
| | | | | | also mark it as a system library, like on macOS. llvm-svn: 350020
* [MemCpyOpt] Use LocationSize instead of ints; NFCGeorge Burgess IV2018-12-231-3/+3
| | | | | | | | | | | | | | | Trying to keep these patches super small so they're easily post-commit verifiable, as requested in D44748. srcSize is derived from the size of an alloca, and we quit out if the size of that is > the size of the thing we're copying to. Hence, we should always copy everything over, so these sizes are precise. Don't make srcSize itself a LocationSize, since optionality isn't helpful, and we do some comparisons against other sizes elsewhere in that function. llvm-svn: 350019
* [X86] Return false from hasAndNotCompare if the comparision value is a constant.Craig Topper2018-12-232-8/+5
| | | | | | We won't end up using an ANDN instruction in this case so we should generate the same code we do for pre-BMI targets. llvm-svn: 350018
* [MemoryLocation] Use LocationSize instead of ints; NFCGeorge Burgess IV2018-12-231-20/+36
| | | | | | | | | | | | | | Trying to keep these patches super small so they're easily post-commit verifiable, as requested in D44748. This one sadly isn't *super* small, but all of the changes here are either to: - libfuncs that are passed a constant size (memcpy, memset, ...) - instructions that store/load a constant size So they have to be precise llvm-svn: 350017
* [Loads] Use LocationSize instead of ints; NFCGeorge Burgess IV2018-12-231-1/+1
| | | | | | | | | | Keeping these patches super small so they're easily post-commit verifiable, as requested in D44748. This tries to find literal loads/stores of the given type, so this has to be precise. llvm-svn: 350016
* [Lint] Use LocationSize instead of ints; NFCGeorge Burgess IV2018-12-231-2/+2
| | | | | | | Keeping these patches super small so they're easily post-commit verifiable, as requested in D44748. llvm-svn: 350015
* [AAEval] Use LocationSize instead of ints; NFCGeorge Burgess IV2018-12-231-7/+10
| | | | | | | Keeping these patches super small so they're easily post-commit verifiable, as requested in D44748. llvm-svn: 350014
* [X86] Fix an old FIXME about folding the zero constant into the OR ↵Craig Topper2018-12-233-9/+7
| | | | | | instruction we use for sequentially consistent fence in 32-bit mode without SSE2. llvm-svn: 350013
* [X86] Autogenerate complete checks. NFCCraig Topper2018-12-231-1/+6
| | | | llvm-svn: 350012
* Test DWARFv5 with gdb-index and low_pc/high_pc on the CU (rather than ranges)David Blaikie2018-12-221-0/+50
| | | | | | | | There was a bug in LLVM's libDebugInfo where it did not porpagate the section index through the range query built from low_pc/high_pc. Hard to test in LLVM, so I'm adding a test here. llvm-svn: 350011
* DebugInfo: Accurately propagate the section used by a relocation when ↵David Blaikie2018-12-222-5/+4
| | | | | | | | | | | | | | | | | accessing ranges defined by low/high_pc This is difficult/not possible to test in LLVM, but is visible as a crash in LLD when parsing DWARF to generate gdb-index. This function is called by llvm-dwarfdump when parsing high_pc for non-verbose output (to print the actual high_pc rather than the low_pc relative value), but in that case llvm-dwarfdump doesn't print section names (if it did, it would hit this problem). We could add some other features to llvm-dwarfdump to expose this, but nothing really springs to my mind. I will add a test to lld, though. llvm-svn: 350010
* llvm-dwarfdump: Dump the section name/number for addr attributesDavid Blaikie2018-12-226-9/+9
| | | | llvm-svn: 350009
* [Analysis] More LocationSize cleanup; NFCGeorge Burgess IV2018-12-223-4/+7
| | | | | | | Keeping these patches super small so they're easily post-commit verifiable, as requested in D44748. llvm-svn: 350008
* [Analysis] s/uint64_t/LocationSize; NFCGeorge Burgess IV2018-12-222-4/+6
| | | | | | Let the gradual cleanup from D44748 continue. :) llvm-svn: 350007
* [DAGCombiner] allow narrowing of add followed by truncateSanjay Patel2018-12-2211-55/+49
| | | | | | | | | | | | | | | trunc (add X, C ) --> add (trunc X), C' If we're throwing away the top bits of an 'add' instruction, do it in the narrow destination type. This makes the truncate-able opcode list identical to the sibling transform done in IR (in instcombine). This change used to show regressions for x86, but those are gone after D55494. This gets us closer to deleting the x86 custom function (combineTruncatedArithmetic) that does almost the same thing. Differential Revision: https://reviews.llvm.org/D55866 llvm-svn: 350006
* [x86] add load fold patterns for movddup with vzext_loadSanjay Patel2018-12-225-10/+13
| | | | | | | | | | | The missed load folding noticed in D55898 is visible independent of that change either with an adjusted IR pattern to start or with AVX2/AVX512 (where the build vector becomes a broadcast first; movddup is not produced until we get into isel via tablegen patterns). Differential Revision: https://reviews.llvm.org/D55936 llvm-svn: 350005
* Improving this fatal diagnostic to help checker developers figure out what's ↵Aaron Ballman2018-12-221-3/+4
| | | | | | actually gone wrong when they hit it. llvm-svn: 350004
* [AST] Store the arguments of CXXConstructExpr in a trailing arrayBruno Ricci2018-12-227-179/+274
| | | | | | | | | | | | | | | Store the arguments of CXXConstructExpr in a trailing array. This is very similar to the CallExpr case in D55771, with the exception that there is only one derived class (CXXTemporaryObjectExpr) and that we compute the offset to the trailing array instead of storing it. This saves one pointer per CXXConstructExpr and CXXTemporaryObjectExpr. Reviewed By: rjmccall Differential Revision: https://reviews.llvm.org/D56022 llvm-svn: 350003
* [Sanitizer] Enable POSIX regex api on FreeBSD.David Carlier2018-12-225-43/+27
| | | | | | | | | | | | | | | | | Reviewers: krytarowski Reviewed By: krytarowski Differential Revision: https://reviews.llvm.org/D56009 M lib/sanitizer_common/sanitizer_common_interceptors.inc M lib/sanitizer_common/sanitizer_platform_interceptors.h M lib/sanitizer_common/sanitizer_platform_limits_freebsd.cc M lib/sanitizer_common/sanitizer_platform_limits_freebsd.h D test/sanitizer_common/TestCases/NetBSD/regex.cc A + test/sanitizer_common/TestCases/Posix/regex.cc llvm-svn: 350002
* [runtime] [test] Fix using %python pathMichal Gorny2018-12-2212-16/+17
| | | | | | | | | | Fix the newly-added tests to use %python substitution in order to use the correct path to Python interpreter. Otherwise, they fail on NetBSD where there is no 'python', just 'pythonX.Y'. Differential Revision: https://reviews.llvm.org/D56048 llvm-svn: 350001
* NFC][CodeGen][X86][AArch64] Tests for bit extract (pat. a/c/d) with trunc ↵Roman Lebedev2018-12-222-288/+1345
| | | | | | (PR36419) llvm-svn: 350000
* [NFC][CodeGen][X86][AArch64] Bit extract: add nounwind attr to drop .cfi noiseRoman Lebedev2018-12-222-81/+36
| | | | | | Forgot about that. llvm-svn: 349999
* [NFC][CodeGen][X86][AArch64] Tests for bit extract (pat. b) with trunc (PR36419)Roman Lebedev2018-12-222-192/+632
| | | | | | | | | | | | | | | | @bextr64_32_b1 is extracted from hotpath of real-world code (RawSpeed BitStream<>::peekBitsNoFill()) after `clang -O3`. @bextr64_32_b2/@bextr64_32_b0 is the same pattern, but with trunc done last, showing how i think it can be handled: https://rise4fun.com/Alive/K4B https://rise4fun.com/Alive/qC9 It is possible that middle-end should do some of this, too. https://bugs.llvm.org/show_bug.cgi?id=36419 llvm-svn: 349998
* llvm-dwarfdump: Remove extraneous space between '(' and 'indexed'David Blaikie2018-12-2212-64/+64
| | | | | | When dumping string or address indexes llvm-svn: 349997
* llvm-dwarfdump: Print the section name/number for addr_index attributesDavid Blaikie2018-12-223-4/+15
| | | | | | (addr attributes coming shortly) llvm-svn: 349996
* DebugInfo: Refactor named section dumping into a reusable helperDavid Blaikie2018-12-223-9/+18
| | | | | | | | | | | Currently the section name (& possibly number) is only printed on addresses in ranges - but no reason it couldn't also be displayed on other addresses (like low/high PC). Refactor in that direction by pulling out the section lookup and name ambiguity dumping logic into a reusable helper. llvm-svn: 349995
* Add support for LLVM profile for NetBSDKamil Rytarowski2018-12-225-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | Summary: NetBSD uses typical UNIX interfaces. All tests pass except instrprof-dlopen-dlclose-gcov.test, as there is not supported semantics of atexit(3) in dlopen(3)ed+dlclose(3)d DSO. NetBSD also ships an older version of LLVM profile (ABI v.2 predating ABI v.4 in upstream version) inside libc. That copy has been manually removed during the porting and testing process of the upstream version to NetBSD. Otherwise there were conflicts between them two. Reviewers: joerg, vitalybuka, vsk Subscribers: srhines, fedor.sergeev, llvm-commits, mgorny, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D55997 llvm-svn: 349994
* [gn build] Embed __TEXT __info_plist section into clang binary on macOSNico Weber2018-12-221-2/+30
| | | | | | | | | Verified by comparing the output of `otool -P bin/clang` between the GN and the CMake build. Differential Revision: https://reviews.llvm.org/D55984 llvm-svn: 349992
* [gn build] Add build files for clang, clang-offload-bundler, and ↵Nico Weber2018-12-224-15/+254
| | | | | | | | | | clang/lib/Headers With this, the GN build can build clang! Differential Revision: https://reviews.llvm.org/D55981 llvm-svn: 349991
* Fix mingw build failures caused by r349839Tom Stellard2018-12-221-0/+4
| | | | | | | | | | Reviewers: mstorsjo Subscribers: mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D56004 llvm-svn: 349990
* [gn build] Add build files for llvm-cat, llvm-lto, llvm-lto2, ↵Nico Weber2018-12-227-0/+114
| | | | | | | | | | llvm-modextract, llvm-profdata, llvm-symbolizer These are the llvm/tools needed by check-clang. Differential Revision: https://reviews.llvm.org/D56018 llvm-svn: 349989
* [gn build] Add build file for clang/lib/FrontendToolNico Weber2018-12-222-0/+30
| | | | | | Differential Revision: https://reviews.llvm.org/D55980 llvm-svn: 349988
* [gn build] Add build file for clang/lib/ARCMigrateNico Weber2018-12-222-0/+40
| | | | | | Differential Revision: https://reviews.llvm.org/D55979 llvm-svn: 349987
* [gn build] Add build files for clang/lib/{ASTMatchers,CrossTU}, ↵Nico Weber2018-12-227-0/+266
| | | | | | | | | | clang/lib/StaticAnalyzer/{Checkers,Core,Frontend} The intent is to add the build file for clang/lib/StaticAnalyzer/Frontend; everything else is pulled in by that. Differential Revision: https://reviews.llvm.org/D55978 llvm-svn: 349986
* DebugInfo: Remove extra attribute lookupDavid Blaikie2018-12-221-3/+2
| | | | llvm-svn: 349985
* [analyzer] pr38668: Do not attempt to cast loaded integers to floats.Artem Dergachev2018-12-226-11/+97
| | | | | | | | | | | | | | | | | | | | | | This patch is a different approach to landing the reverted r349701. It is expected to have the same object (memory region) treated as if it has different types in different program points. The correct behavior for RegionStore when an object is stored as an object of type T1 but loaded as an object of type T2 is to store the object as if it has type T1 but cast it to T2 during load. Note that the cast here is some sort of a "reinterpret_cast" (even in C). For instance, if you store an integer and load a float, you won't get your integer represented as a float; instead, you will get garbage. Admit that we cannot perform the cast and return an unknown value. Differential Revision: https://reviews.llvm.org/D55875 rdar://problem/45062567 llvm-svn: 349984
* [X86] FixupLEAs, reduce number of calls to getOperand and use ↵Craig Topper2018-12-221-22/+29
| | | | | | | | X86::AddrBaseReg/AddrIndexReg, etc. instead of hardcoded constants. Makes the code a little more readable. llvm-svn: 349983
* [NVPTX] Reduce stack size in NVPTXAsmPrinter::doInitialization().Justin Lebar2018-12-221-5/+2
| | | | | | | | NVPTXAsmPrinter::doInitialization() was creating an NVPTXSubtarget on the stack. This object is huge, about 80kb. Also it's slow to create. And it's all redundant; we have one in NVPTXTargetMachine anyway! llvm-svn: 349982
* [CUDA] Treat extern global variable shadows same as regular extern vars.Artem Belevich2018-12-222-16/+18
| | | | | | | | | | | This fixes compiler crash when we attempted to compile this code: extern __device__ int data; __device__ int data = 1; Differential Revision: https://reviews.llvm.org/D56033 llvm-svn: 349981
OpenPOWER on IntegriCloud