summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [GlobalISel][IRTranslator] Fix switch table lowering to use signed LE not ↵Amara Emerson2019-09-242-4/+46
| | | | | | | | | | | | unsigned. We were miscompiling switch value comparisons with the wrong signedness, which shows up when we have things like switch case values with i1 types, which end up being legalized incorrectly. Fixes PR43383 llvm-svn: 372675
* [llvm-cov] NFC: Specify a specific C++ standard in the test.Artem Dergachev2019-09-241-3/+6
| | | | | | Makes life easier for downstream users with customized default standard. llvm-svn: 372674
* [MemorySSA] Update Phi insertion.Alina Sbirlea2019-09-232-43/+71
| | | | | | | | | | | | | | | | | | | | | | Summary: MemoryPhis may be needed following a Def insertion inthe IDF of all the new accesses added (phis + potentially a def). Ensure this also occurs when only the new MemoryPhis are the defining accesses. Note: The need for computing IDF here is because of new Phis added with edges incoming from unreachable code, Phis that had previously been simplified. The preferred solution is to not reintroduce such Phis. This patch is the needed fix while working on the preferred solution. Reviewers: george.burgess.iv Subscribers: Prazek, sanjoy.google, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67927 llvm-svn: 372673
* Revert "Support for DWARF-5 C++ language tags."Jonas Devlieghere2019-09-239-45/+8
| | | | | | This reverts commit bf9c8ffb54943c6d77398adbedddf05ef9724007. llvm-svn: 372672
* [NFC][InstCombine] Add tests for shifty implementation of clamping.Huihui Zhang2019-09-232-0/+473
| | | | | | | | | | | | | | | | | | | | | | | Summary: Clamp negative to zero and clamp positive to allOnes are common operation in image saturation. Add tests for shifty implementation of clamping, as prepare work for folding: and(ashr(subNSW(Y, X), ScalarSizeInBits(Y)-1), X) --> X s> 0 ? X : 0; or(ashr(subNSW(Y, X), ScalarSizeInBits(Y)-1), X) --> X s> Y ? allOnes : X. Reviewers: lebedev.ri, efriedma, spatel, kparzysz, bcahoon Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67798 llvm-svn: 372671
* [Make] Add support for building NeXT-style frameworksJonas Devlieghere2019-09-231-11/+40
| | | | | | | | | | This patch extends the Makefile.rules to build NeXT-style frameworks. It also fixes a bug in the clean logic that would accidentally delete the .mm source file instead of the .o object file. Thanks a lot to Adrian who was instrumental is getting this to work! llvm-svn: 372669
* [NFCI] Return PathSensitiveBugReport where appropriateAlex Langford2019-09-232-7/+10
| | | | | | | | | | Some compilers have trouble converting unique_ptr<PathSensitiveBugReport> to unique_ptr<BugReport> causing some functions to fail to compile. Changing the return type of the functions that fail to compile does not appear to have any issues. I ran into this issue building with clang 3.8 on Ubuntu 16.04. llvm-svn: 372668
* HotColdSplitting: invalidate the AssumptionCache on splitSaleem Abdulrasool2019-09-232-0/+43
| | | | | | | | | | | When a cold path is outlined, the value tracking in the assumption cache may be invalidated due to the code motion. We would previously trip an assertion in subsequent passes (but required the passes to happen in a single run as the assumption cache is shared across the passes). Invalidating the cache ensures that we get the correct information when needed with the legacy pass manager as well. llvm-svn: 372667
* [llvm-lipo] Add support for archives Alexander Shaposhnikov2019-09-232-140/+230
| | | | | | | | | | | Add support for creating universal binaries which can contain an archive. Differential revision: https://reviews.llvm.org/D67758 Test plan: make check-all llvm-svn: 372666
* [SampleFDO] Treat names in profile as not cold only when profile symbol listWei Mi2019-09-232-29/+44
| | | | | | | | | | | | | | is available In rL372232, we treated names showing up in profile as not cold when profile-sample-accurate is enabled. This caused 70k size regression in Chrome/Android. The patch put a guard and only enable the change when profile symbol list is available, i.e., keep the old behavior when profile symbol list is not available. Differential Revision: https://reviews.llvm.org/D67931 llvm-svn: 372665
* [Diagnostics] Warn for enum constants in bool context ↵David Bolvansky2019-09-233-2/+47
| | | | | | | | (-Wint-in-bool-context; GCC compatibility) Extracted from D63082. llvm-svn: 372664
* Support for DWARF-5 C++ language tags.Adrian Prantl2019-09-239-8/+45
| | | | | | | | | | This patch provides support for DW_LANG_C_plus_plus_11, DW_LANG_C_plus_plus_14 tags in the Clang C++ frontend. Patch by Sourabh Singh Tomar! Differential Revision: https://reviews.llvm.org/D67613 llvm-svn: 372663
* Fix uninitialized variable warning. NFCI.Simon Pilgrim2019-09-231-1/+1
| | | | llvm-svn: 372662
* [X86] Reduce the number of unique check prefixes in memset-nonzero.ll. NFCCraig Topper2019-09-231-70/+3
| | | | | | | The avx512 with prefer-256-bit generates the same code as AVX2 so just reuse that prefix. llvm-svn: 372661
* [lld][WebAssembly] Preserve symbol flags in --relocatable outputSam Clegg2019-09-235-28/+14
| | | | | | | | Fixes https://github.com/emscripten-core/emscripten/issues/8879 Differential Revision: https://reviews.llvm.org/D67729 llvm-svn: 372660
* [LLDB] [Windows] Map COFF ARM machine ids to the right triple architecturesMartin Storsjo2019-09-231-0/+4
| | | | | | Differential Revision: https://reviews.llvm.org/D67913 llvm-svn: 372658
* [LLDB] [PECOFF] Recognize arm64 executablesMartin Storsjo2019-09-231-0/+5
| | | | | | Differential Revision: https://reviews.llvm.org/D67912 llvm-svn: 372657
* [LLDB] Rework a MinGW build fix from D65691Martin Storsjo2019-09-231-3/+1
| | | | | | | | | | | That change didn't contain any explanation for this bit. There shouldn't be any need for a check for MinGW ifdefs here, as long as the include uses lowercase windows.h (as is used consistently elsewhere in the llvm projects). Differential Revision: https://reviews.llvm.org/D67894 llvm-svn: 372656
* [WebAssembly] vNxM.load_splat instructionsThomas Lively2019-09-236-1/+785
| | | | | | | | | | | | | | | | | | | | | | Summary: Adds the new load_splat instructions as specified at https://github.com/WebAssembly/simd/blob/master/proposals/simd/SIMD.md#load-and-splat. DAGISel does not allow matching multiple copies of the same load in a single pattern, so we use a new node in WebAssemblyISD to wrap loads that should be splatted. Depends on D67783. Reviewers: aheejin Subscribers: dschuff, sbc100, jgravelle-google, hiraditya, sunfish, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67784 llvm-svn: 372655
* [InstCombine] foldOrOfICmps(): Acquire SimplifyQuery with set CxtIRoman Lebedev2019-09-231-2/+4
| | | | | | Extracted from https://reviews.llvm.org/D67849#inline-610377 llvm-svn: 372654
* [InstCombine] foldAndOfICmps(): Acquire SimplifyQuery with set CxtIRoman Lebedev2019-09-231-2/+4
| | | | | | Extracted from https://reviews.llvm.org/D67849#inline-610377 llvm-svn: 372653
* File::SetDescriptor() should require optionsJonas Devlieghere2019-09-2311-27/+54
| | | | | | | | | | | | | | | | | | | | | | lvm_private::File::GetStream() can fail if m_options == 0 It's not clear from the header a File created with a descriptor will be not be usable by many parts of LLDB unless SetOptions is also called, but it is. This is because those parts of LLDB rely on GetStream() to use the file, and that in turn relies on calling fdopen on the descriptor. When calling fdopen, GetStream relies on m_options to determine the access mode. If m_options has never been set, GetStream() will fail. This patch adds options as a required argument to File::SetDescriptor and the corresponding constructor. Patch by: Lawrence D'Anna Differential revision: https://reviews.llvm.org/D67792 llvm-svn: 372652
* [mips] Support elf32btsmipn32_fbsd / elf32ltsmipn32_fbsd emulationsSimon Atanasyan2019-09-232-1/+8
| | | | | | Patch by Kyle Evans. llvm-svn: 372651
* [mips] Add tests to check MIPS FreeBSD emulations. NFCSimon Atanasyan2019-09-231-0/+36
| | | | llvm-svn: 372650
* [mips] Reformat test case to simplify addition new tests. NFCSimon Atanasyan2019-09-231-27/+48
| | | | llvm-svn: 372649
* [WebAssembly] Remove unused memory instructions and patternsThomas Lively2019-09-233-130/+0
| | | | | | | | | | | | | | | | Summary: Removes duplicated SIMD loads and store instructions and removes patterns involving GlobalAddresses that were not used in any tests. Reviewers: aheejin, sunfish Subscribers: dschuff, sbc100, jgravelle-google, hiraditya, jfb, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67783 llvm-svn: 372648
* [InstCombine] Annotate strndup calls with dereferenceable_or_nullDavid Bolvansky2019-09-233-11/+20
| | | | | | "Implementations are free to malloc() a buffer containing either (size + 1) bytes or (strnlen(s, size) + 1) bytes. Applications should not assume that strndup() will allocate (size + 1) bytes when strlen(s) is smaller than size." llvm-svn: 372647
* [ASTImporter] 2nd attempt to fix Windows buildbot test errorsGabor Marton2019-09-231-2/+2
| | | | llvm-svn: 372646
* [X86] Use TargetConstant for condition code on X86ISD::SETCC/CMOV/BRCOND nodes.Craig Topper2019-09-234-141/+136
| | | | | | | | | | This removes the need for ConvertToTarget opcodes in the isel table. It's also consistent with the recent changes to use TargetConstant for intrinsic nodes that always take immediates. Differential Revision: https://reviews.llvm.org/D67902 llvm-svn: 372645
* [Host] File::GetWaitableHandle() should call fileno()Jonas Devlieghere2019-09-233-1/+38
| | | | | | | | | | | | If the file has m_stream, it may not have a m_descriptor. GetWaitableHandle() should call GetDescriptor(), which will call fileno(), so it will get waitable descriptor whenever one is available. Patch by: Lawrence D'Anna Differential revision: https://reviews.llvm.org/D67789 llvm-svn: 372644
* [ABISysV] Fix regression for Simulator and MacABIJonas Devlieghere2019-09-231-7/+23
| | | | | | | | | | | | | | | The ABISysV ABI was refactored in r364216 to support the Windows ABI for x86_64. In particular it changed ABISysV_x86_64::CreateInstance to switch on the OS type. This breaks debugging MacABI apps as well as apps in the simulator. This adds back the necessary cases. We have a test on Github that exercises this code path and which I'd like to upstream once the remaining MacABI parts become available in clang. Differential revision: https://reviews.llvm.org/D67869 llvm-svn: 372642
* [TableGen] Emit OperandType enums for RegisterOperands/RegisterClassesAditya Nandakumar2019-09-232-8/+31
| | | | | | | | | | | | | | https://reviews.llvm.org/D66773 The OpTypes::OperandType was creating an enum for all records that inherit from Operand, but in reality there are operands for instructions that inherit from other types too. In particular, RegisterOperand and RegisterClass. This commit adds those types to the list of operand types that are tracked by the OperandType enum. Patch by: nlguillemot llvm-svn: 372641
* [Sema] Fix the atomic expr rebuilding order.Michael Liao2019-09-234-32/+116
| | | | | | | | | | | | | | | | Summary: - Rearrange the atomic expr order to the API order when rebuilding atomic expr during template instantiation. Reviewers: erichkeane Subscribers: jfb, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D67924 llvm-svn: 372640
* [IR] Add getExtendedType() to IntegerType and Type (dispatching to ↵Roman Lebedev2019-09-233-13/+24
| | | | | | IntegerType or VectorType) llvm-svn: 372638
* [InstCombine] dropRedundantMaskingOfLeftShiftInput(): improve commentRoman Lebedev2019-09-231-4/+4
| | | | llvm-svn: 372637
* [SLC] Convert some strndup calls to strdup callsDavid Bolvansky2019-09-237-10/+104
| | | | | | | | | | | | | | | | | | | | | Summary: Motivation: - If we can fold it to strdup, we should (strndup does more things than strdup). - Annotation mechanism. (Works for strdup well). strdup and strndup are part of C 20 (currently posix fns), so we should optimize them. Reviewers: efriedma, jdoerfert Reviewed By: jdoerfert Subscribers: lebedev.ri, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67679 llvm-svn: 372636
* [OPENMP]Use standard parsing for 'match' clause, NFC.Alexey Bataev2019-09-239-5/+45
| | | | | | | Reused standard clauses parsing scheme for parsing/matching 'match' clause in 'declare variant' directive. llvm-svn: 372635
* [lldb-suite] TestCallOverriddenMethod.py is now passing on WindowsStella Stamenova2019-09-231-1/+0
| | | | | | The test is now passing, so remove the expected failure. No other tests associated with the bug are passing, though, so only remove expected failure from this one test llvm-svn: 372634
* [ASTImporter] Attempt to fix Windows buildbot test errorsGabor Marton2019-09-231-2/+2
| | | | llvm-svn: 372633
* [libc++] Mark CTAD tests as not failing on AppleClang 10.0.1Louis Dionne2019-09-238-8/+8
| | | | | | They do fail on AppleClang 10.0.0, but not AppleClang 10.0.1 llvm-svn: 372632
* NFC: Fix a poorly-written testErik Pilkington2019-09-231-7/+7
| | | | | | The author of r364954 foolishly forgot that == binds tighter than ?: llvm-svn: 372631
* [InstCombine] dropRedundantMaskingOfLeftShiftInput(): pat. c/d/e with mask ↵Roman Lebedev2019-09-234-21/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (PR42563) Summary: If we have a pattern `(x & (-1 >> maskNbits)) << shiftNbits`, we already know (have a fold) that will drop the `& (-1 >> maskNbits)` mask iff `(shiftNbits-maskNbits) s>= 0` (i.e. `shiftNbits u>= maskNbits`). So even if `(shiftNbits-maskNbits) s< 0`, we can still fold, we will just need to apply a **constant** mask afterwards: ``` Name: c, normal+mask %t0 = lshr i32 -1, C1 %t1 = and i32 %t0, %x %r = shl i32 %t1, C2 => %n0 = shl i32 %x, C2 %n1 = i32 ((-(C2-C1))+32) %n2 = zext i32 %n1 to i64 %n3 = lshr i64 -1, %n2 %n4 = trunc i64 %n3 to i32 %r = and i32 %n0, %n4 ``` https://rise4fun.com/Alive/gslRa Naturally, old `%masked` will have to be one-use. This is not valid for pattern f - where "masking" is done via `ashr`. https://bugs.llvm.org/show_bug.cgi?id=42563 Reviewers: spatel, nikic, xbolva00 Reviewed By: spatel Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67725 llvm-svn: 372630
* [InstCombine] dropRedundantMaskingOfLeftShiftInput(): pat. a/b with mask ↵Roman Lebedev2019-09-233-15/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (PR42563) Summary: And this is **finally** the interesting part of that fold! If we have a pattern `(x & (~(-1 << maskNbits))) << shiftNbits`, we already know (have a fold) that will drop the `& (~(-1 << maskNbits))` mask iff `(maskNbits+shiftNbits) u>= bitwidth(x)`. But that is actually ignorant, there's more general fold here: In this pattern, `(maskNbits+shiftNbits)` actually correlates with the number of low bits that will remain in the final value. So even if `(maskNbits+shiftNbits) u< bitwidth(x)`, we can still fold, we will just need to apply a **constant** mask afterwards: ``` Name: a, normal+mask %onebit = shl i32 -1, C1 %mask = xor i32 %onebit, -1 %masked = and i32 %mask, %x %r = shl i32 %masked, C2 => %n0 = shl i32 %x, C2 %n1 = add i32 C1, C2 %n2 = zext i32 %n1 to i64 %n3 = shl i64 -1, %n2 %n4 = xor i64 %n3, -1 %n5 = trunc i64 %n4 to i32 %r = and i32 %n0, %n5 ``` https://rise4fun.com/Alive/F5R Naturally, old `%masked` will have to be one-use. Similar fold exists for patterns c,d,e, will post patch later. https://bugs.llvm.org/show_bug.cgi?id=42563 Reviewers: spatel, nikic, xbolva00 Reviewed By: spatel Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D67677 llvm-svn: 372629
* [BreakFalseDeps] ignore function with minsize attributeSanjay Patel2019-09-235-7/+16
| | | | | | | | | | | | This came up in the x86-specific: https://bugs.llvm.org/show_bug.cgi?id=43239 ...but it is a general problem for the BreakFalseDeps pass. Dependencies may be broken by adding some other instruction, so that should be avoided if the overall goal is to minimize size. Differential Revision: https://reviews.llvm.org/D67363 llvm-svn: 372628
* [Clang-doc] NFC: Fixed link to llvm bugs in documentationShaurya Gupta2019-09-231-1/+1
| | | | llvm-svn: 372627
* [SLP] Fix for PR31847: Assertion failed: (isLoopInvariant(Operands[i], L) && ↵Alexey Bataev2019-09-2322-1334/+379
| | | | | | | | | | | | | | | | | | | | | "SCEVAddRecExpr operand is not loop-invariant!") Summary: Initially SLP vectorizer replaced all going-to-be-vectorized instructions with Undef values. It may break ScalarEvaluation and may cause a crash. Reworked SLP vectorizer so that it does not replace vectorized instructions by UndefValue anymore. Instead vectorized instructions are marked for deletion inside if BoUpSLP class and deleted upon class destruction. Reviewers: mzolotukhin, mkuper, hfinkel, RKSimon, davide, spatel Subscribers: RKSimon, Gerolf, anemet, hans, majnemer, llvm-commits, sanjoy Differential Revision: https://reviews.llvm.org/D29641 llvm-svn: 372626
* [InstCombine] foldUnsignedUnderflowCheck(): s/Subtracted/ZeroCmpOp/Roman Lebedev2019-09-231-7/+7
| | | | llvm-svn: 372625
* Fix __is_fundamental to accept nullptr_tZoe Carver2019-09-232-0/+2
| | | | | | | | | | | | | | Summary: This patch updates the __is_fundamental builtin type trait to return true for nullptr_t. Reviewers: rsmith, EricWF, efriedma, craig.topper, erichkeane Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D67899 llvm-svn: 372624
* [OPENMP]Fix PR43355: DO not emit target calls if only -fopenmp-targetsAlexey Bataev2019-09-232-0/+14
| | | | | | | | | is not provided. We should not emit any target-dependent code if only -fopenmp flag is used and device targets are not provided to prevent compiler crash. llvm-svn: 372623
* [AMDGPU][MC] Corrected handling of relocatable expressionsDmitry Preobrazhensky2019-09-233-12/+62
| | | | | | | | | | See bug 43359: https://bugs.llvm.org//show_bug.cgi?id=43359 Reviewers: rampitec Differential Revision: https://reviews.llvm.org/D67829 llvm-svn: 372622
OpenPOWER on IntegriCloud