- Nov 04, 2023
-
-
Christian Ulmann authored
This commit removes all LLVM dialect typed pointers from the target tests. Typed pointers have been deprecated for a while now and it's planned to soon remove them from the LLVM dialect. Related PSA: https://discourse.llvm.org/t/psa-removal-of-typed-pointers-from-the-llvm-dialect/74502
-
Christian Ulmann authored
This commit removes all LLVM dialect typed pointers from the integration tests. Typed pointers have been deprecated for a while now and it's planned to soon remove them from the LLVM dialect. Related PSA: https://discourse.llvm.org/t/psa-removal-of-typed-pointers-from-the-llvm-dialect/74502
-
Nikita Popov authored
Revert "Port Swift's merge function pass to llvm: merging functions that differ in constants (#68235)" This reverts commit 19b5495b. PR landed without approval, with severe quality issues.
-
Adrian Prantl authored
Dsymutil already avoids copying textual Swift interface files from the SDK, since any consumer would have to have a matching SDK installed anyway. It should also do the same thing with interfaces found in the toolchain itself, which includes the compiler built-in libraries such as Swift (=the standard library), and _Concurrency. rdar://117881604
-
Ryan Prichard authored
Android's librt and libpthread functionality is part of libc.{a,so} instead. The atomic APIs are part of the compiler-rt builtins archive. Android does have libdl. Android's libc.so has `__cxa_thread_atexit_impl` starting in API 23, and the oldest supported API is 21, so continue using feature detection for that API. These settings need to be declared explicitly for the sake of the fuzzer library's custom libc++ build `add_custom_libcxx`. That macro builds libc++ using `-DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY`, which breaks the feature detection. -
yonghong-song authored
BPF upstream reported an inconsistent behavior w.r.t. BPF_TYPE_ID_LOCAL vs. BPF_TYPE_ID_TARGET (or BPF_TYPE_ID_REMOTE in LLVM terminology). For BPF_TYPE_ID_TARGET, all modifiers (like 'const' and 'volatile') are ignored in the final type encoding. For example, for type 'const struct foo', the eventually encoding in BTF relocation is 'struct foo'. This faciliates libbpf to match corresponding kernel types with considering any modifiers. Currently behavior for BPF_TYPE_ID_LOCAL is different. It will encode 'const struct foo' in BTF relocation and such discrepancy confused users ([1]). This patch fixed this discrepancy by making BPF_TYPE_ID_LOCAL BTF type representation the sams as BPF_TYPE_ID_TARGET. This should have minimum user impact since ultimately user wants to get a real time not a 'const' type modifier. The selftest builtin-btf-type-id-2.ll is used to test BPF_TYPE_ID_TARGET with 'const' modifier. Adapt the same test for BPF_TYPE_ID_LOCAL. And the below diff shows now both BPF_TYPE_ID_LOCAL and BPF_TYPE_ID_TARGET produces the same type: $ diff test/CodeGen/BPF/BTF/builtin-btf-type-id-2.ll test/CodeGen/BPF/BTF/builtin-btf-type-id-local.ll --- test/CodeGen/BPF/BTF/builtin-btf-type-id-2.ll 2023-07-30 16:58:20.657528310 -0700 +++ test/CodeGen/BPF/BTF/builtin-btf-type-id-local.ll 2023-11-02 10:23:25.356959008 -0700 @@ -6,7 +6,7 @@ ; int a; ; }; ; int test(void) { -; return __builtin_btf_type_id(*(const struct s *)0, 1); +; return __builtin_btf_type_id(*(const struct s *)0, 0); ; } ; Compilation flag: ; clang -target bpf -O2 -g -S -emit-llvm -Xclang -disable-llvm-passes test.c $ [1] https://lore.kernel.org/bpf/CAN+4W8h3yDjkOLJPiuKVKTpj_08pBz8ke6vN=Lf8gcA=iYBM-g@mail.gmail.com/ Co-authored-by:Yonghong Song <yonghong.song@linux.dev>
-
Nick Desaulniers authored
[CalcSpillWeights] don't mark live intervals with spillable inlineasm ops as having infinite spill weight (#70747) This is necessary for RegAllocGreedy support for memory folding inline asm that uses "rm" constraints. Thanks to @qcolombet for the suggestion. Link: https://github.com/llvm/llvm-project/issues/20571
-
XChy authored
Fixes #65222. When unfolding select into diamond-like control flow, we need to remove the StartBlock from all phis in EndBlock.
-
Brad Smith authored
OpenBSD prefers the use of the endian.h header.
-
Maksim Levental authored
This PR removes the various caching mechanisms currently in the python bindings - both positive caching and negative caching.
-
Simon Pilgrim authored
startswith/endswith wrap starts_with/ends_with and will eventually go away (to more closely match string_view)
-
Simon Pilgrim authored
startswith/endswith wrap starts_with/ends_with and will eventually go away (to more closely match string_view) Also add missing assert message
-
Philip Reames authored
This reverts commit a6c8e27b. It appears likely to have caused https://lab.llvm.org/buildbot/#/builders/57/builds/30988.
-
Craig Topper authored
This adds the nneg flag to SDNodeFlags and the node printing code. SelectionDAGBuilder will add this flag to the node if the target doesn't prefer sign extend. A future RISC-V patch can remove the sign extend preference from SelectionDAGBuilder. I've also added the flag to the DAG combine that converts ISD::SIGN_EXTEND to ISD::ZERO_EXTEND.
-
Manman Ren authored
See RFC for details: https://discourse.llvm.org/t/rfc-for-moving-swift-s-merge-function-pass-to-llvm/73778 We will need to refactor extension to FunctionComparator/FunctionHash to StructuralHash. This patch adds a new pass which is ported from Swift, and will need to discuss on how to migrate Swift’s pass over after we land this in llvm. Create this PR to get some early review on the patch. --------- Co-authored-by:
Manman Ren <mren@meta.com>
-
Fangrui Song authored
For a DSO with all DT_NEEDED entries accounted for, if it contains an undefined non-weak symbol that shares a name with a non-exported definition (hidden visibility or localized by a version script), and there is no DSO definition, we should also report an error. Because the definition is not exported, it cannot resolve the DSO reference at runtime. GNU ld introduced this error-checking in [April 2003](https://sourceware.org/pipermail/binutils/2003-April/026568.html). The feature is available for executable links but not for -shared, and it is orthogonal to --no-allow-shlib-undefined. We make the feature part of --no-allow-shlib-undefined and work with -shared when --no-allow-shlib-undefined is specified. A subset of this error-checking is covered by commit 1981b1b6 for --gc-sections discarded sections. This patch covers non-discarded sections as well. Internally, I have identified 2 bugs (which would fail with LD_BIND_NOW=1) covered by commit 1981b1b6
-
Kazu Hirata authored
This patch fixes: clang-tools-extra/clang-doc/BitcodeReader.cpp:78:3: error: default label in switch which covers all enumeration values [-Werror,-Wcovered-switch-default]
-
Mehdi Amini authored
These macro can help guarding some tests and other section of code which rely on detecting if a particular target is available. This is common the MLIR codegeneration for GPU targets for example.
-
Fangrui Song authored
-
Simon Pilgrim authored
startswith/endswith wrap starts_with/ends_with and will eventually go away (to more closely match string_view)
-
Philip Reames authored
As suggested during review of https://github.com/llvm/llvm-project/pull/70990.
-
Vlad Serebrennikov authored
This patch converts TagTypeKind into scoped enum. Among other benefits, this allows us to forward-declare it where necessary.
-
Alexey Bataev authored
Currently tryToGatherExtractElements function analyzes the whole vector, regrdless number of actual registers, used in this vector. It may prevent some optimizations, because per-register analysis may allow to simplify the final code by reusing more already emitted vectors and better shuffles. Differential Revision: https://reviews.llvm.org/D148855
-
Igor Kudrin authored
The body of `OptBisect::checkPass()` was moved to `OptBisect::shouldRunPass()` in [D137149](https://reviews.llvm.org/D137149).
-
Johannes Doerfert authored
-
Simon Pilgrim authored
[X86] X86ISelLowering.cpp - use StringRef::starts_with/ends_with instead of startswith/endswith. NFC. startswith/endswith wrap starts_with/ends_with and will eventually go away (to more closely match string_view)
-
Philip Reames authored
IndVars has the existing notion of a narrow definition which is known to positive and thus both sign and zero extension kinds are actually the same operations. There's existing logic for forming a SCEV based on the extension kind and the no-wrap flags. This change extends that logic to form the opposite extension kind for a positive def if doing so is allowed by the flags. Note that we already do something analogous for the getWideRecurrence case as well.
-
Philip Reames authored
Adding test coverage in advance of upcoming changes. Note that these tests specifically use unsigned comparisons for the backends, the signed versions are fairly well handled by existing logic.
-
Craig Topper authored
If we start with an i128 shift, the initial shift amount would usually have zeros in bit 8 and above. xoring the shift amount with -1 will set those upper bits to 1. If DAGCombiner is able to prove those bits are now 1, then the shift that uses the xor will be replaced with undef. Which we don't want. Reduce the xor constant to VT.bits-1 where VT is half the size of the larger shift type. This avoids toggling the upper bits. The hardware shift instruction only uses the lower bits of the shift amount. I assume the code used NOT because the hardware doesn't use the upper bits, but that isn't compatible with the LLVM poison semantics. Fixes #71142.
-
Craig Topper authored
[RISCV][GISel] Add helper to convert a LLT size to a RegisterBankInfo::ValueMapping* for FP. (#71123) Use this to simplify code.
-
Ellis Hoag authored
The `skipPGO()` function was added in https://reviews.llvm.org/D137184. Unfortunately, it also blocked functions from being annotated (PGOUse), which I believe will cause confusion to users if a function has a profile but it is not PGO'd. The docs for `noprofile` and `skipprofile` only claim to block instrumentation, not PGO optimization: https://llvm.org/docs/LangRef.html
-
Nick Desaulniers authored
When using the inline asm constraint string "rm" (or "g"), we generally would like the compiler to choose "r", but it is permitted to choose "m" if there's register pressure. This is distinct from "r" in which the register is not permitted to be spilled to the stack. The decision of which to use must be made at some point. Currently, the instruction selection frameworks (ISELs) make the choice, and the register allocators had better be able to handle the result. Steal a bit from Storage when using register operands to disambiguate between the two cases. Add helpers/getters/setters, and print in MIR when such a register is foldable. The getter will later be used by the register allocation frameworks (and asserted by the ISELs) while the setters will be used by the instruction selection frameworks. Link: https://github.com/llvm/llvm-project/issues/20571
-
Daniel Thornburgh authored
Running the LLDB test suite in a GUI-less macOS environment (say, ssh) requires that the debugged tasks be signed with the get-task-allow entitlement.
-
Philip Reames authored
zext nneg was recently added to the IR in #67982. This patch teaches SimplifyIndVars to prefer zext nneg over *both* sext and plain zext, when a local SCEV query indicates the source is non-negative. The choice to prefer zext nneg over sext looks slightly aggressive here, but probably isn't so much in practice. For cases where we'd "remember" the range fact, instcombine would convert the sext into a zext nneg anyways. The only cases where this produces a different result overall are when SCEV knows a non-local fact, and it doesn't get materialized into the IR. Those are exactly the cases where using zext nneg are most useful. We do run the risk of e.g. a missing combine - since we haven't updated most of them yet - but that seems like a manageable risk. Note that there are much deeper algorithmic changes we could make to this code to exploit zext nneg, but this seemed like a reasonable and low risk starting point.
-
Min-Yih Hsu authored
DAGCombiner, as well as InstCombine, tend to canonicalize GE/LE into GT/LT, namely: ``` X >= C --> X > (C - 1) ``` Which sometime generates off-by-one constants that could have been CSE'd with surrounding constants. Instead of changing such canonicalization, this patch tries to swap those branch conditions post-isel, in the hope of resurfacing more constant CSE opportunities. More specifically, it performs the following optimization: For two constants C0 and C1 from ``` li Y, C0 li Z, C1 ``` To remove redundnat `li Y, C0`, 1. if C1 = C0 + 1 we can turn: (a) blt Y, X -> bge X, Z (b) bge Y, X -> blt X, Z 2. if C1 = C0 - 1 we can turn: (a) blt X, Y -> bge Z, X (b) bge X, Y -> blt Z, X This optimization will be done by PeepholeOptimizer through RISCVInstrInfo::optimizeCondBranch.
-
- Nov 03, 2023
-
-
Philip Reames authored
Update to modern output to reduce spurious deltas in upcoming change.
-
Philip Reames authored
As usual, making it easier for an upcoming test delta to be seen. Note that several of these are examples of extremely bad testing practice. Checking internal debug output (for no real purpose), and checking the result of a fully O2 + llc run instead of reducing the specific problematic pass.
-
Piotr Zegar authored
Improved modernize-make-shared check to support std::shared_ptr implementations that inherit the reset method from a base class. In GCC that class is called __shared_ptr. Fixes #64481
-
Paul Walker authored
[LLVM][AArch64] Add ASM constraints for reduced GPR register ranges. The patch adds the follow ASM constraints: Uci => w8-w11/x8-x11 Ucj => w12-w15/x12-x15 These constraints are required for SME load/store instructions where a reduced set of GPRs are used to specify ZA array vectors. NOTE: GCC has agreed to use the same constraint syntax. -
Ben Langmuir authored
The system linker merges __objc_imageinfo flags values to select a compatible set of flags using the minimum swift version and only erroring on incompatible ABIs. Match that behaviour in the orc macho platform. One wrinkle is that the JIT can add new objects after the dylib is running code. In that case we only check for known incompatible flags and ignore the swift version. It's too late to change the flags at that point and swift version is unlikely to change runtime behaviour in practice.
-