summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [analyzer] Quote the type of the leaked/problematic object in diagnostics ↵George Karpenkov2019-01-1011-2500/+1263
| | | | | | | | for readability Differential Revision: https://reviews.llvm.org/D56344 llvm-svn: 350867
* [analyzer] [NFC] Reverse the argument order for "diff" in testsGeorge Karpenkov2019-01-1035-36/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | The current argument order has "expected" and "actual" the wrong way around, so that the diff shows the change from expected to actual, not from actual to expected. Namely, if the expected diagnostics contains the string "foo", but the analyzer emits "bar", we really want to see: ``` - foo + bar ``` not ``` - bar + foo ``` since adapting to most changes would require applying that diff to the expected output. Differential Revision: https://reviews.llvm.org/D56340 llvm-svn: 350866
* [analyzer] [NFC] Reduce redundancy in RetainSummaryManager by using a functionGeorge Karpenkov2019-01-102-24/+11
| | | | | | Differential Revision: https://reviews.llvm.org/D56282 llvm-svn: 350865
* [analyzer] [RetainCountChecker] [NFC] Remove SummaryLogGeorge Karpenkov2019-01-104-103/+46
| | | | | | | | | | | | | | The complicated machinery for passing the summary log around is actually only used for one thing! To figure out whether the "dealloc" message was sent. Since I have tried to extend it for other uses and failed (it's actually very hard to use), I think it's much better to simply use a tag and remove the summary log altogether. Differential Revision: https://reviews.llvm.org/D56228 llvm-svn: 350864
* [analyzer] [RetainCountChecker] [NFC] Another minor cleanupGeorge Karpenkov2019-01-102-16/+15
| | | | | | Differential Revision: https://reviews.llvm.org/D56224 llvm-svn: 350863
* [analyzer] [RetainCountChecker] [NFC] Refactor the way attributes are handledGeorge Karpenkov2019-01-102-91/+113
| | | | | | | | | | | | | Make sure all checks for attributes go through a centralized function, which checks whether attribute handling is enabled, and performs validation. The type of the attribute is returned. Sadly, metaprogramming is required as attributes have no sensible static getters. Differential Revision: https://reviews.llvm.org/D56222 llvm-svn: 350862
* [analyzer] [RetainCountChecker] Remove redundant enum UnarySummaryKindGeorge Karpenkov2019-01-102-19/+9
| | | | | | Differential Revision: https://reviews.llvm.org/D56072 llvm-svn: 350861
* [analyzer] [RetainCountChecker] Remove obsolete "MakeCollectable" enum valueGeorge Karpenkov2019-01-103-11/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D56071 llvm-svn: 350860
* [analyzer] [RetainCountChecker] [NFC] Remove redundant enum items *Msg, as ↵George Karpenkov2019-01-105-82/+69
| | | | | | | | the object type is already communicated by a separate field Differential Revision: https://reviews.llvm.org/D56070 llvm-svn: 350859
* [analyzer] [NFC] Track object type with ArgEffect in RetainCountChecker.George Karpenkov2019-01-106-141/+180
| | | | | | | | This would be needed in the future. https://reviews.llvm.org/D56040 llvm-svn: 350858
* [analyzer] [NFC] Move ObjKind into a separate top-level enum in ↵George Karpenkov2019-01-106-69/+70
| | | | | | | | | | RetainSummaryManager. Allows using it in future outside of RetEffect. Differential Revision: https://reviews.llvm.org/D56039 llvm-svn: 350857
* Split -Wdelete-non-virtual-dtor into two groupsErik Pilkington2019-01-103-3/+37
| | | | | | | | | | | | | This group controls two diagnostics: deleting an abstract class with a non-virtual dtor, which is a guaranteed crash, and deleting a non-abstract polymorphic class with a non-virtual dtor, which is just suspicious. rdar://40380564 Differential revision: https://reviews.llvm.org/D56405 llvm-svn: 350856
* Remove an external test file. NFC.Rui Ueyama2019-01-102-9/+5
| | | | llvm-svn: 350855
* [lit] Make it possible for the lit test suite to pass withDan Liew2019-01-101-1/+1
| | | | | | | | | `FILECHECK_OPTS=-v` set in the environment. Follow up to r350850 as requested by Joel E. Denny in https://reviews.llvm.org/D56541 . llvm-svn: 350854
* TrapInstr must be 4 bytes long. Currently we write two zeros on every two bytes.Rui Ueyama2019-01-102-1/+4
| | | | llvm-svn: 350853
* [analyzer][CrossTU][NFC] Generalize to external definitions instead of ↵Rafael Stahl2019-01-1024-124/+126
| | | | | | | | | | | | | | | | external functions Summary: This is just changing naming and documentation to be general about external definitions that can be imported for cross translation unit analysis. There is at least a plan to add VarDecls: D46421 Reviewers: NoQ, xazax.hun, martong, a.sidorin, george.karpenkov, serge-sans-paille Reviewed By: xazax.hun, martong Subscribers: mgorny, whisperity, baloghadamsoftware, szepet, rnkovacs, mikhail.ramalho, Szelethus, donat.nagy, dkrupp, cfe-commits Differential Revision: https://reviews.llvm.org/D56441 llvm-svn: 350852
* [llvm-objdump][MachO] Fix error reporting after r350848 and r350849Francis Visoiu Mistrih2019-01-102-6/+7
| | | | llvm-svn: 350851
* [FileCheck] Don't propagate `FILECHECK_DUMP_INPUT_ON_FAILURE` andDan Liew2019-01-101-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | `FILECHECK_OPTS` into environment for FileCheck tests. Summary: This fixes the following FileCheck tests: * FileCheck/dump-input-enable.txt * FileCheck/match-full-lines.txt when `FILECHECK_DUMP_INPUT_ON_FAILURE` is set in the environment. By default llvm-lit propagates `FILECHECK_DUMP_INPUT_ON_FAILURE` and `FILECHECK_OPTS` from llvm-lit's environment into the test environment. Unfortunately this can break FileCheck's tests because they expect that these environment variables not to be set. rdar://problem/47176262 Reviewers: jdenny, probinson, george.karpenkov Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D56541 llvm-svn: 350850
* [llvm-objdump][MachO] Use the -dsym file name when reporting errorsFrancis Visoiu Mistrih2019-01-102-2/+9
| | | | | | Instead of using the binary filename. llvm-svn: 350849
* [llvm-objdump][MachO] Correctly handle the llvm::Error when -dsym has errorsFrancis Visoiu Mistrih2019-01-102-2/+6
| | | | | | | | | In an assert build, the Error gets destroyed and we get "Program aborted due to an unhandled Error:". In release, we get an empty message. llvm-svn: 350848
* [clangd] Introduce loading of shards within auto-indexKadir Cetinkaya2019-01-104-70/+298
| | | | | | | | | | | | | | | | Summary: Whenever a change happens on a CDB, load shards associated with that CDB before issuing re-index actions. Reviewers: ilya-biryukov Reviewed By: ilya-biryukov Subscribers: ioeric, MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D55224 llvm-svn: 350847
* [Docs] fix typo, adjust text orderSanjay Patel2019-01-101-5/+6
| | | | llvm-svn: 350846
* [Docs] add note to avoid 'errno' for better vectorization (PR40265)Sanjay Patel2019-01-101-0/+4
| | | | | | | This is a partial fix for the documentation improvements requested in: https://bugs.llvm.org/show_bug.cgi?id=40265 llvm-svn: 350845
* [DAGCombiner] simplify code; NFCSanjay Patel2019-01-101-11/+11
| | | | llvm-svn: 350844
* Repair compilation of llvm-stress after r350835.James Y Knight2019-01-101-1/+1
| | | | | | Apparently it doesn't get built by 'ninja check'. :( llvm-svn: 350843
* [LLD][ELF] - Fix tests after r350840.George Rimar2019-01-107-8/+1
| | | | | | | | D56076 (r350840) changed the llvm-objdump output. This is a follow up commit to fix LLD test cases. llvm-svn: 350842
* [SelectionDAGBuilder] Refactor GetRegistersForValue. NFCI.Nirav Dave2019-01-101-60/+42
| | | | llvm-svn: 350841
* [llvm-objdump] - Do not include reserved undefined symbol in -t output.George Rimar2019-01-104-4/+8
| | | | | | | | | | | | | | | | | | | | This is https://bugs.llvm.org/show_bug.cgi?id=26892, GNU objdump hides the special symbol entry: SYMBOL TABLE: 000000000000a7e0 l F .text 00000000000003f9 bi_copymodules while llvm-objdump does not: SYMBOL TABLE: 0000000000000000 *UND* 00000000 000000000000a7e0 l F .text 000003f9 bi_copymodules Patch makes the behavior of the llvm-objdump to be consistent with the GNU objdump. Differential revision: https://reviews.llvm.org/D56076 llvm-svn: 350840
* [SelectionDAGBuilder] Fix formatting. NFC.Nirav Dave2019-01-101-1/+2
| | | | llvm-svn: 350839
* [AMDGPU] Fix dwordx3/southern-islands failures.Neil Henning2019-01-108-28/+56
| | | | | | | | | | | This commit fixes the dwordx3/southern-islands failures that were found in bugzilla https://bugs.llvm.org/show_bug.cgi?id=40129, by not generating the dwordx3 variants of load/store instructions that were added to the ISA after southern islands. Differential Revision: https://reviews.llvm.org/D56434 llvm-svn: 350838
* [SelectionDAGBuilder] Refactor visitInlineAsm. NFC.Nirav Dave2019-01-101-45/+24
| | | | llvm-svn: 350837
* [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
OpenPOWER on IntegriCloud