summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Workaround bug in GCC trunk.Eric Fiselier2018-07-221-4/+4
| | | | | | | | | | For some reason GCC ToT is failing to deduce the auto type for a static data member from its initializer in some cases. Though I'm sure the bug will be short lived, there is a trivial workaround for it. So we might as well get the bot passing again. llvm-svn: 337661
* OpenBSD/arm has switched to float ABI SoftFP.Brad Smith2018-07-222-2/+2
| | | | llvm-svn: 337660
* Harden copy_file even more.Eric Fiselier2018-07-221-5/+7
| | | | | | | | | | | This patch removes the O_CREAT open flag when we first attempt to open the destination file but we expect it to already exist. This theoretically avoids the possibility that it was removed between when we first stat'ed it, and when we attempt to open it. llvm-svn: 337659
* fix test failures with older clang versionsEric Fiselier2018-07-225-4/+36
| | | | llvm-svn: 337658
* Test commit, fix a minor typo.Jiading Gai2018-07-221-1/+1
| | | | llvm-svn: 337657
* [X86] Remove the max vector width restriction from combineLoopMAddPattern ↵Craig Topper2018-07-223-336/+187
| | | | | | | | and rely splitOpsAndApply to handle splitting. This seems to be a net improvement. There's still an issue under avx512f where we have a 512-bit vpaddd, but not vpmaddwd so we end up doing two 256-bit vpmaddwds and inserting the results before a 512-bit vpaddd. It might be better to do two 512-bits paddds with zeros in the upper half. Same number of instructions, but breaks a dependency. llvm-svn: 337656
* [clangd] Unbreak fuzzer build.Benjamin Kramer2018-07-221-1/+2
| | | | llvm-svn: 337655
* [ORE] Move loop invariant ORE checks outside the PM loop.Xin Tong2018-07-224-20/+41
| | | | | | | | | | | | | | Summary: This takes 22ms out of ~20s compiling sqlite3.c because we call it for every unit of compilation and every pass. Reviewers: paquette, anemet Subscribers: mehdi_amini, llvm-commits Differential Revision: https://reviews.llvm.org/D49586 llvm-svn: 337654
* PR38257: don't perform ADL when instantiating a unary & operator that turns outRichard Smith2018-07-224-4/+52
| | | | | | to be forming a pointer-to-member. llvm-svn: 337653
* [SelectionDAGBuilder] Use APInt::isZero instead of comparing ↵Craig Topper2018-07-221-1/+1
| | | | | | | | APInt::getZExtValue to 0 in a place where we can't be sure contents of the APInt fit in a uint64_t. This is used on an extract vector element index which is most cases is going to be an i32 or i64 and the element will be a valid element number. But it is possible to construct IR with a larger type and large out of range value. llvm-svn: 337652
* [SelectionDAGBuilder] Restrict vector reduction check to types with a power ↵Craig Topper2018-07-221-0/+4
| | | | | | | | of 2 number of elements. The check for the shuffles usages probably isn't correct for non power of 2 vectors. llvm-svn: 337651
* [X86] Add more MADD recurrence test cases with larger and narrower vector ↵Craig Topper2018-07-221-259/+1173
| | | | | | widths. llvm-svn: 337650
* Implement a better copy_file.Eric Fiselier2018-07-226-324/+666
| | | | | | | | | | | | | | | | | | | | This patch improves both the performance, and the safety of the copy_file implementation. The performance improvements are achieved by using sendfile on Linux and copyfile on OS X when available. The TOCTOU hardening is achieved by opening the source and destination files and then using fstat to check their attributes to see if we can copy them. Unfortunately for the destination file, there is no way to open it without accidentally creating it, so we first have to use stat to determine if it exists, and if we should copy to it. Then, once we're sure we should try to copy, we open the dest file and ensure it names the same entity we previously stat'ed. llvm-svn: 337649
* [llvm-mca][docs] Add documentation for the statistic outputs from mca. NFCMatt Davis2018-07-211-3/+125
| | | | | | | | | | | | | | Summary: The original text was lifted from the MCA README. I re-ran the dot-product example and updated the output seen in the docs. I also added a few paragraphs discussing the instruction issued and retired histograms, as well as discussing the register file stats. Reviewers: andreadb, RKSimon, courbet, gbedwell, filcab Reviewed By: andreadb Subscribers: tschuett Differential Revision: https://reviews.llvm.org/D49614 llvm-svn: 337648
* [mips] Factor out register class selection for global base register. NFCSimon Atanasyan2018-07-211-18/+20
| | | | | | | Factor out register class selection for global base register into a separate function to escape long chain of ternary operators. llvm-svn: 337647
* [mips] Move out the WrapperPat declaration from the NotInMicroMips predicateSimon Atanasyan2018-07-213-5/+92
| | | | | | | | | | | | | | | This is a follow-up to the rL335185. Those commit adds some WrapperPat patterns for microMIPS target. But declaration of the WrapperPat class is under the NotInMicroMips predicate and microMIPS patterns cannot be selected because predicate (Subtarget->inMicroMipsMode()) && (!Subtarget->inMicroMipsMode()) is always false. This change move out the WrapperPat class declaration from the NotInMicroMips predicate and enables microMIPS WrapperPat patterns. Differential revision: https://reviews.llvm.org/D49533 llvm-svn: 337646
* [llvm-undname] Flush output before demangling.Zachary Turner2018-07-211-1/+4
| | | | | | | | | If an error occurs and we write it to stderr, it could appear before we wrote the mangled name which we're undecorating. By flushing stdout first, we ensure that the messages are always sequenced in the correct order. llvm-svn: 337645
* Fix the MSVC Visualizers for SmallVector classes.Zachary Turner2018-07-211-21/+21
| | | | | | | Recent changes to the internal structure of SmallVector<> broke all of the MSVC visualizers. This fixes them. llvm-svn: 337644
* Early exit with cheaper checksAditya Kumar2018-07-211-13/+12
| | | | | | | Reviewers: sebpop,davide,fhahn,trentxintong Differential Revision: https://reviews.llvm.org/D49617 llvm-svn: 337643
* [InstrSimplify] fold sdiv if two operands are negated and non-overflowChen Zheng2018-07-214-34/+28
| | | | | | Differential Revision: https://reviews.llvm.org/D49382 llvm-svn: 337642
* [DebugInfo] Add a new DI flag to record if a C++ record is a trivial typeAaron Smith2018-07-212-1/+5
| | | | | | | | | | | | | | | | | | | | | | Summary: This flag is used when emitting debug info and is needed to initialize subprogram and member function attributes (function options) for Codeview. These function options are used to create an accurate compiler type for UDT symbols (class/struct/union) from PDBs. It is not easy to determine if a C++ record is trivial or not based on the current DICompositeType flags and other accessible debug information from Codeview. For example, without this flag the metadata for a non-trivial C++ record with user-defined ctor and a trivial one with a defaulted ctor are the same. struct S { S(); } struct S { S() = default; } This change introduces a new DI flag and corresponding clang::CXXRecordDecl::isTrivial method to set the flag in the frontend. Reviewers: rnk, zturner, llvm-commits, dblaikie, aleksandr.urakov, deadalnix Reviewed By: rnk Subscribers: asmith, probinson, aprantl, JDevlieghere Differential Revision: https://reviews.llvm.org/D45122 llvm-svn: 337641
* ELF: Read address significance tables with --icf=all.Peter Collingbourne2018-07-213-45/+92
| | | | | | | | | | | | | | | | Under --icf=all we now only apply KeepUnique to non-executable address-significant sections. This has the effect of making --icf=all mean unsafe ICF for executable sections and safe ICF for non-executable sections. With this change the meaning of the KeepUnique bit changes to "does the current ICF mode (together with the --keep-unique and --ignore-data-address-equality flags) require this section to be kept unique". Differential Revision: https://reviews.llvm.org/D49626 llvm-svn: 337640
* [HIP] Support -fcuda-flush-denormals-to-zero for amdgcnYaxun Liu2018-07-215-7/+20
| | | | | | Differential Revision: https://reviews.llvm.org/D48287 llvm-svn: 337639
* ELF: Make sections with KeepUnique bit eligible for ICF.Peter Collingbourne2018-07-212-5/+27
| | | | | | | | | | The only restriction is that we cannot merge more than one KeepUnique section together. This matches gold's behaviour and reduces code size when using --icf=safe. Differential Revision: https://reviews.llvm.org/D49622 llvm-svn: 337638
* [ORC] Re-apply r336760 with fixes.Lang Hames2018-07-215-12/+91
| | | | llvm-svn: 337637
* [NFC] CodeGen: rename memset to bzeroJF Bastien2018-07-201-30/+27
| | | | | | The optimization looks for opportunities to emit bzero, not memset. Rename the functions accordingly (and clang-format the diff) because I want to add a fallback optimization which actually tries to generate memset. bzero is still better and it would confuse the code to merge both. llvm-svn: 337636
* [Driver] Sanitizer support based on runtime library presenceGeorge Karpenkov2018-07-2022-42/+106
| | | | | | | | | | | | | | | The runtime libraries of sanitizers are built in compiler-rt, and Clang can be built without compiler-rt, or compiler-rt can be configured to only build certain sanitizers. The driver should provide reasonable diagnostics and not a link-time error when a runtime library is missing. This patch changes the driver for OS X to only support sanitizers of which we can find the runtime libraries. The discussion for this patch explains the rationale Differential Revision: https://reviews.llvm.org/D15225 llvm-svn: 337635
* Omit path to lld binary from lld's error, warning, and log output.Nico Weber2018-07-204-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | lld currently prepends the absolute path to itself to every diagnostic it emits. This path can be longer than the diagnostic, and makes the actual error message hard to read. There isn't a good reason for printing this path: if you want to know which lld you're running, pass -v to clang – chances are that if you're unsure of this, you're not only unsure when it errors out. Some people want an indication that the diagnostic is from the linker though, so instead print just the basename of the linker's path. Before: ``` $ out/bin/clang -target x86_64-unknown-linux -x c++ /dev/null -fuse-ld=lld /Users/thakis/src/llvm-mono/out/bin/ld.lld: error: cannot open crt1.o: No such file or directory /Users/thakis/src/llvm-mono/out/bin/ld.lld: error: cannot open crti.o: No such file or directory /Users/thakis/src/llvm-mono/out/bin/ld.lld: error: cannot open crtbegin.o: No such file or directory /Users/thakis/src/llvm-mono/out/bin/ld.lld: error: unable to find library -lgcc /Users/thakis/src/llvm-mono/out/bin/ld.lld: error: unable to find library -lgcc_s /Users/thakis/src/llvm-mono/out/bin/ld.lld: error: unable to find library -lc /Users/thakis/src/llvm-mono/out/bin/ld.lld: error: unable to find library -lgcc /Users/thakis/src/llvm-mono/out/bin/ld.lld: error: unable to find library -lgcc_s /Users/thakis/src/llvm-mono/out/bin/ld.lld: error: cannot open crtend.o: No such file or directory /Users/thakis/src/llvm-mono/out/bin/ld.lld: error: cannot open crtn.o: No such file or directory clang: error: linker command failed with exit code 1 (use -v to see invocation) ``` After: ``` $ out/bin/clang -target x86_64-unknown-linux -x c++ /dev/null -fuse-ld=lld ld.lld: error: cannot open crt1.o: No such file or directory ld.lld: error: cannot open crti.o: No such file or directory ld.lld: error: cannot open crtbegin.o: No such file or directory ld.lld: error: unable to find library -lgcc ld.lld: error: unable to find library -lgcc_s ld.lld: error: unable to find library -lc ld.lld: error: unable to find library -lgcc ld.lld: error: unable to find library -lgcc_s ld.lld: error: cannot open crtend.o: No such file or directory ld.lld: error: cannot open crtn.o: No such file or directory clang: error: linker command failed with exit code 1 (use -v to see invocation) ``` https://reviews.llvm.org/D49189 llvm-svn: 337634
* Simplify; no behavior change.Nico Weber2018-07-201-4/+2
| | | | | | Reviewed as part of https://reviews.llvm.org/D49189 llvm-svn: 337633
* [clang-doc] Create a script to generate testsJulie Hockett2018-07-2024-1389/+1834
| | | | | | | | | Upstreaming the script I use to generate clang-doc tests (and updating the existing tests to use it) Differential Revision: https://reviews.llvm.org/D49268 llvm-svn: 337632
* [HIP] Register/unregister device fat binary only onceYaxun Liu2018-07-202-21/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | HIP generates one fat binary for all devices after linking. However, for each compilation unit a ctor function is emitted which register the same fat binary. Measures need to be taken to make sure the fat binary is only registered once. Currently each ctor function calls __hipRegisterFatBinary and stores the returned value to __hip_gpubin_handle. This patch changes the linkage of __hip_gpubin_handle to be linkonce so that they are shared between LLVM modules. Then this patch adds check of value of __hip_gpubin_handle to make sure __hipRegisterFatBinary is only called once. The code is equivalent to void *_gpubin_handle; void ctor() { if (__hip_gpubin_handle == 0) { __hip_gpubin_handle = __hipRegisterFatBinary(...); } // register kernels and variables. } The patch also does similar change to dtors so that __hipUnregisterFatBinary is called once. Differential Revision: https://reviews.llvm.org/D49083 llvm-svn: 337631
* [CMake] Install C++ ABI headers into the right locationPetr Hosek2018-07-201-10/+2
| | | | | | | | | | | This is a follow-up to r335809 and r337118. While libc++ headers are now installed into the right location in both standard as well as multiarch runtimes layout, turned out C++ ABI headers are still installed into the old location in the latter case. This change addresses that. Differential Revision: https://reviews.llvm.org/D49584 llvm-svn: 337630
* Disable clang crash-report-modules.m test on Windows againReid Kleckner2018-07-201-0/+4
| | | | | | | | | | | It still appears to be failing: http://lab.llvm.org:8011/builders/clang-x86-windows-msvc2015/builds/12825 $ "rm" "-rf" "C:\b\slave\clang-x86-windows-msvc2015\clang-x86-windows-msvc2015\stage1\tools\clang\test\Driver\Output/crmdir" Error: 'rm' command failed, [Error 3] The system cannot find the path specified: 'C:\\b\\slave\\clang-x86-windows-msvc2015\\clang-x86-windows-msvc2015\\stage1\\tools\\clang\\test\\Driver\\Output/crmdir\\crash-report-modules-300567.cache\\vfs\\b\\slave\\clang-x86-windows-msvc2015\\clang-x86-windows-msvc2015\\llvm\\tools\\clang\\test\\Driver\\Inputs\\module\\module.modulemap' error: command failed with exit status: 1 llvm-svn: 337629
* [PDB] Write the command line after response file expansionReid Kleckner2018-07-203-11/+16
| | | | | | | | | | | | Summary: Fixes PR38085 Reviewers: ruiu, zturner Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D49566 llvm-svn: 337628
* Fold dangling-field warning into general initialization lifetime checks.Richard Smith2018-07-205-152/+191
| | | | llvm-svn: 337627
* Re-apply r337595 with fix for LLVM_ENABLE_THREADS=Off.Lang Hames2018-07-209-512/+749
| | | | llvm-svn: 337626
* [ADT] Only run death tests in !NDEBUGBenjamin Kramer2018-07-201-5/+7
| | | | | | These invoke undefined behavior. llvm-svn: 337625
* [Hexagon] Disable packets in test to avoid ordering issues in checksKrzysztof Parzyszek2018-07-201-2/+2
| | | | llvm-svn: 337624
* Change the cap on the amount of padding for each vtable to 32-byte ↵Peter Collingbourne2018-07-202-7/+9
| | | | | | | | | | | | | (previously it was 128-byte) We tested different cap values with a recent commit of Chromium. Our results show that the 32-byte cap yields the smallest binary and all the caps yield similar performance. Based on the results, we propose to change the cap value to 32-byte. Patch by Zhaomo Yang! Differential Revision: https://reviews.llvm.org/D49405 llvm-svn: 337622
* AMDGPU: Use existing function to check for VGPRsMatt Arsenault2018-07-201-16/+7
| | | | llvm-svn: 337621
* fix typoNico Weber2018-07-201-1/+1
| | | | llvm-svn: 337620
* [ms] Add __shiftleft128 / __shiftright128 intrinsicsNico Weber2018-07-202-0/+16
| | | | | | | | | | | | Carefully match the pattern matched by ISel so that this produces shld / shrd (unless Subtarget->isSHLDSlow() is true). Thanks to Craig Topper for providing the LLVM IR pattern that gets successfully matched. Fixes PR37755. llvm-svn: 337619
* Revert "[X86][AVX] Convert X86ISD::VBROADCAST demanded elts combine to use ↵Benjamin Kramer2018-07-202-48/+17
| | | | | | | | SimplifyDemandedVectorElts" This reverts commit r337547. It triggers an infinite loop. llvm-svn: 337617
* [codeview] Don't emit variable templates as class membersReid Kleckner2018-07-202-5/+45
| | | | | | | | | | | | | MSVC doesn't, so neither should we. Fixes PR38004, which is a crash that happens when we try to emit debug info for a still-dependent partial variable template specialization. As a follow-up, we should review what we're doing for function and class member templates. It looks like we don't filter those out, but I can't seem to get clang to emit any. llvm-svn: 337616
* [llvm-undname] Remove a superfluous semicolon. NFC.Martin Storsjo2018-07-201-2/+2
| | | | llvm-svn: 337615
* [COFF] Use symbolic constants instead of hardcoded numbers. NFCI.Martin Storsjo2018-07-201-1/+6
| | | | | | Patch by Martell Malone. llvm-svn: 337614
* [COFF] Adjust how we flag weak externalsMartin Storsjo2018-07-206-11/+71
| | | | | | | | | | This fixes PR36096. Originally based on a patch by Martell Malone. Differential Revision: https://reviews.llvm.org/D44357 llvm-svn: 337613
* AMDGPU: Switch default dwarf version to 2Konstantin Zhuravlyov2018-07-202-2/+2
| | | | | | | | | There were some problems unearthed with version 5, which I am going to look at. Differential Revision: https://reviews.llvm.org/D49613 llvm-svn: 337612
* [CStringSyntaxChecker] Fix build bot builds != x86 archsDavid Carlier2018-07-202-8/+13
| | | | | | | | | | Reviewers: NoQ,george.karpenkov Reviewed By: NoQ Differential Revision: https://reviews.llvm.org/D49588 llvm-svn: 337611
* [ELF] Check eh_frame_hdr overflow with PC offsets instead of PC absolute ↵Fangrui Song2018-07-205-49/+81
| | | | | | | | | | | | addresses Reviewers: grimar, ruiu, espindola Subscribers: emaste, arichardson, llvm-commits Differential Revision: https://reviews.llvm.org/D49607 llvm-svn: 337610
OpenPOWER on IntegriCloud