- May 11, 2024
-
-
LLVM GN Syncbot authored
-
Joyce authored
Hi! Here is a patch for #81859 that fix the vulnerabilities found in gitpython, cryptography, urllib3 and requests. I have just regenerated the requirements.txt files running pip-compile again. Fortunately, this was enough to set all the dependencies on safe versions. I have also checked if new vulnerabilities were introduced by running scorecard on my fork, but none has been introduced. Thanks! Signed-off-by:Joyce Brum <joycebrum@google.com>
-
Momchil Velikov authored
... into a `whilelo` instruction with a pair of predicate registers.
-
Justin Bogner authored
Test failures on big endian bots after this change. Reverts llvm/llvm-project#91506
-
Peiming Liu authored
**NOTE**: we still have implementation holes when handling multiple COO segments in the encoding. But the format should be considered to be legal.
-
Mircea Trofin authored
Follow-up from `265953cc`
-
agozillon authored
Reverts llvm/llvm-project#82850, applied accidentally without the rest of the PR series.
-
Nikolas Klauser authored
`__apply_cv_t` and `__copy_cvref_t` are very closely related. They are in fact identical except that `__copy_cvref_t` handles rvalue references properly. Some uses don't actually require handling of references, so they are replaced with `__copy_cv_t`.
-
agozillon authored
This is a large series of runtime tests that help to add coverage for the specific cases intended to be supported by the PR stack that extends derived type map support in Flang+OpenMP. Primarily this will add functionality coverage, there's cases where things may work, but not optimally (or at least similarly to the status quo in Clang), additional IR tests are added in the relevant segments of the related PRs to test for breakages like that.
-
Spenser Bauman authored
This change addresses some of the additional review feedback on https://github.com/llvm/llvm-project/pull/87234 . A summary of the changes: 1. Cleaned up the language to use 'roll back' rather than revert to reduce the chance of confusion. Improved some function names as well. 2. Eliminated string comparisons on dialect names. 3. Prevented the introduction of redundant tensor.cast operations for the same value. --------- Co-authored-by:
Spenser Bauman <sabauma@fastmail>
-
Fangrui Song authored
Test that these combinations do not lead to a warning. -funsafe-math-optimizations -ffp-contract=off and -ffast-math -ffp-contract=off may issue a warning after #91271.
-
Tomas Matheson authored
Required to fix an llvm-test-suite failure: error: expected writable system register or pstate: "msr DIT, x0" -
Valentin Clement (バレンタイン クレメン) authored
The restriction was completely removed in #89677. This was a bit too much. Reapply the restriction on elemental, pure and recursive but only for kernel subprogram (`grid_global` and `global` attributes).
-
Mircea Trofin authored
-
Alex Langford authored
-
Pavel Labath authored
lldb-dap was setting a flag which was meant to shut it down as soon as it sent a terminated event. The problem with this flag is two-fold: - as far as I can tell (definitely not an expert here), there's no justification for this in the protocol spec. The only way I found to shut the server down was to send it a disconnect request. - the flag did not actually work most of the time, because it's only checked between requests so nothing will happen if the server starts listening for a new request before a different thread manages to send the terminated event. And since the next request is usually the disconnect request, everything will operate normally. The combination of these two things meant that the issue was largely unnoticable, except for rare flaky test failures, which happened when the handler thread was too slow, and checked the flag after it has already been said. This caused the test suite to complain as it did not get a response to the disconnect request. This situation could be s(t)imulated by adding a sleep to the and of the main loop, which delayed the flag check, and caused the DAP tests to fail reliably. This patch changes the shutdown condition to only trigger when the disconnect request has been received. Since the flag can now only be set from the handler thread, it no longer needs to be atomic.
-
Cyndy Ishida authored
Projects like libc use mutually exclusive macros to compile files multiple times and then merge the result into the final library. For installapi to accept these, we'd need to parse the same declarations in different ways. This patch adds the basic pipelining for installapi to create the correct TBD file. * -Xproject allows: -fmodules, -fobjc-arc, fvisibility=hidden, prefix headers * -Xlabel allows: -D and -U settings * Error on 'private' and 'public' labels -X<label> * Xplatform allows: -iframework <path> This is to support the case where zippered frameworks want to pass in iOSSupport search path.
-
Zequan Wu authored
[lldb][DWARF] Delay struct/class/union definition DIE searching when parsing declaration DIEs. (#90663) This is the implementation for https://discourse.llvm.org/t/rfc-delay-definition-die-searching-when-parse-a-declaration-die-for-record-type/78526. #### Motivation Currently, lldb eagerly searches for definition DIE when parsing a declaration DIE for struct/class/union definition DIE. It will search for all definition DIEs with the same unqualified name (just `DW_AT_name` ) and then find out those DIEs with same fully qualified name. Then lldb will try to resolve those DIEs to create the Types from definition DIEs. It works fine most time. However, when built with `-gsimple-template-names`, the search graph expands very quickly, because for the specialized-template classes, they don’t have template parameter names encoded inside `DW_AT_name`. They have `DW_TAG_template_type_parameter` to reference the types used as template parameters. In order to identify if a definition DIE matches a declaration DIE, lldb needs to resolve all template parameter types first and those template parameter types might be template classes as well, and so on… So, the search graph explodes, causing a lot unnecessary searching/type-resolving to just get the fully qualified names for a specialized-template class. This causes lldb stack overflow for us internally on template-heavy libraries. #### Implementation Instead of searching for definition DIEs when parsing declaration DIEs, we always construct the record type from the DIE regardless if it's definition or declaration. The process of searching for definition DIE is refactored to `DWARFASTParserClang::FindDefinitionTypeForDIE` which is invoked when 1) completing the type on `SymbolFileDWARF::CompleteType`. 2) the record type needs to start its definition as a containing type so that nested classes can be added into it in `PrepareContextToReceiveMembers`. The key difference is `SymbolFileDWARF::ResolveType` return a `Type*` that might be created from declaration DIE, which means it hasn't starts its definition yet. We also need to change according in places where we want the type to start definition, like `PrepareContextToReceiveMembers` (I'm not aware of any other places, but this should be a simple call to `SymbolFileDWARF::FindDefinitionDIE`) #### Result It fixes the stack overflow of lldb for the internal binary built with simple template name. When constructing the fully qualified name built with `-gsimple-template-names`, it gets the name of the type parameter by resolving the referenced DIE, which might be a declaration (we won't try to search for the definition DIE to just get the name). I got rough measurement about the time using the same commands (set breakpoint, run, expr this, exit). For the binary built without `-gsimple-template-names`, this change has no impact on time, still taking 41 seconds to complete. When built with `-gsimple-template-names`, it also takes about 41 seconds to complete wit this change.
-
Haojian Wu authored
-
Vlad Serebrennikov authored
-
Vlad Serebrennikov authored
This is a follow-up for ed128c7d
-
- May 10, 2024
-
-
Craig Topper authored
We can extract each extension as we process them without much complexity. I changed the error message for cases where there are double underscores or a trailing underscore. I think this is an improvement over the previous error.
-
Schrodinger ZHU Yifan authored
Avoid `cmpxchg` operation if the function has already been called. The destination operand of `cmpxchg` may receive a write cycle without regard to the result of the comparison
-
Haojian Wu authored
To reflect what the actual code does.
-
lntue authored
It was reported from the CORE-MATH project that the `powf` implementation did not round correctly when `x^y` is either exact for exactly half-way. This PR deals with the potential exact cases when `y` is an integer `2 < y < 25`. In such cases, the results of `x^y` is exactly representable in double precision.
-
Razvan Lupusoru authored
The code for preparing cmdstat was generating an i2 constant with value 0, casting it, and then storing it into i16 storage. Just generate i16 constant directly.
-
Louis Dionne authored
That way, if we ever expand TestEachPointerType we will pick up those changes in TestEachAtomicType.
-
Hui authored
Fixes #86686
-
Jay Foad authored
So long as the target of the alias is predicated with HasImageInsts or similar, the alias itself does not need this predicate.
-
erichkeane authored
I discovered while working on a different patch that I'd not implemented the 'classof' for any of the Clauses, which resulted in 'isa' always returning 'true' for all of the types. This patch goes through all the existing clauses and adds 'classof' such that it will work correctly. Additionally, in doing this, I found a bug where I was doing a cast to the wrong type in the ASTWriter, so this fixes that problem as well.
-
David Green authored
If we are lowering a frem and the divisor is known to be an integer power-2, we can use the formula 'frem = x - trunc(x / d) * d'. This avoids the more expensive call to fmod. The results are identical as fmod so long as d is a power-2 (so the mul does not round incorrectly), and the sign of the return is either always positive or not important for zeroes (nsz). Unfortunately Alive2 does not handle this well at the moment. I was using exhaustive checking to test this: (https://gist.github.com/davemgreen/6078015f30d3bacd1e9572f8db5d4b64). I found this in cpythons implementation of float_pow. I currently added it as a DAG combine for frem with power-2 fp constants.
-
Congcong Cai authored
-
Xiang Li authored
Move MinorVersion be the lower 8 bit. Set DXIL version in DXContainerObjectWriter::writeObject. Fixes #89952
-
Xing Xue authored
AIX has the `/proc` filesystem where `/proc/<pid>/lwp/<tid>/lwpsinfo` has the thread state in binary, similar to Linux's `/proc/<pid>/task/<tid>/stat` where the state is in ASCII. However, the definition of state info `R` in `lwpsinfo` is `runnable`. In Linux, state `R` means the thread is `running`. Therefore, `lwpsinfo` is not ideal for our purpose of getting the current load of the system. This patch uses `perfstat_cpu()` in AIX system library `libperfstat.a` to obtain the number of threads current running on logical CPUs.
-
Alex Bradbury authored
[InstCombine] Prefer to keep power-of-2 constants when combining ashr exact and slt/ult of a constant (#86111) We have flexibility in what constant to use when combining an `ashr exact` with a slt or ult of a constant, and it's not possible to revisit this decision later in the compilation pipeline after the `ashr exact` is removed. Keeping a constant close to power-of-2 (pow2val + 1) should be no worse than neutral, and in some cases may allow better codegen later on for targets that can more cheaply generate power of 2 (which may be selectable if converting back to setle/setge) or near power of 2 constants. Alive2 proofs: <https://alive2.llvm.org/ce/z/2BmPnq> and <https://alive2.llvm.org/ce/z/DtuhnR>
-
Alex Bradbury authored
The upcoming patch adds logic to prefer to use constants close to power-of-two in these ashr exact + slt/ult patterns when it has a choice on which constant can be used.
-
Younan Zhang authored
This fixes a regression introduced by bee78b88. When we form a deduction guide for a constructor, basically, we do the following work: - Collect template parameters from the constructor's surrounding class template, if present. - Collect template parameters from the constructor. - Splice these template parameters together into a new template parameter list. - Turn all the references (e.g. the function parameter list) to the invented parameter list by applying a `TreeTransform` to the function type. In the previous fix, we handled cases of nested class templates by substituting the "outer" template parameters (i.e. those not declared at the surrounding class template or the constructor) with the instantiating template arguments. The approach per se makes sense, but there was a flaw in the following case: ```cpp template <typename U, typename... Us> struct X { template <typename V> struct Y { template <typename T> Y(T) {} }; template <typename T> Y(T) -> Y<T>; }; X<int>::Y y(42); ``` While we're transforming the parameters for `Y(T)`, we first attempt to transform all references to `V` and `T`; then, we handle the references to outer parameters `U` and `Us` using the template arguments from `X<int>` by transforming the same `ParamDecl`. However, the first step results in the reference `T` being `<template-param-0-1>` because the invented `T` is the last of the parameter list of the deduction guide, and what we're substituting with is a corresponding parameter pack (which is `Us`, though empty). Hence we're messing up the substitution. I think we can resolve it by reversing the substitution order, which means handling outer template parameters first and then the inner parameters. There's no release note because this is a regression in 18, and I hope we can catch up with the last release. Fixes https://github.com/llvm/llvm-project/issues/88142
-
Qizhi Hu authored
attempt to fix https://github.com/llvm/llvm-project/issues/12361 Consider this example: ```cpp class D { class E{ class F{}; friend void foo(D::E::F& q); }; friend void foo(D::E::F& q); }; void foo(D::E::F& q) {} ``` The first friend declaration of foo is correct. After that, the second friend declaration delayed access checking and set its previous declaration to be the first one. When doing access checking of `F`(which is private filed of `E`), we put its canonical declaration(the first friend declaration) into `EffectiveContext.Functions`. Actually, we are still checking the first one. This is incorrect due to the delayed checking. Creating a new scope to indicate we are parsing a friend declaration and doing access checking in time.
-
Florian Hahn authored
Follow-up o fix test after 28767afd.
-