summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [SLP] limit vectorization of Constant subclasses (PR33958)Sanjay Patel2019-09-152-8/+14
| | | | | | | | | | | | | | This is a fix for: https://bugs.llvm.org/show_bug.cgi?id=33958 It seems universally true that we would not want to transform this kind of sequence on any target, but if that's not correct, then we could view this as a target-specific cost model problem. We could also white-list ConstantInt, ConstantFP, etc. rather than blacklist Global and ConstantExpr. Differential Revision: https://reviews.llvm.org/D67362 llvm-svn: 371931
* [ARM] Simplify and update vmla test. NFCDavid Green2019-09-152-39/+38
| | | | llvm-svn: 371930
* [CodeEmitter] Improve testing for APInt encodingJames Molloy2019-09-151-10/+7
| | | | | | | | I missed Artem's comment in D67487 before committing. Differential Revision: https://reviews.llvm.org/D67487 llvm-svn: 371929
* [CodeEmitter] Support instruction widths > 64 bitsJames Molloy2019-09-153-39/+223
| | | | | | | | | | | | | | | | | | | | | | | | | | Some VLIW instruction sets are Very Long Indeed. Using uint64_t constricts the Inst encoding to 64 bits (naturally). This change switches CodeEmitter to a mode that uses APInts when Inst's bitwidth is > 64 bits (NFC for existing targets). When Inst.BitWidth > 64 the prototype changes to: void TargetMCCodeEmitter::getBinaryCodeForInstr(const MCInst &MI, SmallVectorImpl<MCFixup> &Fixups, APInt &Inst, APInt &Scratch, const MCSubtargetInfo &STI); The Inst parameter returns the encoded instruction, the Scratch parameter is used internally for manipulating operands and is exposed so that the underlying storage can be reused between calls to getBinaryCodeForInstr. The goal is to elide any APInt constructions that we can. Similarly the operand encoding prototype changes to: getMachineOpValue(const MCInst &MI, const MCOperand &MO, APInt &op, SmallVectorImpl<MCFixup> &Fixups, const MCSubtargetInfo &STI); That is, the operand is passed by reference as APInt rather than returned as uint64_t. To reiterate, this APInt mode is enabled only when Inst.BitWidth > 64, so this change is NFC for existing targets. llvm-svn: 371928
* lld-link: Make Options.td formatting more self-consistent.Nico Weber2019-09-141-13/+19
| | | | | | | | Also tighten up help strings for /force, --start-lib, and --end-lib. Differential Revision: https://reviews.llvm.org/D67457 llvm-svn: 371927
* compiler-rt/builtins: Make check-builtins run tests on macOS.Nico Weber2019-09-142-4/+11
| | | | | | Differential Revision: https://reviews.llvm.org/D66984 llvm-svn: 371926
* Add debug check for null pointers passed to <string_view>Eric Fiselier2019-09-143-1/+49
| | | | llvm-svn: 371925
* [Diagnostics] Added silence note for -Wsizeof-array-div; suggest extra parensDavid Bolvansky2019-09-142-3/+22
| | | | llvm-svn: 371924
* [TargetLowering] SimplifyDemandedBits - add EXTRACT_SUBVECTOR support.Simon Pilgrim2019-09-142-11/+22
| | | | | | Call SimplifyDemandedBits on the source vector. llvm-svn: 371923
* [lldb] Code cleanup: FormattersContainer.h: Use range-based for loops.Jan Kratochvil2019-09-141-12/+9
| | | | | | | Suggested for an other loop by Pavel Labath in: https://reviews.llvm.org/D66654#inline-605808 llvm-svn: 371922
* [InstSimplify] simplifyUnsignedRangeCheck(): handle few tautological cases ↵Roman Lebedev2019-09-142-28/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | (PR43251) Summary: This is split off from D67356, since these cases produce a constant, no real need to keep them in instcombine. Alive proofs: https://rise4fun.com/Alive/u7Fk https://rise4fun.com/Alive/4lV https://bugs.llvm.org/show_bug.cgi?id=43251 Reviewers: spatel, nikic, xbolva00 Reviewed By: spatel Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67498 llvm-svn: 371921
* [clang-scan-deps] Add -M to work around -MT issue after r371918Fangrui Song2019-09-141-0/+1
| | | | | | | | | | | gcc will complain if -MT is used but neither -M nor -MM is specified: > cc1: error: to generate dependencies you must specify either -M or -MM r371918 changed our behavior to match GCC, but apparently clang-scan-deps is not happy. llvm-svn: 371920
* [Driver] Fix multiple bugs related to dependency file options: -M -MM -MD ↵Fangrui Song2019-09-143-36/+60
| | | | | | | | | | | -MMD -MT -MQ -M -o test.i => dependency file is test.d, not test.i -MM -o test.i => dependency file is test.d, not test.i -M -MMD => bogus warning -Wunused-command-line-argument -M MT dummy => -w not rendered llvm-svn: 371918
* [Driver] Improve Clang::getDependencyFileName and its tests after rC371853Fangrui Song2019-09-144-27/+18
| | | | | | | The test file name metadata-with-dots.c is confusing because -MD and -MMD have nothing to do with metadata. llvm-svn: 371917
* [ScheduleDAGMILive] Fix typo in comment.Mingjie Xing2019-09-141-1/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D67478 llvm-svn: 371916
* [Attributor][Fix] Use right type to replace expressionsJohannes Doerfert2019-09-142-3/+19
| | | | | | | | | | | | | | Summary: This should be obsolete once the functionality in D66967 is integrated. Reviewers: uenoku, sstefan1 Subscribers: hiraditya, bollu, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67231 llvm-svn: 371915
* [llvm-objcopy] Ignore -B --binary-architecture=Fangrui Song2019-09-148-72/+18
| | | | | | | | | | | | | | | | | | | | | | | GNU objcopy documents that -B is only useful with architecture-less input (i.e. "binary" or "ihex"). After D67144, -O defaults to -I, and -B is essentially a NOP. * If -O is binary/ihex, GNU objcopy ignores -B. * If -O is elf*, -B provides the e_machine field in GNU objcopy. So to convert a blob to an ELF, `-I binary -B i386:x86-64 -O elf64-x86-64` has to be specified. `-I binary -B i386:x86-64 -O elf64-x86-64` creates an ELF with its e_machine field set to EM_NONE in GNU objcopy, but a regular x86_64 ELF in elftoolchain elfcopy. Follow the elftoolchain approach (ignoring -B) to simplify code. Users that expect their command line portable should specify -B. Reviewed By: jhenderson Differential Revision: https://reviews.llvm.org/D67215 llvm-svn: 371914
* [llvm-objcopy] Default --output-target to --input-target when unspecifiedFangrui Song2019-09-146-51/+63
| | | | | | | | | | | | | | | | | | | | | Fixes PR42171. In GNU objcopy, if -O (--output-target) is not specified, the value is copied from -I (--input-target). ``` objcopy -I binary -B i386:x86-64 a.txt b # b is copied from a.txt llvm-objcopy -I binary -B i386:x86-64 a.txt b # b is an x86-64 object file ``` This patch changes our behavior to match GNU. With this change, we can delete code related to -B handling (D67215). Reviewed By: jakehehrlich Differential Revision: https://reviews.llvm.org/D67144 llvm-svn: 371913
* [llvm-ar] Uncapitalize error messages and delete full stopFangrui Song2019-09-1420-56/+55
| | | | | | | | | | | | Most GNU binutils don't append full stops in error messages. This convention has been adopted by a bunch of LLVM binary utilities. Make llvm-ar follow the convention as well. Reviewed By: grimar Differential Revision: https://reviews.llvm.org/D67558 llvm-svn: 371912
* [llvm-objcopy] Add support for response files in llvm-strip and llvm-objcopyMichael Pozulp2019-09-146-6/+66
| | | | | | | | | | | | | | | | Summary: Addresses https://bugs.llvm.org/show_bug.cgi?id=42671 Reviewers: jhenderson, espindola, alexshap, rupprecht Reviewed By: jhenderson Subscribers: seiya, emaste, arichardson, jakehehrlich, MaskRay, abrachet, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65372 llvm-svn: 371911
* Bugpoint: Remove some unnecessary c_str conversions on the journey to StringRefDavid Blaikie2019-09-141-8/+8
| | | | llvm-svn: 371910
* [Reproducer] Add reproducer dump command.Jonas Devlieghere2019-09-136-13/+280
| | | | | | | | | | | This adds a reproducer dump commands which makes it possible to inspect a reproducer from inside LLDB. Currently it supports the Files, Commands and Version providers. I'm planning to add support for the GDB Remote provider in a follow-up patch. Differential revision: https://reviews.llvm.org/D67474 llvm-svn: 371909
* [Reproducer] Move GDB Remote Packet into Utility. (NFC)Jonas Devlieghere2019-09-1317-246/+237
| | | | | | | | | | | | | | To support dumping the reproducer's GDB remote packets, we need the (de)serialization logic to live in Utility rather than the GDB remote plugin. This patch renames StreamGDBRemote to GDBRemote and moves the relevant packet code there. Its uses in the GDBRemoteCommunicationHistory and the GDBRemoteCommunicationReplayServer are updated as well. Differential revision: https://reviews.llvm.org/D67523 llvm-svn: 371907
* [WebAssembly] Narrowing and widening SIMD opsThomas Lively2019-09-137-0/+372
| | | | | | | | | | | | | | | | Summary: Implements target-specific LLVM intrinsics and clang builtins for these new SIMD operations, as described at https://github.com/WebAssembly/simd/blob/master/proposals/simd/SIMD.md#integer-to-integer-narrowing. Reviewers: aheejin Subscribers: dschuff, sbc100, jgravelle-google, hiraditya, sunfish, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D67425 llvm-svn: 371906
* [test] Update TestAPILog to pass on Windows.Jonas Devlieghere2019-09-131-2/+2
| | | | | | | The pretty function macro is including __cdecl on Windows, which was causing the pattern matching to fail. This should fix that. llvm-svn: 371905
* Make test check position independent as they sometimes come out reversed. NFCI.Douglas Yung2019-09-131-2/+2
| | | | llvm-svn: 371904
* [clang-scan-deps] Fix for headers having the same name as a directoryAlex Lorenz2019-09-135-0/+31
| | | | | | | | | | | | Scan deps tool crashes when called on a C++ file, containing an include that has the same name as a directory. The tool crashes since it finds foo/dir and tries to read that as a file and fails. Patch by: kousikk (Kousik Kumar) Differential Revision: https://reviews.llvm.org/D67091 llvm-svn: 371903
* [LLDB] Add missing breaks for switch statementTim Shen2019-09-131-0/+3
| | | | llvm-svn: 371902
* [GlobalISel] Fix insertion point of new instructions to be after PHIs.Amara Emerson2019-09-133-4/+53
| | | | | | | | | | For some reason we sometimes insert new instructions one instruction before the first non-PHI when legalizing. This can result in having non-PHI instructions before PHIs, which mean that PHI elimination doesn't catch them. Differential Revision: https://reviews.llvm.org/D67570 llvm-svn: 371901
* [NFC][libLTO] Rearrange declaration in lto.hSteven Wu2019-09-131-42/+42
| | | | | | | | | | | | | | | | | | Summary: Rearrange the function declaration in lto.h so they falls in the correct doxygen group. Reviewers: tejohnson, bd1976llvm, deadalnix Reviewed By: tejohnson Subscribers: mehdi_amini, inglorion, jkorous, dexonsmith, ributzka, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67565 llvm-svn: 371900
* [test] Print the log output on failure.Jonas Devlieghere2019-09-131-2/+2
| | | | | | | | This ensures that if the assertion fails we dump the log content. This should help me investigate what the output looks like on Windows, where the test is failing. llvm-svn: 371899
* Add dependency from Orc to PassesSanjoy Das2019-09-131-2/+2
| | | | | | | | | | | | | | Summary: Orc uses registerFunctionAnalyses that's defined in Passes. Reviewers: dblaikie Subscribers: mcrosier, bixia, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67477 llvm-svn: 371898
* Fix test to use %t for newly created files.Tim Shen2019-09-131-5/+5
| | | | | | | | This is both for consistency with other `mkdir`s in tests, and fixing permission issues with the non-temporary cwd during testing (they are not always writable). llvm-svn: 371897
* [llvm-opt-report] Improve error handlingFrancis Visoiu Mistrih2019-09-131-3/+5
| | | | | | | | * std::move the error extracted from the parsing creation to avoid asserts * print a newline after the error message * create the parser from the metadata llvm-svn: 371895
* Fix C++03 build failures due to >>Eric Fiselier2019-09-131-1/+1
| | | | llvm-svn: 371894
* [AArch64][GlobalISel] Tail call memory intrinsicsJessica Paquette2019-09-135-13/+131
| | | | | | | | | | | | | | | | | | | | | | Because memory intrinsics are handled differently than other calls, we need to check them for tail call eligiblity in the legalizer. This allows us to still inline them when it's beneficial to do so, but also tail call when possible. This adds simple tail calling support for when the intrinsic is followed by a return. It ports the attribute checks from `TargetLowering::isInTailCallPosition` into a similarly-named function in LegalizerHelper.cpp. The target-specific `isUsedByReturnOnly` hook is not ported here. Update tailcall-mem-intrinsics.ll to show that GlobalISel can now tail call memory intrinsics. Update legalize-memcpy-et-al.mir to have a case where we don't tail call. Differential Revision: https://reviews.llvm.org/D67566 llvm-svn: 371893
* [OPENMP5.0]Add basic support for declare variant directive.Alexey Bataev2019-09-1313-91/+804
| | | | | | | Added basic support for declare variant directive and its match clause with user context selector. llvm-svn: 371892
* [Support] Add overload writeFileAtomically(std::function Writer)Jan Korous2019-09-137-130/+145
| | | | | | Differential Revision: https://reviews.llvm.org/D67424 llvm-svn: 371890
* [Docs] Bug fix for reference to nonexistent documentDeForest Richards2019-09-131-3/+5
| | | | | | This commit fixes a bug in which the toctree contained a reference to a non-existent document. llvm-svn: 371889
* [FPEnv] Document that constrained FP intrinsics cannot be mixed with ↵Kevin P. Neal2019-09-131-7/+16
| | | | | | | | | | non-constrained Reviewed by: andrew.w.kaylor, cameron.mcinally, uweigand Approved by: andrew.w.kaylor Differential Revision: https://reviews.llvm.org/D67360 llvm-svn: 371888
* [aarch64] move custom isel of extract_vector_elt to td file - NFCSebastian Pop2019-09-132-43/+10
| | | | | | | | | | | | | | | | | | | In preparation for def-pat selection of dot product instructions, this patch moves the custom instruction selection of extract_vector_elt to the td file. Without this change it is impossible to catch a pattern that starts with an extract_vector_elt: the custom cpp code is executed first ahead of the patterns in the td files that are only executed at the end of the switch statement in SelectCode(Node). With this patch applied, it becomes possible to select a different pattern that starts with extract_vector_elt by selecting a higher complexity than this pattern. The patch has been tested on aarch64-linux with make check-all. Differential Revision: https://reviews.llvm.org/D67497 llvm-svn: 371887
* Mark [[nodiscard]] test as unsupported with GCC 5Eric Fiselier2019-09-131-0/+1
| | | | llvm-svn: 371886
* [Reproducer] Include the this pointer in the API log.Jonas Devlieghere2019-09-132-10/+58
| | | | | | | | | | | | | | | The new centralized way of doing API logging through the reproducer macros is lacking a way to easily correlate instances of API objects. Logging the this pointer makes that significantly easier. For methods this is now always passed as the first argument, similar to the self argument in Python. This patch also adds a test case for API logging, which uncovered that we were not quoting strings. Differential revision: https://reviews.llvm.org/D67538 llvm-svn: 371885
* Fix pretty printer test with GCCEric Fiselier2019-09-131-3/+14
| | | | llvm-svn: 371884
* AArch64: fix EXPENSIVE_CHECKS for arm64_32.Tim Northover2019-09-131-1/+1
| | | | | | | For some reason I'd decided to mark the end-result of a GOT load as dead. It's clearly not (necessarily). llvm-svn: 371883
* Fix error in ProcessLauncherWindows.cppAdrian McCarthy2019-09-131-1/+1
| | | | | | Restored missing parens on a function call. llvm-svn: 371882
* Update XFAIL list for new GCC versionsEric Fiselier2019-09-131-1/+1
| | | | llvm-svn: 371881
* Fix various test failures with GCCEric Fiselier2019-09-133-5/+9
| | | | llvm-svn: 371880
* [SLP] add test for vectorization of constant expressions; NFCSanjay Patel2019-09-131-0/+13
| | | | | | Goes with D67362. llvm-svn: 371879
* Reland r371785: Add -Wpoison-system-directories warningManoj Gupta2019-09-138-0/+41
| | | | | | | | | | | | | | | | | | | | When using clang as a cross-compiler, we should not use system headers to do the compilation. This CL adds support of a new warning flag -Wpoison-system-directories which emits warnings if --sysroot is set and headers from common host system location are used. By default the warning is disabled. The intention of the warning is to catch bad includes which are usually generated by third party build system not targeting cross-compilation. Such cases happen in Chrome OS when someone imports a new package or upgrade one to a newer version from upstream. This is reland of r371785 with a fix to test file. Patch by: denik (Denis Nikitin) llvm-svn: 371878
OpenPOWER on IntegriCloud