summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix incorrect documentation comment left after r321692Alex Bradbury2018-01-031-2/+0
| | | | | | | | | | | TargetRegistryInfo::createMCAsmBackend no longer takes a TheTriple parameter. The majory of the TargetRegistryInfo::create* functions have no or very limitied per-parameter doc comments, and adding a comment for the MCSubtargetInfo, MCRegisterInfo and MCTargetOptions parameters seems like it would add no real value beyond reading the function signature. As such, I've just deleted the doc comment for TheTriple. llvm-svn: 321694
* Update clang cc1as for createMCAsmBackend change in r321692Alex Bradbury2018-01-031-3/+2
| | | | llvm-svn: 321693
* Thread MCSubtargetInfo through Target::createMCAsmBackendAlex Bradbury2018-01-0330-101/+116
| | | | | | | | | | | | | | | | | | | | | Currently it's not possible to access MCSubtargetInfo from a TgtMCAsmBackend. D20830 threaded an MCSubtargetInfo reference through MCAsmBackend::relaxInstruction, but this isn't the only function that would benefit from access. This patch removes the Triple and CPUString arguments from createMCAsmBackend and replaces them with MCSubtargetInfo. This patch just changes the interface without making any intentional functional changes. Once in, several cleanups are possible: * Get rid of the awkward MCSubtargetInfo handling in ARMAsmBackend * Support 16-bit instructions when valid in MipsAsmBackend::writeNopData * Get rid of the CPU string parsing in X86AsmBackend and just use a SubtargetFeature for HasNopl * Emit 16-bit nops in RISCVAsmBackend::writeNopData if the compressed instruction set extension is enabled (see D41221) This change initially exposed PR35686, which has since been resolved in r321026. Differential Revision: https://reviews.llvm.org/D41349 llvm-svn: 321692
* [Sema] -Wtautological-constant-compare is too good. Cripple it.Roman Lebedev2018-01-039-47/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The diagnostic was mostly introduced in D38101 by me, as a reaction to wasting a lot of time, see [[ https://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20171009/206427.html | mail ]]. However, the diagnostic is pretty dumb. While it works with no false-positives, there are some questionable cases that are diagnosed when one would argue that they should not be. The common complaint is that it diagnoses the comparisons between an `int` and `long` when compiling for a 32-bit target as tautological, but not when compiling for 64-bit targets. The underlying problem is obvious: data model. In most cases, 64-bit target is `LP64` (`int` is 32-bit, `long` and pointer are 64-bit), and the 32-bit target is `ILP32` (`int`, `long`, and pointer are 32-bit). I.e. the common pattern is: (pseudocode) ``` #include <limits> #include <cstdint> int main() { using T1 = long; using T2 = int; T1 r; if (r < std::numeric_limits<T2>::min()) {} if (r > std::numeric_limits<T2>::max()) {} } ``` As an example, D39149 was trying to fix this diagnostic in libc++, and it was not well-received. This *could* be "fixed", by changing the diagnostics logic to something like `if the types of the values being compared are different, but are of the same size, then do diagnose`, and i even attempted to do so in D39462, but as @rjmccall rightfully commented, that implementation is incomplete to say the least. So to stop causing trouble, and avoid contaminating upcoming release, lets do this workaround: * move these three diags (`warn_unsigned_always_true_comparison`, `warn_unsigned_enum_always_true_comparison`, `warn_tautological_constant_compare`) into it's own `-Wtautological-constant-in-range-compare` * Disable them by default * Make them part of `-Wextra` * Additionally, give `warn_tautological_constant_compare` it's own flag `-Wtautological-type-limit-compare`. I'm not happy about that name, but i can't come up with anything better. This way all three of them can be enabled/disabled either altogether, or one-by-one. Reviewers: aaron.ballman, rsmith, smeenai, rjmccall, rnk, mclow.lists, dim Reviewed By: aaron.ballman, rsmith, dim Subscribers: thakis, compnerd, mehdi_amini, dim, hans, cfe-commits, rjmccall Tags: #clang Differential Revision: https://reviews.llvm.org/D41512 llvm-svn: 321691
* [GlobalISel][Legalizer] Fix legalization of llvm.smul.with.overflowAmara Emerson2018-01-032-6/+52
| | | | | | | | | Previously the code for handling G_SMULO didn't properly check for the signed multiply overflow, instead treating it the same as the unsigned G_UMULO. Fixes PR35800. llvm-svn: 321690
* Mark LWG2824 as complete. We already did it, but I added a test to be sureMarshall Clow2018-01-032-2/+43
| | | | llvm-svn: 321689
* Don't assume that size relocations are always constant.Rafael Espindola2018-01-032-1/+17
| | | | llvm-svn: 321688
* Mark issue #2866 as "nothing to do"Marshall Clow2018-01-031-2/+2
| | | | llvm-svn: 321687
* PR35697: look at the first declaration when determining whether a function orRichard Smith2018-01-032-3/+20
| | | | | | variable is extern "C" in linkage calculations. llvm-svn: 321686
* Implement p0258r2: has_unique_object_representationsMarshall Clow2018-01-034-4/+136
| | | | llvm-svn: 321685
* Produce relocations with weak undef if the section is RW.Rafael Espindola2018-01-032-6/+18
| | | | | | | If a section is RW there is no reason to drop a relocation with a weak undefined symbol. llvm-svn: 321684
* Fix and simplify handling of return type for (generic) lambda conversion ↵Richard Smith2018-01-029-223/+164
| | | | | | | | | | | | | | | | | | | | | | | | | | | | function to function pointer. Previously, we would: * compute the type of the conversion function and static invoker as a side-effect of template argument deduction for a conversion * re-compute the type as part of deduced return type deduction when building the conversion function itself Neither of these turns out to be quite correct. There are other ways to reach a declaration of the conversion function than in a conversion (such as an explicit call or friend declaration), and performing auto deduction causes the function type to be rebuilt in the context of the lambda closure type (which is different from the context in which it originally appeared, resulting in spurious substitution failures for constructs that are valid in one context but not the other, such as the use of an enclosing class's "this" pointer). This patch switches us to use a different strategy: as before, we use the declared type of the operator() to form the type of the conversion function and invoker, but we now populate that type as part of return type deduction for the conversion function. And the invoker is now treated as simply being an implementation detail of building the conversion function, and isn't given special treatment by template argument deduction for the conversion function any more. llvm-svn: 321683
* [analyzer] do not crash with assertion on processing locations of bodyfarmed ↵George Karpenkov2018-01-022-5/+5
| | | | | | | | | | | | | | | functions This addresses an issue introduced in r183451: since `removePiecesWithInvalidLocations` is called *after* `adjustCallLocations`, it is not necessary, and in fact harmful, to have this assertion in adjustCallLocations. Addresses rdar://36170689 Differential Revision: https://reviews.llvm.org/D41680 llvm-svn: 321682
* [llvm-objcopy] Add support for visibilityJake Ehrlich2018-01-023-5/+42
| | | | | | | I have no clue how this was missed when symbol table support was added. This change ensures that the visibility of symbols is preserved by default. llvm-svn: 321681
* Reland [PPC64] Port to ppc64le - initial versionMartin Storsjo2018-01-0210-5/+931
| | | | | | | | | | | | | | | | | | | | | Initial working version of libunwind for PowerPC 64. Tested on little-endian ppc64 host only. Based on the existing PowerPC 32 code. It supports: - context save/restore (unw_getcontext, unw_init_local, unw_resume) - read/write from/to saved registers - backtrace (unw_step) Patch by Leandro Lupori! Differential Revision: https://reviews.llvm.org/D41386 Now builds with LIBUNWIND_ENABLE_CROSS_UNWINDING=ON should work. llvm-svn: 321680
* Don't use a strict larger-than comparison in the check_fit/does_fit static ↵Martin Storsjo2018-01-021-1/+1
| | | | | | | | | | | | | | assert For builds that only target one architecture, this was required to be an exact match, while it previously required the allocation to be strictly larger than the largest concrete one. Requiring it to be larger than on equal should be enough. This makes it more straightforward to update _LIBUNWIND_CONTEXT_SIZE and _LIBUNWIND_CURSOR_SIZE. llvm-svn: 321679
* Revert `rL321667: [PPC64] Port to ppc64le - initial version`Tim Shen2018-01-0210-931/+5
| | | | | | Differential Revision: https://reviews.llvm.org/D41386 llvm-svn: 321678
* [asan] Restore asan_device_setup compatibility with older libraries.Evgeniy Stepanov2018-01-021-0/+7
| | | | | | | | | | | | | | | | Summary: This way new asan_device_setup, which knows about the quirks of recent releases of Android, can be used with older ASan runtime library (say, from an NDK release). The library is version locked to the compiler, and is often hard or impossible to update. Reviewers: vitalybuka Subscribers: srhines, kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D41679 llvm-svn: 321677
* [WinEH] Allow for multiple terminatepadsReid Kleckner2018-01-024-24/+68
| | | | | | | | | Fixes verifier errors with Windows EH and OpenMP, which injects a terminate scope around parallel blocks. Fixes PR35778 llvm-svn: 321676
* [OMPT] Build runtime with OMPT support by defaultJoachim Protze2018-01-023-7/+23
| | | | | | | | This patch enables OMPT by default if version 50 or later is built and the config says, that OMPT will be supported. Differential Revision: https://reviews.llvm.org/D41508 llvm-svn: 321675
* Handle the case of live 16-bit subregisters in X86FixupBWInstsAndrew Kaylor2018-01-022-82/+121
| | | | | | | Differential Revision: https://reviews.llvm.org/D40524 Change-Id: Ie3a405b28503ceae999f5f3ba07a68fa733a2400 llvm-svn: 321674
* [AArch64] fix typos in comments; NFCSanjay Patel2018-01-021-2/+2
| | | | llvm-svn: 321673
* [ValueTracking] recognize min/max of min/max patternsSanjay Patel2018-01-022-224/+239
| | | | | | | | | | | | | | | | | | | | | | This is part of solving PR35717: https://bugs.llvm.org/show_bug.cgi?id=35717 The larger IR optimization is proposed in D41603, but we can show the improvement in ValueTracking using codegen tests because SelectionDAG creates min/max nodes based on ValueTracking. Any target with min/max ops should show wins here. I chose AArch64 vector ops because they're clean and uniform. Some Alive proofs for the tests (can't put more than 2 tests in 1 page currently because the web app says it's too long): https://rise4fun.com/Alive/WRN https://rise4fun.com/Alive/iPm https://rise4fun.com/Alive/HmY https://rise4fun.com/Alive/CNm https://rise4fun.com/Alive/LYf llvm-svn: 321672
* [DOXYGEN] Fix doxygen and content issues in smmintrin.hDouglas Yung2018-01-021-3/+3
| | | | | | | | | | | - Fix formatting issue due to hyphenated terms at line breaks. - Fix typo This patch was made by Craig Flores Differential Revision: https://reviews.llvm.org/D41520 llvm-svn: 321671
* [DOXYGEN] Fix doxygen and content issues in pmmintrin.hDouglas Yung2018-01-021-3/+3
| | | | | | | | | | - Fix incorrect wording in various intrinsic descriptions. Previously the descriptions used "low-order" and "high-order" when the intended meaning was "even-indexed" and "odd-indexed". This patch was made by Craig Flores Differential Revision: https://reviews.llvm.org/D41518 llvm-svn: 321670
* [DOXYGEN] Fix doxygen and content issues in emmintrin.hDouglas Yung2018-01-021-48/+63
| | | | | | | | | | | | | | | - Fixed innaccurate instruction mappings for various intrinsics. - Fixed description of NaN handling in comparison intrinsics. - Unify description of _mm_store_pd1 to match _mm_store1_pd. - Fix incorrect wording in various intrinsic descriptions. Previously the descriptions used "low-order" and "high-order" when the intended meaning was "even-indexed" and "odd-indexed". - Fix typos. - Add missing italics command (\a) for params and fixed some parameter spellings. This patch was made by Craig Flores Differential Revision: https://reviews.llvm.org/D41516 llvm-svn: 321669
* [AArch64] add tests for min/max of min/max (PR35717); NFCSanjay Patel2018-01-021-0/+1096
| | | | llvm-svn: 321668
* [PPC64] Port to ppc64le - initial versionMartin Storsjo2018-01-0210-5/+931
| | | | | | | | | | | | | | | | | | Initial working version of libunwind for PowerPC 64. Tested on little-endian ppc64 host only. Based on the existing PowerPC 32 code. It supports: - context save/restore (unw_getcontext, unw_init_local, unw_resume) - read/write from/to saved registers - backtrace (unw_step) Patch by Leandro Lupori! Differential Revision: https://reviews.llvm.org/D41386 llvm-svn: 321667
* One more (should be) inline variable that is defined in the dylibMarshall Clow2018-01-021-3/+3
| | | | llvm-svn: 321666
* Suppress undefined-template warnings when the pattern is declared in a ↵Nick Lewycky2018-01-022-2/+15
| | | | | | | | system header. The way to fix an undefined-template warning is to add lines to the header file that defines the template pattern. We should suppress the warnings when the template pattern is in a system header because we don't expect users to edit those. llvm-svn: 321665
* Un-inline a few more variables that are exported from the dylib.Marshall Clow2018-01-022-11/+11
| | | | llvm-svn: 321664
* Temporarily revert the inlining of 'piecewise_construct' because it is ↵Marshall Clow2018-01-021-1/+1
| | | | | | exported from the dylib. llvm-svn: 321663
* [AArch64][GlobalISel] Fix assert fail with unknown intrinsic.Amara Emerson2018-01-022-5/+18
| | | | | | | | A call may have an intrinsic name but not have a valid intrinsic ID, for example with llvm.invariant.group.barrier. If so, treat it as a normal call like FastISel does. llvm-svn: 321662
* A couple more inlined variables that I missed the first timeMarshall Clow2018-01-022-8/+14
| | | | llvm-svn: 321661
* [Sema] Don't emit the -Wstrict-prototypes warning for variadic functions.Volodymyr Sapsai2018-01-022-1/+7
| | | | | | | | | | | | | | rdar://problem/33251668 Reviewers: arphaman, ahatanak Reviewed By: arphaman Subscribers: ptitei, cfe-commits Differential Revision: https://reviews.llvm.org/D41528 llvm-svn: 321660
* [opt-viewer] Check for pygments.lexer.c_cppJonas Hahnfeld2018-01-021-2/+6
| | | | | | | | | Some systems still don't have this module which was introduced in version 2.0 (CentOS 7, sigh). Differential Revision: https://reviews.llvm.org/D41611 llvm-svn: 321659
* Implement most of P0607: Inline Variables for the Standard Library. This ↵Marshall Clow2018-01-0215-217/+295
| | | | | | involved marking a lot of variables as inline (but only for C++17 and later). llvm-svn: 321658
* Align SHT_NOBITS sections is they are the first on a PT_LOAD.Rafael Espindola2018-01-022-10/+34
| | | | | | | | | | | | | | | | | | | We normally want to ignore SHT_NOBITS sections when computing offsets. The sh_offset of section itself seems to be irrelevant and - If the section is in the middle of a PT_LOAD, it will make no difference on the computed offset of the followup section. - If it is in the end of a PT_LOAD, we want to avoid its alignment changing the offset of the followup sections. The issue is if it is at the start of the PT_LOAD. In that case we do have to align it so that the following sections have congruent address and offset module the page size. We were not handling this case. This should fix freebsd kernel link. llvm-svn: 321657
* [x86] allow pairs of PCMPEQ for vector-sized integer equality comparisons ↵Sanjay Patel2018-01-022-95/+227
| | | | | | | | | | | | | | | | | | (PR33325) This is an extension of D31156 with the goal that we'll allow memcmp() == 0 expansion for x86 to use 2 pairs of loads per block. The memcmp expansion pass (formerly part of CGP) will generate this kind of pattern with oversized integer compares, so we want to transform these into x86-specific vector nodes before legalization splits things into scalar chunks. See PR33325 for more details: https://bugs.llvm.org/show_bug.cgi?id=33325 Differential Revision: https://reviews.llvm.org/D41618 llvm-svn: 321656
* [AArch64][GlobalISel] Enable GlobalISel at -O0 by defaultAmara Emerson2018-01-0244-56/+67
| | | | | | | | | | | Tests updated to explicitly use fast-isel at -O0 instead of implicitly. This change also allows an explicit -fast-isel option to override an implicitly enabled global-isel. Otherwise -fast-isel would have no effect at -O0. Differential Revision: https://reviews.llvm.org/D41362 llvm-svn: 321655
* [Core/Debugger] Remove some code that doesn't compile anymore.Davide Italiano2018-01-021-69/+0
| | | | llvm-svn: 321654
* [BasicBlockUtils] Check for unreachable preds before updating LI in ↵Anna Thomas2018-01-022-0/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | UpdateAnalysisInformation Summary: We are incorrectly updating the LI when loop-simplify generates dedicated exit blocks for a loop. The issue is that there's an implicit assumption that the Preds passed into UpdateAnalysisInformation are reachable. However, this is not true and breaks LI by incorrectly updating the header of a loop. One such case is when we generate dedicated exits when the exit block is a landing pad (through SplitLandingPadPredecessors). There maybe other cases as well, since we do not guarantee that Preds passed in are reachable basic blocks. The added test case shows how loop-simplify breaks LI for the outer loop (and DT in turn) after we try to generate the LoopSimplifyForm. Reviewers: davide, chandlerc, sanjoy Reviewed By: davide Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D41519 llvm-svn: 321653
* [MacOSX-Kernel] Remove broken KDP_IMAGEPATH support.Davide Italiano2018-01-021-37/+0
| | | | llvm-svn: 321652
* [ARM64] Remove unused function. NFCI.Davide Italiano2018-01-021-13/+0
| | | | llvm-svn: 321651
* [Hexagon] Fix generation of vector sign extensionsKrzysztof Parzyszek2018-01-023-33/+75
| | | | llvm-svn: 321650
* Revert r321089: "[DAG] Elide overlapping store" (and subsequent fix in r321204)Daniel Jasper2018-01-022-23/+24
| | | | | | | Our internal testing has revealed has discovered bugs in PPC builds. I have forward reproduction instructions to the original author (Nirav). llvm-svn: 321649
* NFC. Add description comments to Function headerDmitry Venikov2018-01-021-0/+7
| | | | | | | | | | | | Reviewers: ruiu, davidxl, silvas, brzycki Reviewed By: brzycki Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D41609 llvm-svn: 321648
* Revert "ASan+operator new[]: Fix operator new[] cookie poisoning"Filipe Cabecinhas2018-01-022-10/+3
| | | | | | | | This reverts r321645. I missed a compiler-rt test that needs updating. llvm-svn: 321647
* [AArch64][AsmParser] Add isScalarReg() and repurpose isReg()Sander de Smalen2018-01-021-10/+14
| | | | | | | | | | | | | | | | | Summary: isReg() in AArch64AsmParser.cpp is a bit of a misnomer, and would be better named 'isScalarReg()' instead. Patch [1/3] in a series to add operand constraint checks for SVE's predicated ADD/SUB. Reviewers: rengolin, mcrosier, evandro, fhahn, echristo Reviewed By: fhahn Subscribers: aemerson, javed.absar, llvm-commits, kristof.beyls Differential Revision: https://reviews.llvm.org/D41445 llvm-svn: 321646
* ASan+operator new[]: Fix operator new[] cookie poisoningFilipe Cabecinhas2018-01-022-3/+10
| | | | | | | | | | | | | | | | | | Summary: The C++ Itanium ABI says: No cookie is required if the new operator being used is ::operator new[](size_t, void*). We should only avoid poisoning the cookie if we're calling this operator, not others. This is dealt with before the call to InitializeArrayCookie. Reviewers: rjmccall, kcc, rsmith Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D41301 llvm-svn: 321645
OpenPOWER on IntegriCloud