summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [LLD][ELF] /DISCARD/ output sections should not be orphansAndrew Ng2019-04-302-0/+37
| | | | | | | | | | /DISCARD/ output sections were being treated as orphans. As a result, if a /DISCARD/ output section has been assigned a PHDR, it could cause incorrect assignment of sections to segments. Differential Revision: https://reviews.llvm.org/D61186 llvm-svn: 359565
* [clangd] gen_std uses multiprocessing pool to be fast. While here, log ↵Sam McCall2019-04-301-24/+42
| | | | | | ambiguous symbols. NFC llvm-svn: 359564
* [llvm-nm] Add --special-syms no-op flagEugene Leviant2019-04-302-0/+35
| | | | | | Differential revision: https://reviews.llvm.org/D60502 llvm-svn: 359563
* gn build: Merge r359455Nico Weber2019-04-301-0/+1
| | | | llvm-svn: 359562
* [AArch64] add tests for fdiv/frem constant folding (PR41668); NFCSanjay Patel2019-04-301-0/+27
| | | | llvm-svn: 359561
* PostfixExpression: Introduce InitialValueNodePavel Labath2019-04-303-3/+61
| | | | | | | | | | | | | | | | | | | | | | | Summary: This node represents can be used to refer to the initial value, which is sometimes pushed onto the DWARF stack as the "input" to the DWARF expression. The typical use case (and the reason why I'm introducing it) is that the "Canonical Frame Address" is passed this way to the DWARF expressions computing the values of registers during frame unwind. The nodes are converted into dwarf by keeping track of DWARF stack depth an any given point, and then copying the initial value from the bottom of the stack via the DW_OP_pick opcode. This could be made more efficient for simple expressions, but here I chose to start with the most general implementation possible. Reviewers: amccarth, clayborg, aleksandr.urakov Subscribers: aprantl, jasonmolenda, lldb-commits, markmentovai Differential Revision: https://reviews.llvm.org/D61183 llvm-svn: 359560
* [TableGen] Fix null pointer dereferencing in token parser.Simon Pilgrim2019-04-301-8/+10
| | | | | | Reported in https://www.viva64.com/en/b/0629/ llvm-svn: 359559
* Fix inconsistency in calculating DIAG_START_ values.Russell Gallop2019-04-301-2/+2
| | | | | | | | | This was introduced at r313975. As DIAG_SIZE_CROSSTU and DIAG_SIZE_COMMENT are both 100 this should be NFC. Differential Revision: https://reviews.llvm.org/D61264 llvm-svn: 359558
* vs integration: vs2019 supportHans Wennborg2019-04-301-7/+7
| | | | llvm-svn: 359557
* [cmake] Fix error message on simulated VS version checkRussell Gallop2019-04-301-1/+1
| | | | | | | | | | | | | | For clang-cl self hosts in VS2015 environment this was reporting: "Host Clang must have at least -fms-compatibility-version=19.00.24213.1, your version is 9.0.0". This check fires as CMake detects the simulated environment as _MSC_VER 1900, which is truncated. This makes it less than the required 19.00.24213.1. Differential revision: https://reviews.llvm.org/D61188 llvm-svn: 359556
* Revert rL359519 : [MemorySSA] Invalidate MemorySSA if AA or DT are invalidated.Simon Pilgrim2019-04-303-65/+0
| | | | | | | | | | | | | | | | | | Summary: MemorySSA keeps internal pointers of AA and DT. If these get invalidated, so should MemorySSA. Reviewers: george.burgess.iv, chandlerc Subscribers: jlebar, Prazek, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D61043 ........ This was causing windows build bot failures llvm-svn: 359555
* [LLD][ELF] Fix getRankProximity to "ignore" not live sectionsAndrew Ng2019-04-302-3/+44
| | | | | | | | | | This is a follow up to r358979 which made findOrphanPos only consider live sections. Unfortunately, this required change to getRankProximity, used by findOrphanPos, was missed. Differential Revision: https://reviews.llvm.org/D61197 llvm-svn: 359554
* [SLP] Lit test that cannot get vectorized due to lack of look-ahead operand ↵Simon Pilgrim2019-04-301-0/+74
| | | | | | | | | | | | | reordering heuristic. The code in this test is not vectorized by SLP because its operand reordering cannot look beyond the immediate predecessors. This will get fixed in a follow-up patch that introduces the look-ahead operand reordering heuristic. Committed on behalf of @vporpo (Vasileios Porpodas) Differential Revision: https://reviews.llvm.org/D61283 llvm-svn: 359553
* [llvm-objcopy] - Check dynamic relocation sections for broken references.George Rimar2019-04-304-12/+100
| | | | | | | | | | | | | | This is a fix for https://bugs.llvm.org/show_bug.cgi?id=41371. Currently, it is possible to break the sh_link field of the dynamic relocation section by removing the section it refers to. The patch fixes an issue and adds 2 test cases. One of them shows that it does not seem possible to break the sh_info field. I added an assert to verify this. Differential revision: https://reviews.llvm.org/D60825 llvm-svn: 359552
* Fix gcc "-Wdangling-else" warning. NFCI.Simon Pilgrim2019-04-301-1/+2
| | | | llvm-svn: 359551
* Fix gcc "-Wdangling-else" warnings. NFCI.Simon Pilgrim2019-04-301-3/+6
| | | | llvm-svn: 359550
* Update checks in an instcombine test, NFCJeremy Morse2019-04-301-4/+4
| | | | | | This reduces the delta in some incoming work that changes this test. llvm-svn: 359549
* Fix Wpedantic "default argument specified for lambda parameter" warning. NFCI.Simon Pilgrim2019-04-301-3/+3
| | | | llvm-svn: 359548
* [ARM] Implement TTI::getMemcpyCostSjoerd Meijer2019-04-304-4/+705
| | | | | | | | | This implements TargetTransformInfo method getMemcpyCost, which estimates the number of instructions to which a memcpy instruction expands to. Differential Revision: https://reviews.llvm.org/D59787 llvm-svn: 359547
* Sort containers alphabetically in CxxModuleHandler [NFC]Raphael Isemann2019-04-301-3/+3
| | | | llvm-svn: 359546
* Fix for bug 41512: lower INSERT_VECTOR_ELT(ZeroVec, 0, Elt) to ↵Simon Pilgrim2019-04-302-101/+37
| | | | | | | | | | | | | | | | | SCALAR_TO_VECTOR(Elt) for all SSE flavors Current LLVM uses pxor+pinsrb on SSE4+ for INSERT_VECTOR_ELT(ZeroVec, 0, Elt) insead of much simpler movd. INSERT_VECTOR_ELT(ZeroVec, 0, Elt) is idiomatic construct which is used e.g. for _mm_cvtsi32_si128(Elt) and for lowest element initialization in _mm_set_epi32. So such inefficient lowering leads to significant performance digradations in ceratin cases switching from SSSE3 to SSE4. https://bugs.llvm.org/show_bug.cgi?id=41512 Here INSERT_VECTOR_ELT(ZeroVec, 0, Elt) is simply converted to SCALAR_TO_VECTOR(Elt) when applicable since latter is closer match to desired behavior and always efficiently lowered to movd and alike. Committed on behalf of @Serge_Preis (Serge Preis) Differential Revision: https://reviews.llvm.org/D60852 llvm-svn: 359545
* Revert r359520David Bolvansky2019-04-301-1/+1
| | | | llvm-svn: 359544
* [TargetLowering] findOptimalMemOpLowering. NFCI.Sjoerd Meijer2019-04-303-123/+133
| | | | | | | | | | This was a local static funtion in SelectionDAG, which I've promoted to TargetLowering so that I can reuse it to estimate the cost of a memory operation in D59787. Differential Revision: https://reviews.llvm.org/D59766 llvm-svn: 359543
* [ARM GlobalISel] Widen small shift operandsDiana Picus2019-04-302-0/+122
| | | | | | | The legalizer was already widening the shift amount. Add tests for that behaviour, and also support widening the shifted value. llvm-svn: 359542
* [AsmPrinter] Make AsmPrinter::HandlerInfo::Handler a unique_ptrFangrui Song2019-04-303-22/+21
| | | | | | | Handlers.clear() in AsmPrinter::doFinalization() will destroy these handlers. A unique_ptr makes the ownership clearer. llvm-svn: 359541
* [ARM GlobalISel] Be more careful about bailing outDiana Picus2019-04-302-2/+16
| | | | | | | | | Bail out on function arguments/returns with types aggregating an unsupported type. This fixes cases where we would happily and incorrectly lower functions taking e.g. [1 x i64] parameters, when we don't even support plain i64 yet. llvm-svn: 359540
* [analyzer][UninitializedObjectChecker] PR41611: Regard vector types as primitiveKristof Umann2019-04-303-3/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | https://bugs.llvm.org/show_bug.cgi?id=41611 Similarly to D61106, the checker ran over an llvm_unreachable for vector types: struct VectorSizeLong { VectorSizeLong() {} __attribute__((__vector_size__(16))) long x; }; void __vector_size__LongTest() { VectorSizeLong v; } Since, according to my short research, "The vector_size attribute is only applicable to integral and float scalars, although arrays, pointers, and function return values are allowed in conjunction with this construct." [src: https://gcc.gnu.org/onlinedocs/gcc-4.6.1/gcc/Vector-Extensions.html#Vector-Extensions] vector types are safe to regard as primitive. Differential Revision: https://reviews.llvm.org/D61246 llvm-svn: 359539
* Instantiate 'std' templates explicitly in the expression evaluatorRaphael Isemann2019-04-3058-1/+1244
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch is a follow-up for D58125. It implements the manual instantiation and merging of 'std' templates like `std::vector` and `std::shared_ptr` with information from the debug info AST. This (finally) allows using these classes in the expression evaluator like every other class (i.e. things like `vec.size()` and shared_ptr debugging now works, yay!). The main logic is the `CxxModuleHandler` which intercept the ASTImporter import process and replaces any `std` decls by decls from the C++ module. The decls from the C++ module are "imported" by just deserializing them directly in the expression evaluation context. This is mostly because we don't want to rely on the ASTImporter to correctly import these declarations, but in the future we should also move to the ASTImporter for that. This patch doesn't contain the automatic desugaring for result variables. This means that if you call for example `size` of `std::vector` you maybe get some very verbose typedef'd type as the variable type, e.g. `std::vector<int, std::allocator<int>>::value_type`. This is not only unreadable, it also means that our ASTImporter has to import all these types and associated decls into the persisent variable context. This currently usually leads to some assertion getting triggered in Clang when the ASTImporter either makes a mistake during importing or our debug info AST is inconsitent. The current workaround I use in the tests is to just cast the result to it's actual type (e.g. `size_t` or `int`) to prevent the ASTImporter from having to handle all these complicated decls. The automatic desugaring will be a future patch because I'm not happy yet with the current code for that and because I anticipate that this will be a controversial patch. Reviewers: aprantl, shafik, jingham, martong, serge-sans-paille Reviewed By: martong Subscribers: balazske, rnkovacs, mgorny, mgrang, abidh, jdoerfert, lldb-commits Tags: #c_modules_in_lldb, #lldb Differential Revision: https://reviews.llvm.org/D59537 llvm-svn: 359538
* [TargetLowering] Change getOptimalMemOpType to take a function attribute listSjoerd Meijer2019-04-3017-55/+45
| | | | | | | | | | | | The MachineFunction wasn't used in getOptimalMemOpType, but more importantly, this allows reuse of findOptimalMemOpLowering that is calling getOptimalMemOpType. This is the groundwork for the changes in D59766 and D59787, that allows implementation of TTI::getMemcpyCost. Differential Revision: https://reviews.llvm.org/D59785 llvm-svn: 359537
* MSan: handle llvm.lifetime.start intrinsicAlexander Potapenko2019-04-302-8/+183
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: When a variable goes into scope several times within a single function or when two variables from different scopes share a stack slot it may be incorrect to poison such scoped locals at the beginning of the function. In the former case it may lead to false negatives (see https://github.com/google/sanitizers/issues/590), in the latter - to incorrect reports (because only one origin remains on the stack). If Clang emits lifetime intrinsics for such scoped variables we insert code poisoning them after each call to llvm.lifetime.start(). If for a certain intrinsic we fail to find a corresponding alloca, we fall back to poisoning allocas for the whole function, as it's now impossible to tell which alloca was missed. The new instrumentation may slow down hot loops containing local variables with lifetime intrinsics, so we allow disabling it with -mllvm -msan-handle-lifetime-intrinsics=false. Reviewers: eugenis, pcc Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60617 llvm-svn: 359536
* [DebugInfo] DW_OP_deref_size in PrologEpilogInserter.Markus Lavin2019-04-309-3/+115
| | | | | | | | | | | | | | | | | | | | The PrologEpilogInserter need to insert a DW_OP_deref_size before prepending a memory location expression to an already implicit expression to avoid having the existing expression act on the memory address instead of the value behind it. The reason for using DW_OP_deref_size and not plain DW_OP_deref is that big-endian targets need to read the right size as simply truncating a larger read would yield the wrong result (LSB bytes are not at the lower address). This re-commit fixes issues reported in the first one. Namely deref was inserted under wrong conditions and additionally the deref_size argument was incorrectly encoded. Differential Revision: https://reviews.llvm.org/D59687 llvm-svn: 359535
* Update DemangleConfig.h to better mangle LLVM's version.Eric Fiselier2019-04-301-12/+68
| | | | | | | There's no need for the demangling bits to depend on libc++ internals, in the same way they don't when compiled as part of LLVM. llvm-svn: 359534
* [NFC][PowerPC] Use -check-prefixes to simplify the check in code-align.llKang Zhang2019-04-301-51/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: When checking the same output, we can use the `-check-prefixes` to simplify the check. For example, if we want to check below output. ``` ; GENERIC-LABEL: .globl foo ; BASIC-LABEL: .globl foo ; PWR-LABEL: .globl foo ; GENERIC: .p2align 2 ; BASIC: .p2align 4 ; PWR: .p2align 4 ; GENERIC: @foo ; BASIC: @foo ; PWR: @foo ``` If we use `-check-prefixes` ``` ... -check-prefixes=CHECK,GENERAL ... -check-prefixes=CHECK,BASIC ... -check-prefixes=CHECK,PWR ``` Above check can be simplify to: ``` ; CHECK-LABEL: .globl foo ; GENERIC: .p2align 2 ; BASIC: .p2align 4 ; PWR: .p2align 4 ; CHECK: @foo ``` Reviewed By: hfinkel Differential Revision: https://reviews.llvm.org/D61227 llvm-svn: 359533
* [DAGCombiner] Do not generate ISD::ADDE node if adde is not legal for the ↵Zi Xuan Wu2019-04-303-4/+41
| | | | | | | | | | | | | | | target when combine ISD::TRUNC node Do not combine (trunc adde(X, Y, Carry)) into (adde trunc(X), trunc(Y), Carry), if adde is not legal for the target. Even it's at type-legalize phase. Because adde is special and will not be legalized at operation-legalize phase later. This fixes: PR40922 https://bugs.llvm.org/show_bug.cgi?id=40922 Differential Revision: https://reviews.llvm.org//D60854 llvm-svn: 359532
* [analyzer] Treat functions without run-time branches as "small".Artem Dergachev2019-04-307-33/+163
| | | | | | | | | | | | | | | | | | Currently we always inline functions that have no branches, i.e. have exactly three CFG blocks: ENTRY, some code, EXIT. This makes sense because when there are no branches, it means that there's no exponential complexity introduced by inlining such function. Such functions also don't trigger various fundamental problems with our inlining mechanism, such as the problem of inlined defensive checks. Sometimes the CFG may contain more blocks, but in practice it still has linear structure because all directions (except, at most, one) of all branches turned out to be unreachable. When this happens, still treat the function as "small". This is useful, in particular, for dealing with C++17 if constexpr. Differential Revision: https://reviews.llvm.org/D61051 llvm-svn: 359531
* [analyzer] SmartPtrModeling: Fix a null dereference.Artem Dergachev2019-04-302-1/+11
| | | | | | | | | Don't crash when trying to model a call in which the callee is unknown in compile time, eg. a pointer-to-member call. Differential Revision: https://reviews.llvm.org/D61285 llvm-svn: 359530
* [ORC] Fix an ambiguous call in a unit test.Lang Hames2019-04-301-1/+2
| | | | llvm-svn: 359529
* [PECOFF] Implementation of ObjectFilePECOFF:: GetUUID()Aaron Smith2019-04-304-32/+194
| | | | | | | | | | | | | | | | | | | Summary: Provide an implementation of GetUUID() for remote debugging scenarios. Return a PDB's GUID (or PDB70's Signature) as the UUID. Reviewers: amccarth, labath Reviewed By: labath Subscribers: amccarth, clayborg, Hui, labath, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D56229 llvm-svn: 359528
* [clangd] Fix GN buildVitaly Buka2019-04-304-7/+1
| | | | llvm-svn: 359527
* Implement LWG 2960: nonesuch is insufficiently uselessMarshall Clow2019-04-304-6/+67
| | | | llvm-svn: 359526
* Mark LWG#2977 as 'Nothing to do'. NFCMarshall Clow2019-04-301-2/+2
| | | | llvm-svn: 359525
* [NFC] typoJF Bastien2019-04-301-2/+2
| | | | llvm-svn: 359524
* [NFC] typoJF Bastien2019-04-302-2/+2
| | | | llvm-svn: 359523
* [CommandLine} Wire-up cl::list::setDefault() so it will work correctly with ↵Don Hinton2019-04-302-1/+24
| | | | | | | | | | | | | | | | | | | | | | cl::ResetAllOptionOccurrences() in unittests. Part 2 of 5 Summary: With this change, cl::ResetAllOptionOccurrences() clears cl::list just like cl::opt, allowing users to call cl::ParseCommandLineOptions() multiple times without interference from previous calls. Reviewers: rnk Reviewed By: rnk Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D61234 llvm-svn: 359522
* [ORC] Allow JITDylib definition generators to return Errors.Lang Hames2019-04-306-74/+130
| | | | | | | | | | | | | | | | | | | | Background: A definition generator can be attached to a JITDylib to generate new definitions in response to queries. For example: a generator that forwards calls to dlsym can map symbols from a dynamic library into the JIT process on demand. If definition generation fails then the generator should be able to return an error. This allows the JIT API to distinguish between the case where a generator does not provide a definition, and the case where it was not able to determine whether it provided a definition due to an error. The immediate motivation for this is cross-process symbol lookups: If the remote-lookup generator is attached to a JITDylib early in the search list, and if a generator failure is misinterpreted as "no definition in this JITDylib" then lookup may continue and bind to a different definition in a later JITDylib, which is a bug. llvm-svn: 359521
* [PDB] Fixed null pointer dereferenceDavid Bolvansky2019-04-291-1/+1
| | | | | | | | | | | | | | Reviewers: zturner, rnk Reviewed By: rnk Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D61279 llvm-svn: 359520
* [MemorySSA] Invalidate MemorySSA if AA or DT are invalidated.Alina Sbirlea2019-04-293-0/+65
| | | | | | | | | | | | | | | | Summary: MemorySSA keeps internal pointers of AA and DT. If these get invalidated, so should MemorySSA. Reviewers: george.burgess.iv, chandlerc Subscribers: jlebar, Prazek, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D61043 llvm-svn: 359519
* Add more lld release notesNico Weber2019-04-291-0/+3
| | | | llvm-svn: 359518
* Add __builtin_dcbf support for PPCAhsan Saghir2019-04-295-1/+92
| | | | | | | | | | | | Summary: This patch adds support for __builtin_dcbf for PPC. __builtin_dcbf copies the contents of a modified block from the data cache to main memory and flushes the copy from the data cache. Differential revision: https://reviews.llvm.org/D59843 llvm-svn: 359517
* [Diagnostics] Support -Wtype-limits for GCC compatibilityDavid Bolvansky2019-04-295-0/+8
| | | | | | | | | | | | | | | | | | Summary: GCC's -Wtype-limits (part of -Wextra): Warn if a comparison is always true or always false due to the limited range of the data type Reviewers: rsmith, aaron.ballman, lebedev.ri, thakis Reviewed By: rsmith Subscribers: lebedev.ri, jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58841 llvm-svn: 359516
OpenPOWER on IntegriCloud