summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [clangd] Delete stray semicolon. NFCFangrui Song2018-12-241-1/+0
| | | | llvm-svn: 350040
* [X86] Autogenerate complete checks. NFCCraig Topper2018-12-241-21/+187
| | | | llvm-svn: 350039
* [X86] Remove the ANDN check from EmitTest.Craig Topper2018-12-243-46/+67
| | | | | | | | Remove the TESTmr isel patterns and add another postprocessing combine for TESTrr+ANDrm->TESTmr. We already have a postprocessing combine for TESTrr+ANDrr->TESTrr. With this we can give ANDN a chance to match first. And clean it up during post processing if we ended up with just a regular AND. This is another step towards my plan to gut EmitTest and do more flag handling during isel matching or by using optimizeCompare. llvm-svn: 350038
* [clangd] Delete trailing ; NFCFangrui Song2018-12-231-1/+1
| | | | llvm-svn: 350037
* Tolerate flaky LLD tests on NetBSDKamil Rytarowski2018-12-231-0/+5
| | | | | | | | | | | | | | | | | | | | | Summary: For unknown reasons LLD tests are flaky on the NetBSD buildbot, but not on local machines of developers. Unless the linker will be fully functional on this target, allow to pass flaky tests with optional retry. Reviewers: joerg, mgorny, ruiu Reviewed By: mgorny Subscribers: lebedev.ri, MaskRay, llvm-commits, #lld Tags: #lld Differential Revision: https://reviews.llvm.org/D56053 llvm-svn: 350036
* [llvm-exegesis] Clustering: don't enqueue a point multiple timesFangrui Song2018-12-231-33/+35
| | | | | | | | | | | | | | | Summary: SetVector uses both DenseSet and vector, which is time/memory inefficient. The points are represented as natural numbers so we can replace the DenseSet part by indexing into a vector<char> instead. Don't cargo cult the pseudocode on the wikipedia DBSCAN page. This is a standard BFS style algorithm (the similar loops have been used several times in other LLVM components): every point is processed at most once, thus the queue has at most NumPoints elements. We represent it with a vector and allocate it outside of the loop to avoid allocation in the loop body. We check `Processed[P]` to avoid enqueueing a point more than once, which also nicely saves us a `ClusterIdForPoint_[Q].isUndef()` check. Many people hate the oneshot abstraction but some favor it, therefore we make a compromise, use a lambda to abstract away the neighbor adding process. Delete the comment `assert(Neighbors.capacity() == (Points_.size() - 1));` as it is wrong. llvm-svn: 350035
* [DAGCombiner] limit shuffle to extend transform (PR40146)Sanjay Patel2018-12-232-80/+13
| | | | | | | | | | It's dangerous to knowingly create an illegal vector type no matter what stage of combining we're in. This prevents the missed folding/scalarization seen in: https://bugs.llvm.org/show_bug.cgi?id=40146 llvm-svn: 350034
* [x86] add test for vector shuffle --> extend transform (PR40146); NFCSanjay Patel2018-12-231-0/+91
| | | | llvm-svn: 350033
* [DAGCombiner] allow hoisting vector bitwise logic ahead of extendsSanjay Patel2018-12-232-85/+48
| | | | llvm-svn: 350032
* [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
OpenPOWER on IntegriCloud