- Mar 21, 2020
-
-
Vedant Kumar authored
advanceToLowerBound moves an iterator to the first bit set at, or after, the given index. This can be faster than doing IntervalMap::find. rdar://60046261 Differential Revision: https://reviews.llvm.org/D76466
-
Vedant Kumar authored
Avoid making a heap allocation when constructing a CoalescingBitVector. This reduces time spent in LiveDebugValues when compiling sqlite3 by 700ms (0.5% of the total User Time). rdar://60046261 Differential Revision: https://reviews.llvm.org/D76465
-
Siva Chandra Reddy authored
We have moved away from directories for entrypoints but this function was not moved out. Submitting as obvious.
-
Louis Dionne authored
Instead of considering all the .dat files to be dependencies of a test, only consider those that are listed in FILE_DEPENDENCIES.
-
Alexey Bataev authored
Added parsing/sema/serialization support for inclusive clause in scan directive.
-
Fangrui Song authored
UseInitArray is now the CC1 default but TargetLoweringObjectFileELF::UseInitArray still defaults to false. The following two unknown OS target triples continue using .ctors/.dtors because InitializeELF is not called. clang -target i386 -c a.c clang -target x86_64 -c a.c This cleanup fixes this as a bonus. Differential Revision: https://reviews.llvm.org/D71360
-
Fangrui Song authored
MIRParser uses MC and transitively calls MCObjectFileInfo::getObjectFileType(). TargetLoweringObjectFile::Initialize should be called beforehand to initialize MCObjectFileInfo::Env. This manifested as a -fsanitize=undefined test/CodeGen/MIR/X86/instr-symbols-and-mcsymbol-operands.mir failure when D71360/aa5ee8f2 was committed.
-
Vedant Kumar authored
The original test case from PR45181 triggers a DIExpression combination that wasn't fixed in D76164.
-
Nicolas Vasilache authored
The Vector Dialect [document](https://mlir.llvm.org/docs/Dialects/Vector/) discusses the vector abstractions that MLIR supports and the various tradeoffs involved. One of the layer that is missing in OSS atm is the Hardware Vector Ops (HWV) level. This revision proposes an AVX512-specific to add a new Dialect/Targets/AVX512 Dialect that would directly target AVX512-specific intrinsics. Atm, we rely too much on LLVM’s peephole optimizer to do a good job from small insertelement/extractelement/shufflevector. In the future, when possible, generic abstractions such as VP intrinsics should be preferred. The revision will allow trading off HW-specific vs generic abstractions in MLIR. Differential Revision: https://reviews.llvm.org/D75987
-
Adrian Prantl authored
-
Sterling Augustine authored
-
Nikita Popov authored
Ideally SimplifyDemanded should compute the same known bits as computeKnownBits(). This patch addresses one discrepancy, where ValueTracking is more powerful: If we have a shl nsw shift, we know that the sign bit of the input and output must be the same. If this results in a conflict, the result is poison. This is implemented in https://github.com/llvm-mirror/llvm/blob/2c4ca6832fa6b306ee6a7010bfb80a3f2596f824/lib/Analysis/ValueTracking.cpp#L1175-L1179 and https://github.com/llvm-mirror/llvm/blob/2c4ca6832fa6b306ee6a7010bfb80a3f2596f824/lib/Analysis/ValueTracking.cpp#L904-L908. This implements the same basic logic in SimplifyDemanded. It's slightly stronger, because I return undef instead of zero for the poison case (which is not an option inside ValueTracking). As mentioned in https://reviews.llvm.org/D75801#inline-698484, we could detect poison in more cases, this just establishes parity with the existing logic. Differential Revision: https://reviews.llvm.org/D76489
-
Anton Kolesov authored
If LLDB attaches to an already running target, then structure SBAttachInfo is used instead of SBLaunchInfo. lldb-vscode function request_attach sets some values to g_vsc.launch_info, however this field is then not passed anywhere, so this action has no effect. This commit removes invocation of SBLaunchInfo::SetDetachOnError, which has no equivalent in SBAttachInfo. File package.json doesn't describe detachOnError property for "attach" request type, therefore it is not needed to update it. Differential Revision: https://reviews.llvm.org/D76351
-
Feng Liu authored
This is an edge case where the input type is a primitive type. Differential Revision: https://reviews.llvm.org/D76442
-
Gabor Marton authored
-
Gabor Marton authored
Reviewers: NoQ, Szelethus, balazske, gamesh411, baloghadamsoftware, steakhal Subscribers: whisperity, xazax.hun, szepet, rnkovacs, a.sidorin, mikhail.ramalho, donat.nagy, dkrupp, Charusso, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D75063
-
Pirama Arumuga Nainar authored
Summary: It can be the case that a vector type is legal but the corresponding scalar type is not legal for an architecture (i8 vs. v16i8 on AArch64). Check if the scalar type created when folding truncate(build_vector(x,y)) -> build_vector(truncate(x),truncate(y)) is legal if we are running after the type legalizer. This fixes https://github.com/android/ndk/issues/1207. Reviewers: RKSimon, srhines Subscribers: kristof.beyls, hiraditya, danielkiss, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D76312
-
Sean Fertile authored
Adds/changes some types in the ByVal cc test so that they aren't all structs of arrays of bytes, and adds testing for passing multiple ByVal arguments.
-
Craig Topper authored
The combine tries to put the broadcast in either the integer or fp domain to match the bitcast domain. But we can only do this if the broadcast size is 32 or larger.
-
Reid Kleckner authored
FinishThunk, and the invariant of setting and then unsetting CurCodeDecl, was added in 7f416cc4 (2015). The invariant didn't exist when I added this musttail codepath in ab2090d1 (2014). Recently in 28328c37, I started using this codepath on non-Windows platforms, and users reported problems during release testing (PR44987). The issue was already present for users of EH on i686-windows-msvc, so I added a test for that case as well. Reviewed By: hans Differential Revision: https://reviews.llvm.org/D76444
-
- Mar 20, 2020
-
-
Erich Keane authored
Discovered by a downstream user, we found that the CallGraph ignores callees unless they are defined. This seems foolish, and prevents combining the report with other reports to create unified reports. Additionally, declarations contain information that is likely useful to consumers of the CallGraph. This patch implements this by splitting the includeInGraph function into two versions, the current one plus one that is for callees only. The only difference currently is that includeInGraph checks for a body, then calls includeCalleeInGraph. Differential Revision: https://reviews.llvm.org/D76435
-
Simon Pilgrim authored
[InstCombine][X86] simplifyX86immShift - convert variable in-range vector shift by scalar amounts to generic shifts (PR40391) The sll/srl/sra scalar vector shifts can be replaced with generic shifts if the shift amount is known to be in range. This also required public DemandedElts variants of llvm::computeKnownBits to be exposed (PR36319).
-
Simon Tatham authored
Summary: I've implemented them as target-specific IR intrinsics rather than using `@llvm.experimental.vector.reduce.add`, on the grounds that the 'experimental' intrinsic doesn't currently have much code generation benefit, and my replacements encapsulate the sign- or zero-extension so that you don't expose the illegal MVE vector type (`<4 x i64>`) in IR. The machine instructions come in two versions: with and without an input accumulator. My new IR intrinsics, like the 'experimental' one, don't take an accumulator parameter: we represent that by just adding on the input value using an ordinary i32 or i64 add. So if you write the `vaddvaq` C-language intrinsic with an input accumulator of zero, it can be optimised to VADDV, and conversely, if you write something like `x += vaddvq(y)` then that can be combined into VADDVA. Most of this is achieved in isel lowering, by converting these IR intrinsics into the existing `ARMISD::VADDV` family of custom SDNode types. For the difficult case (64-bit accumulators), isel lowering already implements the optimization of folding an addition into a VADDLV to make a VADDLVA; so once we've made a VADDLV, our job is already done, except that I had to introduce a parallel set of ARMISD nodes for the //predicated// forms of VADDLV. For the simpler VADDV, we handle the predicated form by just leaving the IR intrinsic alone and matching it in an ordinary dag pattern. Reviewers: dmgreen, MarkMurrayARM, miyuki, ostannard Reviewed By: dmgreen Subscribers: kristof.beyls, hiraditya, danielkiss, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D76491
-
Simon Tatham authored
Summary: I've implemented these as target-specific IR intrinsics, because they're not //quite// enough like @llvm.experimental.vector.reduce.min (which doesn't take the extra scalar parameter). Also this keeps the predicated and unpredicated versions looking similar, and the floating-point minnm/maxnm versions fold into the same schema. We had a couple of min/max reductions already implemented, from the initial pathfinding exercise in D67158. Those were done by having separate IR intrinsic names for the signed and unsigned integer versions; as part of this commit, I've changed them to use a flag parameter indicating signedness, which is how we ended up deciding that the rest of the MVE intrinsics family ought to work. So now hopefully the ewhole lot is consistent. In the new llc test, the output code from the `v8f16` test functions looks quite unpleasant, but most of it is PCS lowering (you can't pass a `half` directly in or out of a function). In other circumstances, where you do something else with your `half` in the same function, it doesn't look nearly as nasty. Reviewers: dmgreen, MarkMurrayARM, miyuki, ostannard Reviewed By: MarkMurrayARM Subscribers: kristof.beyls, hiraditya, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D76490
-
Marcel Hlopko authored
Summary: This increases the coverage for things that differ between Linux and Windows, such as -fdelayed-template-parsing. This would have prevented the rollback of https://reviews.llvm.org/D76346. While at it, update -std=c++11 to c++17 for the test. Reviewers: gribozavr2 Reviewed By: gribozavr2 Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D76497
-
Gabor Marton authored
Differential Revision: https://reviews.llvm.org/D73898
-
Sean Fertile authored
The zero sized structs force creation of a stack object of size 1, align 8 in the locals area, but otherwise have no effect on the calling convention code. i.e. They consume no registers or stack space in the paramater save area. The 32-bit codegen has 8 bytes of padding to fit the new stack object so stack size stays the same. 64-bit codegen has no padding in the stack frames allocated so 8 bytes is added, and becuase of 16-byte aligned stack, the stack size increases from 112 bytes to 128.
-
Bjorn Pettersson authored
Summary: For some reason the order in which we call getNegatedExpression for the involved operands, after a call to isCheaperToUseNegatedFPOps, seem to matter. This patch includes a new test case in test/CodeGen/X86/fdiv.ll that crashes if we reverse the order of those calls. Before this patch that could happen depending on which compiler that were used when buildind llvm. With my GCC version (7.4.0) I got the crash, because it seems like it is using a different order for the argument evaluation compared to clang. All other users of isCheaperToUseNegatedFPOps already used this pattern with unfolded/ordered calls to getNegatedExpression, so this patch is aligning visitFDIV with the other use cases. This patch simply deals with the non-determinism for FDIV. While the underlying problem with getNegatedExpression is discussed further in D76439. Reviewers: spatel, RKSimon Reviewed By: spatel Subscribers: hiraditya, mgrang, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D76319
-
Matt Arsenault authored
This is equivalent to llvm.fshr, so legalize the intrinsic to the generic node.
-
Matt Arsenault authored
-
Kostya Kortchinsky authored
Summary: We introduced a way to fallback to the immediately larger size class for the Primary in the event a region was full, but in the event of the largest size class, we would just fail. This change allows to fallback to the Secondary when the last region of the Primary is full. We also expand the trick to all platforms as opposed to being Android only, and update the test to cover the new case. Reviewers: hctim, cferris, eugenis, morehouse, pcc Subscribers: #sanitizers, llvm-commits Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D76430
-
alex-t authored
Summary: Currently we custom select add/sub with carry out to scalar form relying on later replacing them to vector form if necessary. This change enables custom selection code to take the divergence of adde/addc SDNodes into account and select the appropriate form in one step. Reviewers: arsenm, vpykhtin, rampitec Reviewed By: arsenm, vpykhtin Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, kerbowa Differential Revision: https://reviews.llvm.org/D76371
-
Mikhail Maltsev authored
Summary: This patch implements the following CDE intrinsics: int8x16_t __arm_vreinterpretq_s8_u8 (uint8x16_t in); uint16x8_t __arm_vreinterpretq_u16_u8 (uint8x16_t in); int16x8_t __arm_vreinterpretq_s16_u8 (uint8x16_t in); uint32x4_t __arm_vreinterpretq_u32_u8 (uint8x16_t in); int32x4_t __arm_vreinterpretq_s32_u8 (uint8x16_t in); uint64x2_t __arm_vreinterpretq_u64_u8 (uint8x16_t in); int64x2_t __arm_vreinterpretq_s64_u8 (uint8x16_t in); float16x8_t __arm_vreinterpretq_f16_u8 (uint8x16_t in); float32x4_t __arm_vreinterpretq_f32_u8 (uint8x16_t in); These intrinsics are header-only because they reuse the existing MVE vreinterpret clang built-ins. This set is slightly different from the published specification (see https://static.docs.arm.com/101028/0010/ACLE_2019Q4_release-0010.pdf): it includes int8x16_t __arm_vreinterpretq_s8_u8 (uint8x16_t in); which was unintentionally ommitted from the spec, and does not include float64x2_t __arm_vreinterpretq_f64_u8 (uint8x16_t in); The float64x2_t type requires additional implementation effort, and we are not including it yet. Reviewers: simon_tatham, MarkMurrayARM, dmgreen, ostannard Reviewed By: MarkMurrayARM Subscribers: kristof.beyls, danielkiss, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D76300
-
Mikhail Maltsev authored
Summary: This patch implements the following intrinsics: uint8x16_t __arm_vcx1q_u8 (int coproc, uint32_t imm); T __arm_vcx1qa(int coproc, T acc, uint32_t imm); T __arm_vcx2q(int coproc, T n, uint32_t imm); uint8x16_t __arm_vcx2q_u8(int coproc, T n, uint32_t imm); T __arm_vcx2qa(int coproc, T acc, U n, uint32_t imm); T __arm_vcx3q(int coproc, T n, U m, uint32_t imm); uint8x16_t __arm_vcx3q_u8(int coproc, T n, U m, uint32_t imm); T __arm_vcx3qa(int coproc, T acc, U n, V m, uint32_t imm); Most of them are polymorphic. Furthermore, some intrinsics are polymorphic by 2 or 3 parameter types, such polymorphism is not supported by the existing MVE/CDE tablegen backends, also we don't really want to have a combinatorial explosion caused by 1000 different combinations of 3 vector types. Because of this some intrinsics are implemented as macros involving a cast of the polymorphic arguments to uint8x16_t. The IR intrinsics are even more restricted in terms of types: all MVE vectors are cast to v16i8. Reviewers: simon_tatham, MarkMurrayARM, dmgreen, ostannard Reviewed By: MarkMurrayARM Subscribers: kristof.beyls, hiraditya, danielkiss, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D76299
-
Mikhail Maltsev authored
Summary: This patch implements the following ACLE intrinsics: uint32_t __arm_vcx1_u32(int coproc, uint32_t imm); uint32_t __arm_vcx1a_u32(int coproc, uint32_t acc, uint32_t imm); uint32_t __arm_vcx2_u32(int coproc, uint32_t n, uint32_t imm); uint32_t __arm_vcx2a_u32(int coproc, uint32_t acc, uint32_t n, uint32_t imm); uint32_t __arm_vcx3_u32(int coproc, uint32_t n, uint32_t m, uint32_t imm); uint32_t __arm_vcx3a_u32(int coproc, uint32_t acc, uint32_t n, uint32_t m, uint32_t imm); uint64_t __arm_vcx1d_u64(int coproc, uint32_t imm); uint64_t __arm_vcx1da_u64(int coproc, uint64_t acc, uint32_t imm); uint64_t __arm_vcx2d_u64(int coproc, uint64_t m, uint32_t imm); uint64_t __arm_vcx2da_u64(int coproc, uint64_t acc, uint64_t m, uint32_t imm); uint64_t __arm_vcx3d_u64(int coproc, uint64_t n, uint64_t m, uint32_t imm); uint64_t __arm_vcx3da_u64(int coproc, uint64_t acc, uint64_t n, uint64_t m, uint32_t imm); Since the semantics of CDE instructions is opaque to the compiler, the ACLE intrinsics require dedicated LLVM IR intrinsics. The 64-bit and 32-bit variants share the same IR intrinsic. Reviewers: simon_tatham, MarkMurrayARM, ostannard, dmgreen Reviewed By: MarkMurrayARM Subscribers: kristof.beyls, hiraditya, danielkiss, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D76298
-
Mikhail Maltsev authored
Summary: This change implements ACLE CDE intrinsics that translate to instructions working with general-purpose registers. The specification is available at https://static.docs.arm.com/101028/0010/ACLE_2019Q4_release-0010.pdf Each ACLE intrinsic gets a corresponding LLVM IR intrinsic (because they have distinct function prototypes). Dual-register operands are represented as pairs of i32 values. Because of this the instruction selection for these intrinsics cannot be represented as TableGen patterns and requires custom C++ code. Reviewers: simon_tatham, MarkMurrayARM, dmgreen, ostannard Reviewed By: MarkMurrayARM Subscribers: kristof.beyls, hiraditya, danielkiss, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D76296
-
Florian Hahn authored
-
Michael Liao authored
-
Simon Pilgrim authored
-
Alexey Bataev authored
Addedi basic parsing/sema/serialization support for scan directive.
-