- Jan 15, 2023
-
-
Kazu Hirata authored
-
Kazu Hirata authored
This is part of an effort to migrate from llvm::Optional to std::optional: https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
-
Keith Smiley authored
This nearly mirrors ld64's error for this case: ld: warning: ignoring file path/to/file, file is universal (armv7,arm64) but does not contain the x86_64 architecture: path/to/file Differential Revision: https://reviews.llvm.org/D141729
-
Fangrui Song authored
-
Kazu Hirata authored
This is part of an effort to migrate from llvm::Optional to std::optional: https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
-
Kazu Hirata authored
-
Kazu Hirata authored
-
Kazu Hirata authored
This patch removes several "using" declarations and #include "llvm/ADT/Optional.h". This is part of an effort to migrate from llvm::Optional to std::optional: https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
-
Simon Pilgrim authored
X86 doesn't have absdiff instructions, but we should be able to canonicalize to avoid unnecessary scalarization/extensions/selects
-
Simon Pilgrim authored
X86 doesn't have absdiff instructions, but we should be able to canonicalize to avoid unnecessary extensions/selects
-
Tom Praschan authored
This is very useful when inlay hints are disabled. Also, improve presentation of Hover when variable is passed by value to a function with an unnamed parameter Differential Revision: https://reviews.llvm.org/D140775
-
Andrew Savonichev authored
This patch fixes machine verifier errors: *** Bad machine code: Missing mayLoad flag *** - function: foo1 - basic block: %bb.0 (0x5560fc64ef08) - instruction: %4:float32regs = INT_PTX_LDG_GLOBAL_f32areg64 killed %3:int64regs :: (load (s32) from %ir.from1, addrspace 1) mayLoad flag is missing because LDG and LDU instructions operate on read-only memory, so we want to treat them as regular instructions and exclude them from memory analysis. Machine verifier checks for memoperands to determine whether an instruction is a load, so dropping them during lowering fixes the problem. Differential Revision: https://reviews.llvm.org/D112466 -
Kazu Hirata authored
This patch replaces (llvm::|)Optional< with std::optional<. I'll post a separate patch to remove #include "llvm/ADT/Optional.h". This is part of an effort to migrate from llvm::Optional to std::optional: https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
-
Craig Topper authored
The code tried to do this for (icmp sle (1 << Y), 0), but that is canonicalized to sgt before we get there. Simplify the code by removing the unreachable SGE and SLE handling. Also remove the (1 << Y) >=u 2147483648 and (1 << Y) <u 2147483648 handling since those are canonicalized to (1 << Y) <s 0 and (1 << Y) >=s 0 before we get there. Reviewed By: spatel Differential Revision: https://reviews.llvm.org/D141753
-
Kazu Hirata authored
This patch adds #include <optional> to those files containing llvm::Optional<...> or Optional<...>. I'll post a separate patch to actually replace llvm::Optional with std::optional. This is part of an effort to migrate from llvm::Optional to std::optional: https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
-
Carlos Galvez authored
Fix applied by running: run-clang-tidy.py -checks=-*,modernize-concat-nested-namespaces Differential Revision: https://reviews.llvm.org/D141770
-
Simon Pilgrim authored
The RMW instructions still need addressing, probably with a new 'WriteXCHGRMW' scheduler class. Based off llvm-exegesis captures, confirmed with Agner + uops.info
-
Kirill Stoimenov authored
Reviewed By: kstoimenov Differential Revision: https://reviews.llvm.org/D141771
-
Roman Lebedev authored
-
James Le Cuirot authored
It is possible to build LLVM with just the "llvm" and "cmake" components checked out. This requires disabling the `LLVM_INCLUDE_BENCHMARKS` and `LLVM_INCLUDE_TESTS` options. These options are not passed through to the native build when cross-compiling though, so the build will break if the "third-party" component is missing. We don't need the benchmarks or tests for the native build, so disable these unconditionally. This fixes cross-compiling on Gentoo, where only the required components are checked out. Differential Revision: https://reviews.llvm.org/D141196
-
Markus Böck authored
Incrementing past the end iterator of any container in C++ is immediate undefined behaviour. This is guaranteed to occur in the loop condition due to the expression cur = earlyIncIt++, which when earlyIncIt is the end iterator (aka we just did the last iteration of the loop), will do an increment on the end iterator. To fix this, the patch refactors the loop to a more conventional loop using iterators, with the only difference being that the increment happens through the erase operation, which conveniently returns an iterator to the element after the erased element. Thanks to that guarantee there is also no need to use std::list over std::vector. I also opted to reduce the inner loop find_if, because I felt splitting the "search" and the effects of if it was successful made the code (subjectively) nicer, and also avoided having to add an extra "bool erased" to the outer loop body. Differential Revision: https://reviews.llvm.org/D141758
-
Haojian Wu authored
-
Roman Lebedev authored
https://reviews.llvm.org/D140493 is going to teach SROA how to promote allocas that have variably-indexed loads. That does bring up questions of cost model, since that requires creating wide shifts. Indeed, our legalization for them is not optimal. We either split it into parts, or lower it into a libcall. But if the shift amount is by a multiple of CHAR_BIT, we can also legalize it throught stack. The basic idea is very simple: 1. Get a stack slot 2x the width of the shift type 2. store the value we are shifting into one half of the slot 3. pad the other half of the slot. for logical shifts, with zero, for arithmetic shift with signbit 4. index into the slot (starting from the base half into which we spilled, either upwards or downwards) 5. load 6. split loaded integer This works for both little-endian and big-endian machines: https://alive2.llvm.org/ce/z/YNVwd5 And better yet, if the original shift amount was not a multiple of CHAR_BIT, we can just shift by that remainder afterwards: https://alive2.llvm.org/ce/z/pz5G-K I think, if we are going perform shift->shift-by-parts expansion more than once, we should instead go through stack, which is what this patch does. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D140638
-
- Jan 14, 2023
-
-
Simon Pilgrim authored
-
Tomas Matheson authored
Reworked after several other major changes to the TargetParser since this was reverted. Combined with several other changes. Inline calls for the following macros and delete AArch64TargetParser.def: AARCH64_ARCH, AARCH64_CPU_NAME, AARCH64_CPU_ALIAS, AARCH64_ARCH_EXT_NAME Squashed changes from D139278 and D139102. Differential Revision: https://reviews.llvm.org/D138792
-
Simon Pilgrim authored
As discussed on D141657
-
Mehdi Amini authored
-
Kazu Hirata authored
This patch removes one "using" declaration and #include "llvm/ADT/Optional.h". It keeps several "using" declarations in headers for downstream users. This is part of an effort to migrate from llvm::Optional to std::optional: https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
-
Kazu Hirata authored
This patch replaces (llvm::|)Optional< with std::optional<. I'll post a separate patch to remove #include "llvm/ADT/Optional.h". This is part of an effort to migrate from llvm::Optional to std::optional: https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
-
Craig Topper authored
We already optimize the sgt case to (icmp ne Y, BitWidth-1), but we miss optimizing sle because it canonicalizes to (icmp slt (1 << X), 1) first.
-
Craig Topper authored
This reverts commit e25f2287. I messed up the predicates in the description.
-
Craig Topper authored
We already optimize the slt case to (icmp eq Y, BitWidth-1), but we miss optimizing sge because it canonicalizes to (icmp sgt (1 << X), 1) first.
-
Craig Topper authored
Use isPhysical/isVirtual methods.
-
Phoebe Wang authored
We cannot handle i8/i16/f16 vselect without BWI. Fixes #59980 Reviewed By: RKSimon, skan Differential Revision: https://reviews.llvm.org/D141668
-
NAKAMURA Takumi authored
-
Kirill Stoimenov authored
Reviewed By: vitalybuka Differential Revision: https://reviews.llvm.org/D141724
-
Kazu Hirata authored
This patch adds #include <optional> to those files containing llvm::Optional<...> or Optional<...>. I'll post a separate patch to actually replace llvm::Optional with std::optional. This is part of an effort to migrate from llvm::Optional to std::optional: https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
-
Kshitij Jain authored
The i386/ELF JITLink backend was not correctly handling the GOTPC relocation by skipping the in-built addend, which was manifesting itself in the form of a segmentation fault in the `LF_external_to_absolute_conversion.s` test. This CR has fixed that issue. Reviewed By: lhames Differential Revision: https://reviews.llvm.org/D141746
-
Jan Svoboda authored
Since D135636, PCM files contain the "as requested" path of input files. The machinery for generating dependency files reports those paths as they appeared in the PCM file, which may confuse consumers that are not aware of VFS overlays that might've been in place at compile-time. This patch makes sure the "use-external-name" setting is being respected when generating dependency files in modular builds by piping the paths serialized in PCMs through `FileEntryRef::getName()` before putting them into dependency files. rdar://103459532 Reviewed By: benlangmuir Differential Revision: https://reviews.llvm.org/D141644
-
Nikolas Klauser authored
This allows clang to catch lifetime bugs through these functions. As a drive-by, replace `_LIBCPP_INLINE_VISIBILITY` with `_LIBCPP_HIDE_FROM_ABI`. Fixes #59900 Reviewed By: ldionne, #libc Spies: rsmith, rnk, aaron.ballman, libcxx-commits Differential Revision: https://reviews.llvm.org/D141321
-