summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert "[X86] Make _xgetbv/_xsetbv on non-windows platforms"Benjamin Kramer2019-01-159-160/+16
| | | | | | This reverts commit r351160. Breaks building v8. llvm-svn: 351210
* Revert "Correct the source range returned from preprocessor callbacks."Benjamin Kramer2019-01-154-103/+46
| | | | | | | This reverts commit r350891. Also add a test case that would return an empty string with r350891. llvm-svn: 351209
* Revert "Update clang-tools-extra for r350891 from Clang."Benjamin Kramer2019-01-153-26/+36
| | | | | | This reverts commit r350892. llvm-svn: 351208
* [SelectionDAG] Check membership of register in class for singleNirav Dave2019-01-151-6/+1
| | | | | | | | | register constraints. NFCI. Now that X86's ST(7) constraints are fixed this check can be reinstated. llvm-svn: 351207
* [X86] Fix register class for assembly constraints to ST(7). NFCI.Nirav Dave2019-01-152-4/+13
| | | | | | | | Modify getRegForInlineAsmConstraint to return special singleton register class when a constraint references ST(7) not RFP80 for which ST(7) is not a member. llvm-svn: 351206
* [llvm-readelf] Allow single-letter flags to be merged.Jordan Rupprecht2019-01-154-17/+222
| | | | | | | | | | | | | | | | | | | Summary: This patch adds support for merged arguments (e.g. -SW == -S -W) for llvm-readelf. No changes are intended for llvm-readobj. There are a few short flags (-sd, -sr, -st, -dt) that would conflict with grouped single letter flags, and having only some grouped flags might be confusing. So, allow merged flags for readelf compatibility, but force separate args for llvm-readobj. From what I can tell, these two-letter flags are only used with llvm-readobj, not llvm-readelf. This fixes PR40064. Reviewers: jhenderson, kristina, echristo, phosek Reviewed By: jhenderson Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D56629 llvm-svn: 351205
* [llvm-objcopy] Use SHT_NOTE for added note sections.Jordan Rupprecht2019-01-153-9/+71
| | | | | | | | | | | | | | | | | | | Summary: Fix llvm-objcopy to add .note sections as SHT_NOTEs. GNU objcopy overrides section flags for special sections. For `.note` sections (with the exception of `.note.GNU-stack`), SHT_NOTE is used. Many other sections are special cased by libbfd, but `.note` is the only special section I can seem to find being used with objcopy --add-section. See `.note` in context of the full list of special sections here: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blob;f=bfd/elf.c;h=eb3e1828e9c651678b95a1dcbc3b124783d1d2be;hb=HEAD#l2675 Reviewers: jhenderson, alexshap, jakehehrlich, espindola Reviewed By: jhenderson Subscribers: emaste, arichardson, llvm-commits Differential Revision: https://reviews.llvm.org/D56570 llvm-svn: 351204
* [X86] Bailout of lowerVectorShuffleAsPermuteAndUnpack for shuffle-with-zero ↵Simon Pilgrim2019-01-153-23/+16
| | | | | | | | | | (PR40306) If we're shuffling with a zero vector, then we are better off not doing VECTOR_SHUFFLE(UNPCK()) as we lose track of those zero elements. We were already doing this for SSSE3 targets as we have PSHUFB, but its worth doing for all targets. llvm-svn: 351203
* gn build: Don't assume valgrind.h exists on LinuxHans Wennborg2019-01-151-6/+1
| | | | | | | | It didn't on my machine, so defaulting it to off seems better. Differential revision: https://reviews.llvm.org/D56727 llvm-svn: 351202
* [X86] Add PR40318 shuffle test caseSimon Pilgrim2019-01-151-0/+32
| | | | | | The other test case is already covered by the PR40306 test case, which was mainly concerned with SSSE3 codegen. llvm-svn: 351201
* Remove irrelevant references to legacy git repositories fromJames Y Knight2019-01-1590-132/+132
| | | | | | | | | compiler identification lines in test-cases. (Doing so only because it's then easier to search for references which are actually important and need fixing.) llvm-svn: 351200
* [SLP][X86] Split prefer-256-bit 'AVX256BW' tests from AVX2 checksSimon Pilgrim2019-01-154-28/+28
| | | | | | Fixes SLP test issue with D56636 llvm-svn: 351199
* [DAGCombiner] reduce buildvec of zexted extracted element to shuffleSanjay Patel2019-01-152-155/+236
| | | | | | | | | | | | | | | The motivating case for this is shown in the first regression test. We are transferring to scalar and back rather than just zero-extending with 'vpmovzxdq'. That's a special-case for a more general pattern as shown here. In all tests, we're avoiding the vector-scalar-vector moves in favor of vector ops. We aren't producing optimal shuffle code in some cases though, so the patch is limited to reduce regressions. Differential Revision: https://reviews.llvm.org/D56281 llvm-svn: 351198
* [OMPT] Second chunk of final OMPT 5.0 interface updatesJoachim Protze2019-01-1525-798/+1161
| | | | | | | | | | | | | | | | | | | | | The omp-tools.h file is generated from the OpenMP spec to ensure that the interface is implemented as specified. The other changes are necessary to update the interface implementation to the final version as published in 5.0. The omp-tools.h header was previously called ompt.h, currently a copy under this name is installed for legacy tools. Patch partially perpared by @sconvent Reviewers: AndreyChurbanov, hbae, Hahnfeld Reviewed By: hbae Tags: #openmp, #ompt Differential Revision: https://reviews.llvm.org/D55579 llvm-svn: 351197
* Reduce ASTMatchers stack footprint. Addresses http://llvm.org/PR38851Alexander Kornienko2019-01-151-1/+1
| | | | | | | | | | | The BoundNodesTreeBuilder class is used both directly and indirectly as a local variable in matchesAncestorOfRecursively, memoizedMatchesAncestorOfRecursively and other functions that happen to be on long recursive call paths. By reducing the inline storage size of the SmallVector we dramatically reduce the stack requirements of ASTMatchers. Running clang-tidy with a large number of checks enabled on a few arbitrarily chosen files show no performance regression. llvm-svn: 351196
* Revert r351138 "[ORC] Move ORC Core symbol map and set types into their ownLang Hames2019-01-155-411/+347
| | | | | | | | header: CoreTypes.h." This commit broke some bots. Reverting while I investigate. llvm-svn: 351195
* Update year in license filesHans Wennborg2019-01-1516-18/+18
| | | | | | | In last year's update (D48219) it was suggested that the release manager might want to do this, so here we go. llvm-svn: 351194
* [SimpleLoopUnswitch] Increment stats counter for unswitching switch instructionZaara Syeda2019-01-151-1/+4
| | | | | | | | | | | Increment statistics counter NumSwitches at unswitchNontrivialInvariants() for unswitching a non-trivial switch instruction. This is to fix a bug that it increments NumBranches even for the case of switch instruction. There is no functional change in this patch. Differential Revision: https://reviews.llvm.org/D56408 llvm-svn: 351193
* [llvm-obdump] - Fix the help lines for -stop-address and -z.George Rimar2019-01-151-4/+4
| | | | | | | It was broken by me by mistake in r350823 during addressing the review comment before committing (changed not the right text line). llvm-svn: 351192
* Revert little bad rebasing.David Carlier2019-01-151-1/+0
| | | | llvm-svn: 351191
* [Sanitizer] Intercept sl_add api on FreeBSD/NetBSDDavid Carlier2019-01-158-5/+92
| | | | | | | | | | Reviewers: krytarowski, vitalybuka Reviewed By: krytarowski Differential Revision: https://reviews.llvm.org/D56670 llvm-svn: 351189
* [OpenCL] opencl-c.h: read_image*(): sampler-less, and image{1,2}d_array_t ↵Roman Lebedev2019-01-151-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | variants are OpenCL-1.2+, mark them as such Summary: Refer to [[ https://www.khronos.org/registry/OpenCL/specs/opencl-1.1.pdf#page=242 | `6.11.13.2 Built-in Image Functions` ]], and [[ https://www.khronos.org/registry/OpenCL/specs/opencl-1.1.pdf#page=306 | `9.6.8 Image Read and Write Functions` ]] of the OpenCL 1.1 spec. * There is no mention of `image1d_array_t` and `image2d_array_t` anywhere in the OpenCL 1.1 spec. * All the `read_image{f,i,ui,h}()` functions, as of OpenCL 1.1 spec, have a second required parameter `sampler_t sampler` Should have prevented the following regression: https://redmine.darktable.org/issues/12493 Reviewers: yaxunl, Anastasia, echuraev, asavonic Reviewed By: Anastasia Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D56646 llvm-svn: 351188
* [InstCombine] Don't undo 0 - (X * Y) canonicalization when combining subs.Florian Hahn2019-01-152-17/+32
| | | | | | | | | Otherwise instcombine gets stuck in a cycle. The canonicalization was added in D55961. This patch fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=12400 llvm-svn: 351187
* [ELF][AArch64] Add missing PLT relocations to isStaticLinkTimeConstantPeter Smith2019-01-152-3/+43
| | | | | | | | | | | | | r347650 fixed pr38074 for AArch64 for static linking. It added two new RelExpr instances R_AARCH64_GOT_PAGE_PC_PLT and R_GOT_PLT. These need to be added to isStaticLinkTimeConstant so that the address of an ifunc can be taken when building a shared library. fixes pr40250 Differential Revision: https://reviews.llvm.org/D56666 llvm-svn: 351186
* [NFC] Remove some code duplicationMax Kazantsev2019-01-151-26/+9
| | | | llvm-svn: 351185
* [compiler-rt] alignment-assumption-blacklist.cpp test apparently passes on ↵Roman Lebedev2019-01-151-5/+0
| | | | | | android, un-XFAIL it. llvm-svn: 351184
* [NFC] Remove obsolete enum RangeCheckKindMax Kazantsev2019-01-153-61/+16
| | | | llvm-svn: 351183
* [NFC][X86] extract-bits.ll: add test with truncation with extra-use.Roman Lebedev2019-01-151-342/+487
| | | | | | That extra-use *should* prevent D56052 from looking past the trunc. llvm-svn: 351182
* [compiler-rt] fuzzer-alignment-assumption.test: fixup the expected column numberRoman Lebedev2019-01-151-1/+1
| | | | llvm-svn: 351181
* [NFC] Decrease if nestMax Kazantsev2019-01-151-18/+14
| | | | llvm-svn: 351180
* [NFC] Move some functions to LoopUtilsMax Kazantsev2019-01-153-42/+59
| | | | llvm-svn: 351179
* [compiler-rt][UBSan] Sanitization for alignment assumptions.Roman Lebedev2019-01-1520-0/+449
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This is the compiler-rt part. The clang part is D54589. This is a second commit, the original one was r351106, which was mass-reverted in r351159 because 2 compiler-rt tests were failing. Now, i have fundamentally changed the testing approach: i malloc a few bytes, intentionally mis-align the pointer (increment it by one), and check that. Also, i have decreased the expected alignment. This hopefully should be enough to pacify all the bots. If not, i guess i might just drop the two 'bad' tests. Reviewers: filcab, vsk, #sanitizers, vitalybuka, rsmith, morehouse Reviewed By: morehouse Subscribers: rjmccall, krytarowski, rsmith, kcc, srhines, kubamracek, dberris, llvm-commits Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D54590 llvm-svn: 351178
* [clang][UBSan] Sanitization for alignment assumptions.Roman Lebedev2019-01-1519-26/+607
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: UB isn't nice. It's cool and powerful, but not nice. Having a way to detect it is nice though. [[ https://wg21.link/p1007r3 | P1007R3: std::assume_aligned ]] / http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p1007r2.pdf says: ``` We propose to add this functionality via a library function instead of a core language attribute. ... If the pointer passed in is not aligned to at least N bytes, calling assume_aligned results in undefined behaviour. ``` This differential teaches clang to sanitize all the various variants of this assume-aligned attribute. Requires D54588 for LLVM IRBuilder changes. The compiler-rt part is D54590. This is a second commit, the original one was r351105, which was mass-reverted in r351159 because 2 compiler-rt tests were failing. Reviewers: ABataev, craig.topper, vsk, rsmith, rnk, #sanitizers, erichkeane, filcab, rjmccall Reviewed By: rjmccall Subscribers: chandlerc, ldionne, EricWF, mclow.lists, cfe-commits, bkramer Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D54589 llvm-svn: 351177
* [llvm][IRBuilder] Introspection for CreateAlignmentAssumption*() functionsRoman Lebedev2019-01-151-7/+19
| | | | | | | | | | | | | | | | | | | | | | | Summary: Clang calls these functions to produce IR for assume-aligned attributes. I would like to teach UBSAN to verify these assumptions. For that, i need to access the final pointer on which the check is performed, and the actual `icmp` that does the check. The alternative to this would be to fully re-implement this in clang. This is a second commit, the original one was r351104, which was mass-reverted in r351159 because 2 compiler-rt tests were failing. Reviewers: spatel, dneilson, craig.topper, dblaikie, hfinkel Reviewed By: hfinkel Subscribers: hfinkel, llvm-commits Differential Revision: https://reviews.llvm.org/D54588 llvm-svn: 351176
* NFC: Move Decl node handling to TextNodeDumperStephen Kelly2019-01-153-68/+79
| | | | | | | | | | Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D56643 llvm-svn: 351175
* [llvm-objcopy] [COFF] Implement --strip-all[-gnu] for symbolsMartin Storsjo2019-01-153-2/+68
| | | | | | Differential Revision: https://reviews.llvm.org/D56481 llvm-svn: 351174
* [llvm-objcopy] [COFF] Remove pointless comment chars from .test files. NFC.Martin Storsjo2019-01-152-30/+30
| | | | llvm-svn: 351173
* [ASTDump] NFC: Move dump of type nodes to NodeDumperStephen Kelly2019-01-153-89/+185
| | | | | | | | | | Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D56642 llvm-svn: 351172
* [llvm-objdump] - Cleanup the code. NFCI.George Rimar2019-01-154-313/+285
| | | | | | | | | | | | | | | | | This is a cosmetic cleanup for the llvm-objdump code. This patch: * Renames things to match the official LLVM code style (lower case -> upper case). * Removes few obviously excessive variables. * Moves a few lines closer to the place of use, reorders the code a bit to simplify it, to avoid doing excessive returns and to avoid using 'else` after returns. I focused only on a llvm-objdump.h/llvm-objdump.cpp files. Few changes in the MachODump.cpp and COFFDump.cpp are a result of llvm-objdump.h modification. Differential revision: https://reviews.llvm.org/D56637 llvm-svn: 351171
* [clangd] Fix updated file detection logic in indexingKadir Cetinkaya2019-01-153-33/+110
| | | | | | | | | | | | | | | | | Summary: Files without any symbols were never marked as updated during indexing, which resulted in failure while writing shards for these files. This patch fixes the logic to mark files that are seen for the first time but don't contain any symbols as updated. Reviewers: ilya-biryukov Reviewed By: ilya-biryukov Subscribers: ioeric, MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D56592 llvm-svn: 351170
* Explicitly set C++ standard for `Posix/no-fd.cc` ASan test.Dan Liew2019-01-151-1/+1
| | | | | | | | | | | | | | | | | Summary: The test uses `nullptr` which can break running the test if the compiler happens to be using something older than C++11 as the default language standard. Avoid this by explicitly setting the standard. rdar://problem/47253542 Reviewers: eugenis, yln, vitalybuka Subscribers: kubamracek, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D56667 llvm-svn: 351169
* gn build: Rename llvm_host_triple to llvm_current_triple and have it use ↵Peter Collingbourne2019-01-156-13/+29
| | | | | | | | | | | | | | | | | | current_{cpu,os}. This makes e.g. ToolChain::isCrossCompiling() in clang/lib/Driver/ToolChain.cpp return the correct result if the compiler was cross-compiled. This change also affects llvm_default_target_triple, so cross-compiled compilers default to targeting the cross-compilation target, which makes more sense than the host that the compiler was compiled on. This change will also be necessary in order for the correct triples to appear in generated lit files for non-native targets. Differential Revision: https://reviews.llvm.org/D56696 llvm-svn: 351168
* gn build: Make a couple of improvements to the unix toolchain.Peter Collingbourne2019-01-151-2/+12
| | | | | | | | | | Add an asm tool (will be required for building sanitizer_common on x64) and set a soname for DSOs so that anything that links against them gets the correct DT_NEEDED. Differential Revision: https://reviews.llvm.org/D56705 llvm-svn: 351167
* gn build: Switch to using current_os in lib/Support/BUILD.gn.Peter Collingbourne2019-01-151-1/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D56704 llvm-svn: 351166
* [X86] Upgrade some avx512bw shift intrinsics that were removed a while ago. NFCCraig Topper2019-01-154-50/+341
| | | | | | Masking was removed from these intrinsics and I guess we didn't update the tests then. llvm-svn: 351165
* [WebAssembly] Support multilibs for wasm32 and add a wasm OS that uses itDan Gohman2019-01-154-14/+82
| | | | | | | | | | | | This adds support for multilib paths for wasm32 targets, following [Debian's Multiarch conventions], and also adds an experimental OS name in order to test it. [Debian's Multiarch conventions]: https://wiki.debian.org/Multiarch/ Differential Revision: https://reviews.llvm.org/D56553 llvm-svn: 351164
* [WebAssembly] Support multilibs for wasm32 and add a wasm OS that uses itDan Gohman2019-01-153-1/+27
| | | | | | | | | | | | This adds support for multilib paths for wasm32 targets, following [Debian's Multiarch conventions], and also adds an experimental OS name in order to test it. [Debian's Multiarch conventions]: https://wiki.debian.org/Multiarch/ Differential Revision: https://reviews.llvm.org/D56553 llvm-svn: 351163
* [X86] Add test cases for D56695. NFCCraig Topper2019-01-154-2/+481
| | | | llvm-svn: 351162
* [X86] Switch the triple on avx2-intrinsics-x86.ll to be -unknown-unknown ↵Craig Topper2019-01-151-715/+715
| | | | | | | | | | instead of darwin so the constant pool entries will be filtered better by the script. Darwin uses LCPI instead of .LCPI so the filter doesn't work. This is silly, but it will help reduce some future some test diffs. llvm-svn: 351161
* [X86] Make _xgetbv/_xsetbv on non-windows platformsCraig Topper2019-01-159-16/+160
| | | | | | | | | | | | | | | | | | | | | | | Summary: This patch attempts to redo what was tried in r278783, but was reverted. These intrinsics should be available on non-windows platforms with "xsave" feature check. But on Windows platforms they shouldn't have feature check since that's how MSVC behaves. To accomplish this I've added a MS builtin with no feature check. And a normal gcc builtin with a feature check. When _MSC_VER is not defined _xgetbv/_xsetbv will be macros pointing to the gcc builtin name. I've moved the forward declarations from intrin.h to immintrin.h to match the MSDN documentation and used that as the header file for the MS builtin. I'm not super happy with this implementation, and I'm open to suggestions for better ways to do it. Reviewers: rnk, RKSimon, spatel Reviewed By: rnk Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D56686 llvm-svn: 351160
OpenPOWER on IntegriCloud