summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-01-15Simplify Value::GetValueByteSize()Adrian Prantl
2019-01-15[clang-cl] Alias /Zc:alignedNew[-] to -f[no-]aligned-allocationReid Kleckner
Implements PR40180. clang-cl has one minor behavior difference with cl with this change. Clang allows the user to enable the C++17 feature of aligned allocation without enabling all of C++17, but MSVC will not call the aligned allocation overloads unless -std:c++17 is passed. While our behavior is technically incompatible, it would require making driver mode specific changes to match MSVC precisely, and clang's behavior is useful because it allows people to experiment with new C++17 features individually. Therefore, I plan to leave it as is.
2019-01-15gn build: Move target flags from toolchain to a .gni file.Peter Collingbourne
While here, add a use_lld flag and default it to true when using clang on non-mac. Differential Revision: https://reviews.llvm.org/D56710
2019-01-15[SanitizerCoverage] Don't create comdat for interposable functions.Matt Morehouse
Summary: Comdat groups override weak symbol behavior, allowing the linker to keep the comdats for weak symbols in favor of comdats for strong symbols. Fixes the issue described in: https://bugs.chromium.org/p/chromium/issues/detail?id=918662 Reviewers: eugenis, pcc, rnk Reviewed By: pcc, rnk Subscribers: smeenai, rnk, bd1976llvm, hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D56516
2019-01-15gn build: Add build files for ↵linaro-local/ci/tcwg_kernel/llvm-master-aarch64-lts-defconfigPeter Collingbourne
compiler-rt/lib/{hwasan,interception,sanitizer_common,ubsan}. This allows the hwasan runtime to be built for Android aarch64. Differential Revision: https://reviews.llvm.org/D56628
2019-01-15Enable IAS for OpenBSD SPARC.Brad Smith
2019-01-15Simplify codeAdrian Prantl
2019-01-15Add Doxygen comments.Adrian Prantl
2019-01-15gn build: Merge r351216, r351228.Peter Collingbourne
2019-01-15CodeGen: Remove debug printf unintentionally added in r351228.Peter Collingbourne
2019-01-15[SLP] Added test for PR40310, NFC.Alexey Bataev
2019-01-15Implement BlockDecl::Capture dump in terms of visitorsStephen Kelly
Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D56709
2019-01-15llvm-objdump -m -D should disassemble all text segmentsMichael Trent
Summary: When running llvm-objdump with the -macho option objdump will by default disassemble only the __TEXT,__text section (or __TEXT_EXEC,__text when disassembling MH_KEXT_BUNDLE files). The -disassemble-all option is treated no diferently than -disassemble. This change upates llvm-objdump's MachO parsing code to disassemble all __text sections found in a file when -disassemble-all is specified. This is useful for disassembling files with more than one __text section, or when disassembling files whose __text section is not present in __TEXT. I added a lit test case that verifies "llvm-objdump -m -d" and "llvm-objdump -m -D" produce the expected results on a reference binary. I also updated the CommandGuide documentation for llvm-objdump.rst and verified it renders correctly as man and html. rdar://42899338 Reviewers: ab, pete, lhames Reviewed By: lhames Subscribers: rupprecht, llvm-commits Differential Revision: https://reviews.llvm.org/D56649
2019-01-15Replace auto -> llvm::Optional<uint64_t>Adrian Prantl
This addresses post-commit feedback for https://reviews.llvm.org/D56688
2019-01-15NFC: Implement OMPClause dump in terms of visitorsStephen Kelly
Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D56708
2019-01-15Implement CXXCtorInitializer dump in terms of VisitorStephen Kelly
Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D56707
2019-01-15[X86] Add versions of the avx512 gather intrinsics that take the mask as a ↵Craig Topper
vXi1 vector instead of a scalar In keeping with our general direction of having the vXi1 type present in IR, this patch converts the mask argument for avx512 gather to vXi1. This can avoid k-register to GPR to k-register transitions late in codegen. I left the existing intrinsics behind because they have many out of tree users such as ISPC. They generate their own code and don't go through the autoupgrade path which only works for bitcode and ll parsing. Ideally we will get them to migrate to target independent intrinsics, but it might be easier for them to migrate to these new intrinsics. I'll work on scatter and gatherpf/scatterpf next. Differential Revision: https://reviews.llvm.org/D56527
2019-01-15[MSP430] Recognize '{' as a line separatorAnton Korobeynikov
msp430-as supports multiple assembly statements on the same line separated by a '{' character.
2019-01-15[MSVC Compat] Fix typo correction for inclusion directives.Volodymyr Sapsai
In MSVC compatibility mode we were checking not the typo corrected filename but the original filename. Reviewers: christylee, compnerd Reviewed By: christylee Subscribers: jkorous, dexonsmith, sammccall, hokein, cfe-commits Differential Revision: https://reviews.llvm.org/D56631
2019-01-15[Nios2] Remove Nios2 backendCraig Topper
As mentioned here http://lists.llvm.org/pipermail/llvm-dev/2019-January/129121.html This backend is incomplete and has not been maintained in several months. Differential Revision: https://reviews.llvm.org/D56691
2019-01-15[Nios2] Remove Nios2 backendCraig Topper
As mentioned here http://lists.llvm.org/pipermail/llvm-dev/2019-January/129121.html This backend is incomplete and has not been maintained in several months. Differential Revision: https://reviews.llvm.org/D56690
2019-01-15[Tooling] Fix broken compliation databse tests.Haojian Wu
I forgot to update the unittest in r351222.
2019-01-15[MSP430] Provide a toolchain descriptionAnton Korobeynikov
This is an initial implementation for msp430 toolchain including -mmcu option support -mhwmult options support -integrated-as by default The toolchain uses msp430-elf-as as a linker and supports msp430-gcc toolchain tree. Patch by Kristina Bessonova! Differential Revision: https://reviews.llvm.org/D56658
2019-01-15[OpenMP] Fix for nested proc_bind affinity bugJonathan Peyton
Using proc_bind clause on a nested #pragma omp parallel region with KMP_AFFINITY set causes an assertion error. This assertion occurs because the place-partition-var is not properly initialized in the nested master threads. Trying to get an intuitive result with KMP_AFFINITY + proc_bind is difficult because of how the KMP_AFFINITY gtid-to-place mapping occurs. This patch creates an initial place list no matter what affinity mechanism is used. For KMP_AFFINITY, the place-partition-var is initialized to all the places. Differential Revision: https://reviews.llvm.org/D55795
2019-01-15Fix size_t/off_t mixup in std::filesystem.linaro-local/ci/tcwg_kernel/llvm-master-arm-mainline-allnoconfigDan Albert
Summary: ftruncate takes an off_t, not a size_t. Reviewers: EricWF, mclow.lists Reviewed By: EricWF Subscribers: christof, ldionne, libcxx-commits Differential Revision: https://reviews.llvm.org/D56578
2019-01-15Add large file support to create_file for 32-bit.Dan Albert
Summary: The tests need to create files larger than 2GB, but size_t is 32-bit on a 32-bit system. Make use of explicit off64_t APIs so we can still use a default off_t for the tests while enabling 64-bit file offsets for create_file. Reviewers: mclow.lists, EricWF Reviewed By: EricWF Subscribers: christof, ldionne, libcxx-commits Differential Revision: https://reviews.llvm.org/D56619
2019-01-15[OpenMP] Add lock function definitions to fix Bug 40042Jonathan Peyton
This change fixes the sanity issue reported in Bug 40042. Lock function definitions for the three lock kinds were added to disambiguate calls to the lock functions done directly and indirectly. Bugzilla: https://bugs.llvm.org/show_bug.cgi?id=40042 Patch by Hansang Bae Differential Revision: https://reviews.llvm.org/D56103
2019-01-15[OpenMP][Cmake] Allowed OpenMP testing detect test compiler with same generatorJonathan Peyton
Fix ninja build detect test compiler failed under windows. Patch by Peiyuan Song Differential Revision: https://reviews.llvm.org/D53479
2019-01-15[Tooling] Make clang-tool find libc++ dir on mac when running on a file ↵Haojian Wu
without compilation database. Summary: This is a regression of r348365. When clang-tools run on a file without a complation database (`clang-check /tmp/t.cc`), we will use fixed compilation database as a fallback. However the actual compiler path in the fallback complation command is just `clang-tool` which is insufficient to detect the libc++ dir. Reviewers: ilya-biryukov, EricWF Reviewed By: ilya-biryukov Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D56680
2019-01-15[OpenMP] Fix performance regression in SPEC kdtree testJonathan Peyton
Make __ompt_implicit_task_end a static function and remove the inline part. Remove pId variable that is unused. This fixes small regression in SPEC kdtree benchmark. Also reformat some of __ompt_implicit_task_end. Differential Revision: https://reviews.llvm.org/D55788
2019-01-15[libc++] Support different libc++ namespaces in the iterator testPetr Hosek
libc++ allows changing the namespace, don't assume __1 in the test to avoid the test failure if different namespace is being used. Differential Revision: https://reviews.llvm.org/D56698
2019-01-15Reapply "[CodeGen][X86] Expand USUBSAT to UMAX+SUB, also for vectors"Nikita Popov
Related to https://bugs.llvm.org/show_bug.cgi?id=40123. Rather than scalarizing, expand a vector USUBSAT into UMAX+SUB, which produces much better code for X86. Reapplying with updated SLPVectorizer tests. Differential Revision: https://reviews.llvm.org/D56636
2019-01-15Do not emit a corrupt symbol table entry for .rela_iplt_{start,end}.Rui Ueyama
If .rela.iplt does not exist, we used to emit a corrupt symbol table that contains two symbols, .rela_iplt_{start,end}, pointing to a nonexisting section. This patch fixes the issue by setting section index 0 to the symbols if .rel.iplt section does not exist. Differential Revision: https://reviews.llvm.org/D56623
2019-01-15[Solaris] Move enabling IAS for SPARC from the Solaris toolchain to Generic_GCC.Brad Smith
2019-01-15[WebAssembly] Fix updating/moving DBG_VALUEs in RegStackifyYury Delendik
Summary: As described in PR40209, there can be issues in DBG_VALUEs handling when multiple defs present in a BB. This patch adds logic for detection of related to def DBG_VALUEs and localizes register update and movement to found DBG_VALUEs. Reviewers: aheejin Subscribers: mgorny, dschuff, sbc100, jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D56401
2019-01-15Silence compiler warningsAdrian Prantl
2019-01-15Make CompilerType::getBitSize() / getByteSize() return an optional result. NFCAdrian Prantl
The code in LLDB assumes that CompilerType and friends use the size 0 as a sentinel value to signal an error. This works for C++, where no zero-sized type exists, but in many other programming languages (including I believe C) types of size zero are possible and even common. This is a particular pain point in swift-lldb, where extra code exists to double-check that a type is *really* of size zero and not an error at various locations. To remedy this situation, this patch starts by converting CompilerType::getBitSize() and getByteSize() to return an optional result. To avoid wasting space, I hand-rolled my own optional data type assuming that no type is larger than what fits into 63 bits. Follow-up patches would make similar changes to the ValueObject hierarchy. rdar://problem/47178964 Differential Revision: https://reviews.llvm.org/D56688
2019-01-15[WebAssembly] Update release notesDerek Schuff
Summary: Explicitly note that multithreading support is not included in the stable ABI. Differential Revision: https://reviews.llvm.org/D56681
2019-01-15Fix cpu-dispatch MV regression caused by r347812Erich Keane
r347812 permitted forward declarations for cpu-dispatch functions, which are occassionally useful as exposition in header files. However, this inadvertently permitted this function to become multiversioned after a usage. This patch ensures that the "CausesMV" checks are still run in the forward-declaration case. Change-Id: Icb6f975a2d068f088b89e3bbe26cf1d24f5a972c
2019-01-15We can improve the performance (generally) by memo-izing the action to map a ↵David Callahan
debug location to its function summary. Summary: Here are timings (as reported by "opt -time-passes") for sample-profile pass for some files holding hot functions from a major service©r. Average 17% reduction. Delta column is 100*(old-new)/old. ``` Old New Delta 0.0537 0.0538 -0.2% 0.8155 0.6522 20.0% 0.0779 0.0751 3.6% 0.0727 0.0913 -25.6% 0.1622 0.1302 19.7% 0.0627 0.0594 5.3% 0.0766 0.0744 2.9% 0.6426 0.4387 31.7% 0.3521 0.2776 21.2% 0.3549 0.2721 23.3% 0.0912 0.0904 0.9% 0.1236 0.1059 14.3% 0.0854 0.0866 -1.4% 0.0757 0.0722 4.6% 0.1293 0.1147 11.3% 0.1354 0.1122 17.1% 0.0767 0.0770 -0.4% 0.1135 0.0968 14.7% 0.0524 0.0608 -16.0% 0.1279 0.1106 13.5% ========== 3.6820 3.0520 17.1% Total ``` Reviewers: twoh, Kader, danielcdh, wmi Reviewed By: wmi Subscribers: dblaikie, llvm-commits Differential Revision: https://reviews.llvm.org/D56435
2019-01-15Revert "[X86] Make _xgetbv/_xsetbv on non-windows platforms"linaro-local/ci/tcwg_kernel/llvm-master-aarch64-next-defconfigBenjamin Kramer
This reverts commit r351160. Breaks building v8.
2019-01-15Revert "Correct the source range returned from preprocessor callbacks."Benjamin Kramer
This reverts commit r350891. Also add a test case that would return an empty string with r350891.
2019-01-15Revert "Update clang-tools-extra for r350891 from Clang."Benjamin Kramer
This reverts commit r350892.
2019-01-15[SelectionDAG] Check membership of register in class for singleNirav Dave
register constraints. NFCI. Now that X86's ST(7) constraints are fixed this check can be reinstated.
2019-01-15[X86] Fix register class for assembly constraints to ST(7). NFCI.Nirav Dave
Modify getRegForInlineAsmConstraint to return special singleton register class when a constraint references ST(7) not RFP80 for which ST(7) is not a member.
2019-01-15[llvm-readelf] Allow single-letter flags to be merged.Jordan Rupprecht
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
2019-01-15[llvm-objcopy] Use SHT_NOTE for added note sections.Jordan Rupprecht
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
2019-01-15[X86] Bailout of lowerVectorShuffleAsPermuteAndUnpack for shuffle-with-zero ↵Simon Pilgrim
(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.
2019-01-15gn build: Don't assume valgrind.h exists on LinuxHans Wennborg
It didn't on my machine, so defaulting it to off seems better. Differential revision: https://reviews.llvm.org/D56727
2019-01-15[X86] Add PR40318 shuffle test caselinaro-local/ci/tcwg_kernel/llvm-master-aarch64-stable-allmodconfigSimon Pilgrim
The other test case is already covered by the PR40306 test case, which was mainly concerned with SSSE3 codegen.