- Dec 08, 2022
-
-
Simon Pilgrim authored
-
Carlos Galvez authored
The same functionality is already implemented in the readability-static-definition-in-anonymous-namespace check, including automatic fixes. Differential Revision: https://reviews.llvm.org/D139197
-
Sebastian Neubauer authored
msvc fails to link when using any_cast. This seems to be fixed recently only. https://developercommunity.visualstudio.com/t/stdany-doesnt-link-when-exceptions-are-disabled/376072 This reverts commit aeac2e48.
-
Weining Lu authored
Hardware single stepping is not currently supported by the linux kernel. In order to support single step debugging, add EmulateInstructionLoongArch to implement the software Single Stepping. This patch only support the simplest single step execution of non-jump instructions. Reviewed By: SixWeining, DavidSpickett Differential Revision: https://reviews.llvm.org/D139158
-
Sebastian Neubauer authored
llvm::Any had several bugs in the past, due to being sensitive to symbol visibility. (See D101972 and D108943) Even with these fixes applied, I still encounter the same issue on Windows. Similar to llvm::Optional going away in favor of std::optional, we can use std::any from C++17. Using std::any fixes the problem and puts the burden to do it correctly on the standard library. Differential Revision: https://reviews.llvm.org/D139532
-
Bjorn Pettersson authored
-
wanglei authored
In case of unaligned nop sequences, pad to the nearest 4-byte boundary with zeros before filling with `nop` instructions. This is consistent with gas behavior, and is necessary to compile the Linux kernel with LLVM IAS. Replace `support::endian::write` with `OS.write` while at it. This is simpler and correct because we only have little endian. Reviewed By: SixWeining, xen0n Differential Revision: https://reviews.llvm.org/D139285
-
Viktoriia Bakalova authored
Fix: https://github.com/llvm/llvm-project/issues/59251 Differential Revision: https://reviews.llvm.org/D139087
-
Nikita Popov authored
We cannot remove an insertvalue of undef if it inserts into a potentially poison value. The new implementation matches that of insertelement. See https://alive2.llvm.org/ce/z/pCcFsW for the previously incorrect transform.
-
Florian Hahn authored
This reverts commit f9e03907. The patch causes a crash for the IR below: target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128" target triple = "arm64-apple-macosx" define void @test(ptr %data, <8 x i16> %v) { entry: %0 = sext <8 x i16> %v to <8 x i32> %1 = mul <8 x i32> %0, <i32 35584, i32 35584, i32 35584, i32 35584, i32 35584, i32 35584, i32 35584, i32 35584> %2 = lshr <8 x i32> %1, <i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1> %3 = trunc <8 x i32> %2 to <8 x i16> store <8 x i16> %3, ptr %data, align 2 ret void }
-
Viktoriia Bakalova authored
Removes filtering from the VisitUsingDecl method for implementation files. Differential Revision: https://reviews.llvm.org/D138821
-
Nikita Popov authored
Accidentally used the wrong binary in the previous commit.
-
Nikita Popov authored
-
Lucas Prates authored
This implements the base extensions that are part of the v8.9-A and v9.4-A architecture versions, including: * The Clear BHB Instruction (FEAT_CLRBHB) * The Speculation Restriction Instruction (FEAT_SPECRES2) * The SLC target for the PRFM instruction * New system registers: * ID_AA64PFR2_EL1 * ID_AA64MMFR3_EL1 * HFGITR2_EL2 * SCTLR2_EL3 More information on the new extensions can be found on: * https://community.arm.com/arm-community-blogs/b/architectures-and-processors-blog/posts/arm-a-profile-architecture-2022 * https://developer.arm.com/downloads/-/exploration-tools Contributors: Sam Elliott, Tomas Matheson and Son Tuan Vu. Reviewed By: lenary Differential Revision: https://reviews.llvm.org/D139424
-
Fangrui Song authored
Currently we take the first SHT_RISCV_ATTRIBUTES (.riscv.attributes) as the output. If we link an object without an extension with an object with the extension, the output Tag_RISCV_arch may not contain the extension and some tools like objdump -d will not decode the related instructions. This patch implements Tag_RISCV_stack_align/Tag_RISCV_arch/Tag_RISCV_unaligned_access merge as specified by https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/master/riscv-elf.adoc#attributes For the deprecated Tag_RISCV_priv_spec{,_minor,_revision}, dump the attribute to the output iff all input agree on the value. This is different from GNU ld but our simple approach should be ok for deprecated tags. `RISCVAttributeParser::handler` currently warns about unknown tags. This behavior is retained. In GNU ld arm, tags >= 64 (mod 128) are ignored with a warning. If RISC-V ever wants to do something similar (https://github.com/riscv-non-isa/riscv-elf-psabi-doc/issues/352), consider documenting it in the psABI and changing RISCVAttributeParser. Like GNU ld, zero value integer attributes and empty string attributes are not dumped to the output. Reviewed By: asb, kito-cheng Differential Revision: https://reviews.llvm.org/D138550
-
Nikita Popov authored
Update the check prefixes to allow auto-generation. WIN was redundant with NOSTPCPY, and CHECK-IPRINTF should specialize WITHSTPCPY.
-
Corentin Jabot authored
Implement https://cplusplus.github.io/CWG/issues/2631.html. Immediate calls in default arguments and defaults members are not evaluated. Instead, we evaluate them when constructing a `CXXDefaultArgExpr`/`BuildCXXDefaultInitExpr`. The immediate calls are executed by doing a transform on the initializing expression. Note that lambdas are not considering subexpressions so we do not need to transform them. As a result of this patch, unused default member initializers are not considered odr-used, and errors about members binding to local variables in an outer scope only surface at the point where a constructor is defined. Reviewed By: aaron.ballman, #clang-language-wg Differential Revision: https://reviews.llvm.org/D136554
-
serge-sans-paille authored
This is a recommit of 8ae18303, with a few cleanups. This avoids implicit conversion to StringRef at several points, which in turns avoid redundant calls to strlen. As a side effect, this greatly simplifies the implementation of StrCmpOptionNameIgnoreCase. It also eventually gives a consistent, humble speedup in compilation time (timing updated since original commit). https://llvm-compile-time-tracker.com/compare.php?from=de4b6a1bc64db33643f001ad45fae7b92b4a4688&to=c23a93d1292052b4be2fbe8c586fa31143d0c7ed&stat=instructions:u Differential Revision: https://reviews.llvm.org/D139274
-
Nikita Popov authored
Use generated check with --check-globals to verify that the TBAA metadata is correct.
-
Nikita Popov authored
Also clean up some redundant attributes / metadata while here.
-
Nikita Popov authored
Don't use anon names, convert to opaque pointers and use generated check lines.
-
Nikita Popov authored
-
Max Kazantsev authored
If loop exits by condition like `A < B && X < Y`, and at least one of symbolic max exit counts for these conditions is known, it can be used as estimate of symbolic max exit count for whole branch. If both are known, then we can use their umin as the estimate. Differential Revision: https://reviews.llvm.org/D139403 Reviewed By: nikic
-
Guillaume Chatelet authored
In the same vein as D139439, the patch is not NFC as there is no way to check all downstream implementations but the patch seems pretty safe. Differential Revision: https://reviews.llvm.org/D139548
-
Jonas Hahnfeld authored
getCanonicalMDString() also returns a nullptr for empty strings, which tripped over the getSource() method. Solve the ambiguity of no source versus an optional containing a nullptr by simply storing a pointer. Differential Revision: https://reviews.llvm.org/D138658
-
Haojian Wu authored
-
Haojian Wu authored
Reflect the change eeee51e4
-
Valentin Clement authored
The passed object is placed in the passed arguments by semantics. When the TBP to be called is an elemental subroutine or function it has to be handled accordingly. Reviewed By: jeanPerier, PeteSteinfeld Differential Revision: https://reviews.llvm.org/D139537
-
Gregory Alfonso authored
It is generally good practice, if you know how big the vector is going to be in the end, to reserve before continually calling "push_back" or "emplace_back" Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D139483
-
Nikolas Klauser authored
We normally use the `__libcpp_` prefix to backport functions, but that doesn't really make sense here. The functions are always available. Using `__constexpr_` makes the intended use of the functions clear. Reviewed By: Mordante, #libc Spies: libcxx-commits Differential Revision: https://reviews.llvm.org/D139521
-
Jean Perier authored
Differential Revision: https://reviews.llvm.org/D139542
-
Jean Perier authored
Creates a copy of the operand. Differential Revision: https://reviews.llvm.org/D139533
-
Max Kazantsev authored
-
gonglingqin authored
Use intrinsic-la32*.c to test the intrinsics of loongarch32. Use intrinsic-la64*.c to test the intrinsics of loongarch64.
-
chenglin.bi authored
-
Guray Ozen authored
Conversion of CopySignOp to SPIRV is supported for scalar and vectors but not 1D vectors with 1 element (aka vector<1xf32>). This revisions adds supports this by treating them as scalars. An alternative solution would be to allow 0D vectors for SPIRV, but the spec [0] strictly defines the vector type as non-0D. "Vector: An ordered homogeneous collection of two or more scalars. Vector sizes are quite restrictive and dependent on the execution model." [0] https://registry.khronos.org/SPIR-V/specs/unified1/SPIRV.html#_types Reviewed By: ThomasRaoux Differential Revision: https://reviews.llvm.org/D139518
-
Nikita Popov authored
-
jacquesguan authored
Reviewed By: reames Differential Revision: https://reviews.llvm.org/D139510
-
Quentin Colombet authored
Collapsing dimensions of size 1 with random strides (a.k.a. non-contiguous w.r.t. collapsed dimensions) is a grey area that we'd like to clean-up. (See https://reviews.llvm.org/D136483#3909856) That said, the implementation in `memref-to-llvm` currently skips dimensions of size 1 when computing the stride of a group. While longer term we may want to clean that up, for now matches this behavior, at least in the static case. For the dynamic case, for this patch we stick to `min(group strides)`. However, if we want to handle the dynamic cases correctly while allowing non-truly-contiguous dynamic size of 1, we would need to `if-then-else` every dynamic size. In other words `min(stride_i, for all i in group and dim_i != 1)`. I didn't implement that in this patch at the moment since `memref-to-llvm` is technically broken in the general case for this. (It currently would only produce something sensible for row major tensors.) Differential Revision: https://reviews.llvm.org/D139329
-
Alex Brachet authored
-