summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [ELF] Fix ARM and Thumb V7PILongThunk overflow behavior.Peter Smith2019-01-103-4/+84
| | | | | | | | | | | | | | | | | | When the range between the source and target of a V7PILongThunk exceeded an int32 we would trigger a relocation out of range error for the R_ARM_MOVT_PREL or R_ARM_THM_MOVT_PREL relocation. This case can happen when linking the linux kernel as it is loaded above 0xf0000000. There are two parts to the fix. - Remove the overflow check for R_ARM_MOVT_PREL or R_ARM_THM_MOVT_PREL. The ELF for the ARM Architecture document defines these relocations as having no overflow checking so the check was spurious. - Use int64_t for the offset calculation, in line with similar thunks so that PC + (S - P) < 32-bits. This results in less surprising disassembly. Differential Revision: https://reviews.llvm.org/D56396 llvm-svn: 350836
* [opaque pointer types] Remove some calls to generic Type subtype accessors.James Y Knight2019-01-1014-64/+49
| | | | | | | | | | | | That is, remove many of the calls to Type::getNumContainedTypes(), Type::subtypes(), and Type::getContainedType(N). I'm not intending to remove these accessors -- they are useful/necessary in some cases. However, removing the pointee type from pointers would potentially break some uses, and reducing the number of calls makes it easier to audit. llvm-svn: 350835
* Fix compilation error on 32-bit architectures introduced in r350511Pavel Labath2019-01-101-1/+1
| | | | | | | The issue was a narrowing conversion when converting from uint64_t to a size_t. llvm-svn: 350834
* [LLD][ELF] - A follow up for r350819 ("Support MSP430") : add a test case ↵George Rimar2019-01-101-0/+40
| | | | | | | | missing. It got lost for some reason. llvm-svn: 350833
* [llvm-symbolizer] Add -p as alias to -pretty-printDmitry Venikov2019-01-103-3/+8
| | | | | | | | | | | | | | Summary: Provides -p as a short alias for -pretty-print. Motivation: https://bugs.llvm.org/show_bug.cgi?id=40076 Reviewers: samsonov, khemant, ruiu, rnk, fjricci, jhenderson Reviewed By: jhenderson Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D56542 llvm-svn: 350832
* [RISCV][MC] Add support for evaluating constant symbols as immediatesAlex Bradbury2019-01-105-8/+66
| | | | | | | | | | | | | | | | | | | | | | | | This further improves compatibility with GNU as, allowing input such as the following to be assembled: .equ CONST, 0x123456 li a0, CONST addi a0, a0, %lo(CONST) .equ CONST, 1 slli a0, a0, CONST Note that we don't have perfect compatibility with gas, as it will avoid emitting a relocation in this case: addi a0, a0, %lo(CONST2) .equ CONST2, 0x123456 Thanks to Shiva Chen for suggesting a better way to approach this during review. Differential Revision: https://reviews.llvm.org/D52298 llvm-svn: 350831
* [x86] fix remaining miscompile bug in horizontal binop matching (PR40243)Sanjay Patel2019-01-102-5/+12
| | | | | | | | | | | When we use the partial-matching function on a 128-bit chunk, we must account for the possibility that we've matched undef halves of the original source vectors, so the outputs may need to be reset. This should allow closing PR40243: https://bugs.llvm.org/show_bug.cgi?id=40243 llvm-svn: 350830
* gn build: Merge r350819Nico Weber2019-01-101-0/+1
| | | | llvm-svn: 350829
* Modify InputSectionBase::getLocation to add section and offset to every loc.Sean Fertile2019-01-104-7/+10
| | | | | | | | | | | | | | The section and offset can be very helpful in diagnosing certian errors. For example on a relocation overflow or misalignment diagnostic: test.c:(function foo): relocation R_PPC64_ADDR16_DS out of range: ... The function foo can have many R_PPC64_ADDR16_DS relocations. Adding the offset and section will identify exactly which relocation is causing the failure. Differential Revision: https://reviews.llvm.org/D56453 llvm-svn: 350828
* [PPC64] Fix RelType in checkInt and checkAlignment diagnsotics.Sean Fertile2019-01-103-10/+12
| | | | | | | | | | | | In the PPC64 target we map toc-relative relocations, dynamic thread pointer relative relocations, and got relocations into a corresponding ADDR16 relocation type for handling in relocateOne. This patch saves the orignal RelType before mapping to an ADDR16 relocation so that any diagnostic messages will not mistakenly use the mapped type. Differential Revision: https://reviews.llvm.org/D56448 llvm-svn: 350827
* [x86] fix horizontal binop matching for 256-bit vectors (PR40243)Sanjay Patel2019-01-103-78/+177
| | | | | | | | | | | | | | | | | This is a partial fix for: https://bugs.llvm.org/show_bug.cgi?id=40243 ...as seen in the integer test, we still need to correct the result when using the existing (old) horizontal op matching function because it does not model the way x86 256-bit horizontal ops return results (each 128-bit half is its own horizontal-op). A potential follow-up change for that is discussed in the bug report - see also D56490. This generally duplicates a lot of the existing matching code, but we can't just remove that without introducing regressions, so the existing code is renamed and used less often. Follow-ups may try to reduce that overlap. Differential Revision: https://reviews.llvm.org/D56450 llvm-svn: 350826
* [AArch64] Fix operation actions for FP16 vector intrinsicsBryan Chan2019-01-102-235/+340
| | | | | | | | | | | | | | | | | | | | | | Summary: This patch changes the legalization action for some half-precision floating- point vector intrinsics (FSIN, FLOG, etc.) from Promote to Expand. These ops are not supported in hardware for half-precision vectors, but promotion is not always possible (for v8f16 operands). Changing the action to Expand fixes an assertion failure in the legalizer when the frontend produces such ops. In addition, a quick microbenchmark shows that, in the v4f16 case, expanding introduces fewer spills and is therefore slightly faster than promoting. Reviewers: t.p.northover, SjoerdMeijer Reviewed By: SjoerdMeijer Subscribers: javed.absar, kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D56296 llvm-svn: 350825
* [LLD][ELF] - Fix the test cases after r350823.George Rimar2019-01-103-35/+5
| | | | | | r350823 changed the output of the llvm-objdump. llvm-svn: 350824
* [llvm-objdump] - Implement -z/--disassemble-zeroes.George Rimar2019-01-105-7/+127
| | | | | | | | | | | | | | This is https://bugs.llvm.org/show_bug.cgi?id=37151, GNU objdump spec says that "Normally the disassembly output will skip blocks of zeroes.", but currently, llvm-objdump prints them. The patch implements the -z/--disassemble-zeroes option and switches the default to always skip blocks of zeroes. Differential revision: https://reviews.llvm.org/D56083 llvm-svn: 350823
* [X86] Add SSE41 vector abs testsSimon Pilgrim2019-01-101-6/+86
| | | | llvm-svn: 350822
* [llvm-symbolizer] Add support for specifying addresses on command-lineJames Henderson2019-01-102-36/+63
| | | | | | | | | | | | | | | | See https://bugs.llvm.org/show_bug.cgi?id=40070. GNU addr2line accepts input addresses both on the command-line and via stdin. llvm-symbolizer previously only supported the latter. This change adds support for the former. As with addr2line, the new behaviour is to only look for addresses on stdin if no positional arguments were provided to llvm-symbolizer. Reviewed by: ruiu Differential Revision: https://reviews.llvm.org/D56272 llvm-svn: 350821
* [MCA] Fix wrong definition of ResourceUnitMask in DefaultResourceStrategy.Andrea Di Biagio2019-01-1011-32/+52
| | | | | | | | | | | | | | Field ResourceUnitMask was incorrectly defined as a 'const unsigned' mask. It should have been a 64 bit quantity instead. That means, ResourceUnitMask was always implicitly truncated to a 32 bit quantity. This issue has been found by inspection. Surprisingly, that bug was latent, and it never negatively affected any existing upstream targets. This patch fixes the wrong definition of ResourceUnitMask, and adds a bunch of extra debug prints to help debugging potential issues related to invalid processor resource masks. llvm-svn: 350820
* [LLD][ELF] - Support MSP430.George Rimar2019-01-107-0/+105
| | | | | | | | | | | Patch by Michael Skvortsov! This change adds a basic support for linking static MSP430 ELF code. Implemented relocation types are intended to correspond to the BFD. Differential revision: https://reviews.llvm.org/D56535 llvm-svn: 350819
* [compiler-rt][builtins][PowerPC] Implemented __floattitf builtin on PowerPCAmy Kwan2019-01-104-0/+305
| | | | | | | | | | | | | This patch implements the long double __floattitf (int128_t) method for PowerPC -- specifically to convert a 128 bit integer into a long double (IBM double-double). To invoke this method, one can do so by linking against compiler-rt, via the --rtlib=compiler-rt command line option supplied to clang. Differential Revision: https://reviews.llvm.org/D54313/ llvm-svn: 350818
* Correct the spelling of helpURI to helpUri.Aaron Ballman2019-01-102-3/+3
| | | | | | JSON is case sensitive and the SARIF spec uses the corrected spelling. llvm-svn: 350817
* [compiler-rt][builtins][PowerPC] Implemented __fixunstfti builtin on PowerPCAmy Kwan2019-01-104-0/+865
| | | | | | | | | | | | | | | | | | This patch implements the __uint128_t __fixunstfti (long double) method for PowerPC -- specifically to convert a long double (IBM double-double) to an unsigned 128 bit integer. The general approach of this algorithm is to convert the high and low doubles of the long double and add them together if the doubles fit within 64 bits. However, additional adjustments and scaling is performed when the high or low double does not fit within a 64 bit integer. To invoke this method, one can do so by linking against compiler-rt, via the --rtlib=compiler-rt command line option supplied to clang. Differential Revision: https://reviews.llvm.org/D54911 llvm-svn: 350815
* [clang-tidy] Fix case of local variables in modernize-use-nodiscard checkerJonas Toth2019-01-101-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Correct the case of the local variables.. Rational: I want to be able to run clang-tidy on new clang-tidy checker code prior to creating a review (to demonstrate we should dog food our own tools during development, not my suggestion but @Eugene.Zelenko) To this end I am running the following in a script, prior to make a change. ``` tidy: @for source in $$(git status -suno | grep ".cpp$$" | cut -c4-) ;\ do \ clang-tidy -quiet $$source -- $(TIDY_FLAGS);\ done ``` I then want to go through the checkers and see which checkers most closely match the review style of the reviewers ``` --- Checks: ' -clang-diagnostic-*, readability-identifier-naming, llvm-header-guard ' WarningsAsErrors: '' HeaderFilterRegex: '' AnalyzeTemporaryDtors: false FormatStyle: LLVM CheckOptions: - key: readability-identifier-naming.IgnoreFailedSplit value: '0' - key: readability-identifier-naming.VariableCase value: 'CamelCase' - key: readability-identifier-naming.LocalVariableCase value: 'CamelCase' ... ``` Unfortunately in doing so, I have identified that my previous review {D55433} it violates what looks like to be the convention of local variables being in CamelCase. Sending this small review in the hope it can be corrected. Patch by MyDeveloperDay. Reviewers: JonasToth, Eugene.Zelenko Reviewed By: JonasToth Subscribers: xazax.hun, Eugene.Zelenko Differential Revision: https://reviews.llvm.org/D56536 llvm-svn: 350814
* [pstl] Fix compile errors when PARALLEL_POLICIES is disabledLouis Dionne2019-01-102-1/+111
| | | | | | | Reviewed as https://reviews.llvm.org/D56139. Thanks to @jerryct for the patch. llvm-svn: 350813
* [pstl] Fix CMake configuration when parallel policies are disabledLouis Dionne2019-01-101-1/+1
| | | | llvm-svn: 350812
* [ARM] Fix for verifier buildbotSam Parker2019-01-101-5/+5
| | | | | | | Copy the MachineOperand first and then change the flags instead of making a copy. llvm-svn: 350811
* Revert "Add a verbose mode to "image dump line-table" and use it to write a ↵Pavel Labath2019-01-102-119/+4
| | | | | | | | | | | | | .debug_line test" This reverts commit r350802 because the test fails on windows. This happens because we treat the paths as windows paths even though they have linux path separators in the asm file. That results in wrong paths being computed (\tmp\tmp\a.c instead of /tmp/a.c). Reverting until I can figure out what to do with this. llvm-svn: 350810
* PECOFF: Fix section name computationPavel Labath2019-01-103-19/+66
| | | | | | | | | | | | | | | | | | If a section name is exactly 8 bytes long (or has been truncated to 8 bytes), it will not contain the terminating nul character. This means reading the name as a c string will pick up random data following the name field (which happens to be the section vm size). This fixes the name computation to avoid out-of-bounds access and adds a test. Reviewers: zturner, stella.stamenova Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D56124 llvm-svn: 350809
* [LoopUnroll] add parsing for unroll parameters in -passes pipelineFedor Sergeev2019-01-102-2/+104
| | | | | | | | | | | | | | | | | | | | | | | Allow to specify loop-unrolling with optional parameters explicitly spelled out in -passes pipeline specification. Introducing somewhat generic way of specifying parameters parsing via FUNCTION_PASS_PARAMETRIZED pass registration. Syntax of parametrized unroll pass name is as follows: 'unroll<' parameter-list '>' Where parameter-list is ';'-separate list of parameter names and optlevel optlevel: 'O[0-3]' parameter: { 'partial' | 'peeling' | 'runtime' | 'upperbound' } negated: 'no-' parameter Example: -passes=loop(unroll<O3;runtime;no-upperbound>) this invokes LoopUnrollPass configured with OptLevel=3, Runtime, no UpperBound, everything else by default. llvm-svn: 350808
* Fix RUN line in test/Transforms/LoopDeletion/crashbc.llBjorn Pettersson2019-01-101-1/+1
| | | | llvm-svn: 350807
* [asan] Mark tests as UNSUPPORTED on armDiana Picus2019-01-102-2/+2
| | | | | | | | | | Temporarily mark a couple of tests as UNSUPPORTED until we figure out why they fail on the thumb bots. The failure was introduced in r350139 - Add support for background thread on NetBSD in ASan. llvm-svn: 350806
* [libclang] Fix clang_Cursor_isAnonymousIvan Donchevskii2019-01-103-10/+31
| | | | | | | | Use the same logic as in TypePrinter::printTag to determine that the tag is anonymous and the separate check for namespaces. Differential Revision: https://reviews.llvm.org/D54996 llvm-svn: 350805
* Implement ObjectFileELF::GetBaseAddressPavel Labath2019-01-105-12/+50
| | | | | | | | | Summary: The concept of a base address was already present in the implementation (it's needed for computing section load addresses properly), but it was never exposed through this function. This fixes that. llvm-svn: 350804
* [clangd] Don't store completion info if the symbol is not used for code ↵Haojian Wu2019-01-103-14/+38
| | | | | | | | | | | | | | | | | | | | | completion. Summary: This would save us some memory and disk space: - Dex usage (261 MB vs 266 MB) - Disk (75 MB vs 76 MB) It would save more when we index the main file symbol D55185. Reviewers: ilya-biryukov Reviewed By: ilya-biryukov Subscribers: nridge, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D56314 llvm-svn: 350803
* Add a verbose mode to "image dump line-table" and use it to write a ↵Pavel Labath2019-01-102-4/+119
| | | | | | | | | | | | | | | | | | | | | | .debug_line test Summary: The motivation for this is being able to write tests for the upcoming breakpad line table parser, but this could be useful for testing the low-level workings of any line table format. Or simply for viewing the line table information with more detail (the brief format doesn't include any of the flags for end_of_prologue and similar). I've also removed the load_addresses argument from the DumpCompileUnitLineTable function, as it wasn't being used anywhere. Reviewers: clayborg, zturner Subscribers: JDevlieghere, lldb-commits Differential Revision: https://reviews.llvm.org/D56315 llvm-svn: 350802
* [ARM] Size reduce teq to eorsSam Parker2019-01-103-5/+298
| | | | | | | | | | | Add t2TEQrr to the map of instructions with can be reduced down into a T1 instruction. This is a special case because TEQ just sets the CPSR and doesn't write to a GPR, which is not the case for EOR. So, we need to ensure that the EOR can write to the first operand. Differential Revision: https://reviews.llvm.org/D56255 llvm-svn: 350801
* [X86] Disable DomainReassignment pass when AVX512BW is disabled to avoid ↵Craig Topper2019-01-105-167/+318
| | | | | | | | | | | | | | | | | | | | | | | injecting VK32/VK64 references into the MachineIR Summary: This pass replaces GR8/GR16/GR32/GR64 with their equivalent sized mask register classes. But VK32/VK64 aren't legal without AVX512BW. Apparently this mostly appears to work if the register coalescer is able to remove the VK32/VK64 register class reference. Or if we don't ever spill it. But there's no guarantee of that. Another Intel employee managed to trigger a crash due to this with ISPC. Unfortunately, I've lost the test case he sent me at the time. I'm trying to get him to reproduce it for me. I'd like to get this in before 8.0 branches since its a little scary. The regressions here are unfortunate, but I think we can make some improvements to DAG combine, load folding, etc. to fix them. Just not sure if we can get that done for 8.0. Fixes PR39741 Reviewers: RKSimon, spatel Reviewed By: RKSimon Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D56460 llvm-svn: 350800
* Recommit "[PowerPC] Fix assert from machine verify pass that unmatched ↵Zi Xuan Wu2019-01-103-22/+33
| | | | | | | | | | register class about fcmp selection in fast-isel" This re-commit r350685. Differential Revision: https://reviews.llvm.org/D55686 llvm-svn: 350799
* [AArch64] Emit the correct MCExpr relocations specifiers like VK_ABS_G0, etcMandeep Singh Grang2019-01-104-4/+61
| | | | | | | | | | | | | | | | Summary: D55896 and D56029 add support to emit fixups for :abs_g0: , :abs_g1_s: , etc. This patch adds the necessary enums and MCExpr needed for lowering these. Reviewers: rnk, mstorsjo, efriedma Reviewed By: efriedma Subscribers: javed.absar, kristof.beyls, llvm-commits Differential Revision: https://reviews.llvm.org/D56037 llvm-svn: 350798
* Remove unnecessary include.Richard Trieu2019-01-101-1/+0
| | | | | | | QuerySession.h does not need anything from Query.h, so it does not need to include it. llvm-svn: 350797
* i[Sanitizer] Enable pututxline interceptionDavid Carlier2019-01-101-1/+13
| | | | | | | | | | Reviewers: krytarowski Reviewed By: krytarowski Differential Revision: https://reviews.llvm.org/D56495 llvm-svn: 350796
* Revert "[WebAssembly] Add simd128-unimplemented subtarget feature"Thomas Lively2019-01-1021-88/+82
| | | | | | This reverts rL350791. llvm-svn: 350795
* [AMDGPU] Separate feature dot-instsStanislav Mekhanoshin2019-01-104-22/+23
| | | | | | Differential Revision: https://reviews.llvm.org/D56525 llvm-svn: 350794
* [AMDGPU] Separate feature dot-instsStanislav Mekhanoshin2019-01-105-6/+22
| | | | | | Differential Revision: https://reviews.llvm.org/D56524 llvm-svn: 350793
* Refactor declarations of ASTContext allocate functions into its own header.Richard Trieu2019-01-106-23/+46
| | | | | | | | | | | | | | Forward declarations of the allocate functions combine with the forward declaration of the ASTContext class is enough information for some headers without pulling in ASTContext.h in its entirety. Pull the existing declarations from AttrIterator.h into a new header. Also place the default alignment size into this header. Previously, new had its default in AttrIterator.h while new[] had its default in ASTContext.h. Add new header includes where it is needed. Specifically to ASTVector.h to make it a standalone header, unlike previously which it was standalone as long as none of its functions were called. llvm-svn: 350792
* [WebAssembly] Add simd128-unimplemented subtarget featureThomas Lively2019-01-1021-82/+88
| | | | | | | | | | This is a second attempt at r350778, which was reverted in r350789. The only change is that the unimplemented-simd128 feature has been renamed simd128-unimplemented, since naming it unimplemented-simd128 somehow made the simd128 feature flag enable the unimplemented-simd128 feature on Windows. llvm-svn: 350791
* Revert "Fix go bindings for r350647: missed a function rename"Jorge Gorbe Moya2019-01-101-2/+1
| | | | | | This reverts commit a74266858a8164cfb23d4e138cd4c7c37be0b5d1. SVN revision r350657. llvm-svn: 350790
* Revert "[WebAssembly] Add unimplemented-simd128 subtarget feature"Thomas Lively2019-01-1021-88/+82
| | | | | | This reverts L350778. llvm-svn: 350789
* [Python] Update checkDsymForUUIDIsOn to be compatible with Python 3.Davide Italiano2019-01-101-4/+5
| | | | | | | | | | | | | | | | Summary: In python 2, strings and bytes are the same, but they're not in python 3, hence the return of read() needs an explicit conversion. While I'm around, rename the return of Popen() from `pipe` to `process`, as that's what Popen returns. Reviewers: JDevlieghere, friss, zturner, aprantl, serge-sans-paille Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D56517 llvm-svn: 350788
* Revert "[Sparc] Add Sparc V8 support"Jorge Gorbe Moya2019-01-1010-325/+2
| | | | | | This reverts commit r350705. llvm-svn: 350787
* A little cleanup / commenting on locating kernel binaries while IJason Molenda2019-01-101-4/+18
| | | | | | | | | | was working on something else. DynamicLoaderDarwinKernel::SearchForKernelNearPC should have had an early return if the pc value is not in high memory; add that. The search for a kernel at 0x2000 offsets was a stopgap; it doesn't need to be checked any longer. llvm-svn: 350786
OpenPOWER on IntegriCloud