- Feb 20, 2024
-
-
Craig Topper authored
-
Jonas Devlieghere authored
This upstreams the BridgeOS target triple enum value.
-
Jonas Devlieghere authored
The trailing comments cause clang-format to complain every time the enum is modified. Fix the formatting to avoid tripping up the formatting check on GitHub.
-
Vyacheslav Levytskyy authored
SPIRV-V Backend generates unnecessary OpExecutionMode records, putting into the id's which are not the Entry Point operands of an OpEntryPoint (ref: https://github.com/llvm/llvm-project/issues/81753). This PR is to fix the issue.
-
Fangrui Song authored
Similar to #75661. Currently, there is only ELFOSABI_ARM, but I plan to add ELFOSABI_ARM_FDPIC in a subsequent patch #82187
-
Lei Wang authored
This change adds the support to compute and report the staleness metrics after stale profile matching so that we can know how effective the fuzzy matching is, i. e. how many callsites and samples are recovered by the matching. Some implementation notes: - The function checksum mismatch metrics are not applicable here as it's function-level metrics, checksum mismatch remains the same before and after matching, so we need to compute based on the callsite samples. - Added two new counters `NumRecoveredCallsites`, `RecoveredCallsiteSamples` for this and removed `TotalCallsiteSamples` as now the we can use the `TotalFuncHashSamples` as base, and renamed some counters. - In profile matching, we changed to use a state machine to represent the callsite's matching state changes. See the `MatchState` for the state, and used a new function `recordCallsiteMatchStates` to compute and record the callsite's match states changes before and after the matching, , the result is compressed and saved into a `FuncCallsiteMatchStates` map for later counting use. - Changed the counting function to run on module-level and moved it to the end of the whole process(`computeAndReportProfileStaleness`). The reason is before the callsite is only counted on top-level function, this change extends it to count(recursively) on the inlined functions and samples, which is more accurate.
-
Craig Topper authored
This adds additional tests for #82199. These tests need us to propagate the nneg flag when we zero/sign extend an existing zext nneg node. For these tests on RV64, call lowering will need to sign extend or zero extend the existing zext nneg to i64. getNode will fold this into a single zext. We should propagate the nneg flag from the original zext nneg. This will allow us to remove the zext nneg based on known sign bits during DAG combine.
-
Christian Kandeler authored
That would turn: int x = f() + 1; into: auto placeholder = f() + 1; int x = placeholder; which makes little sense and is clearly not intended, as stated explicitly by a comment in eligibleForExtraction(). It appears that the declaration case was simply forgotten (the assignment case was already implemented).
-
Craig Topper authored
This treats the zext nneg as sext if X is known to have sufficient sign bits to allow the zext or truncate or both to removed. This code is taken from the same optimization for sext.
-
Michael Klemm authored
This PR continues the work started with PR #79006, by setting visibility in MODULES to PRIVATE by default and explicitly exporting only the desired symbols. `omp_lib` needs more work, as it should maybe be compiled from `omp_lib.f90` in `openmp/runtime/src/incluce/omp_lib.f90.var` instead of simply using an INCLUDE for `omp_lib.h`
-
Craig Topper authored
These tests have a dominating icmp that require an i16 value to be sign extended to do the compare. Because of this, the i16 will be exported from the first basic block sign extended to XLen. We can use this fact to remove the zext nneg in the scond block.
-
srcarroll authored
[MLIR][tensor] Improve `tensor.pack` verifier to catch more cases with unconditional runtime errors (#77217) Previously, the `tensor.pack` verifier detects unconditional runtime errors only when tile sizes are static. Now, dynamic tiles are considered and we only require that the input and either corresponding tile or output size are static to determine if it will unconditionally produce errors at runtime.
-
Simon Pilgrim authored
-
Gheorghe-Teodor Bercea authored
Add test and support for `// REQUIRES: apu` for the category of tests which exercise APU specific behavior. Note: when running on an actual APU you may have to use the following if the architecture ID is not enough to determine if the underlying device is an APU: ``` IS_APU=1 ninja check-openmp ```
-
- Feb 19, 2024
-
-
Orlando Cazalet-Hyams authored
AddressExpression wasn't included in the comparison.
-
Simon Pilgrim authored
Equivalent to "umax(A, B) - umin(A, B)" First step towards adding knownbits support for absdiff patterns for #81765
-
Nikita Popov authored
-
Ivan Kosarev authored
[AMDGPU][MC][True16] Support V_RCP/SQRT/RSQ/LOG/EXP_F16. Also add missing v_ceil/floor_f16 tests. Includes https://github.com/llvm/llvm-project/pull/80892.
-
Timm Bäder authored
They can happen and we used to run into an assertion.
-
Simon Pilgrim authored
Test cases demonstrating poor value tracking of PSADBW results
-
Manish Kausik H authored
-
Jan Kokemüller authored
This is a follow-up PR to <https://github.com/llvm/llvm-project/pull/79265>. It aims to be a gentle refactoring of the `__cxx_atomic_wait` function that takes a predicate. The key idea here is that this function's signature is changed to look like this (`std::function` used just for clarity): ```c++ __cxx_atomic_wait_fn(Atp*, std::function<bool(Tp &)> poll, memory_order __order); ``` ...where `Tp` is the corresponding `value_type` to the atomic variable type `Atp`. The function's semantics are similar to `atomic`s `.wait()`, but instead of having a hardcoded predicate (is the loaded value unequal to `old`?) the predicate is specified explicitly. The `poll` function may change its argument, and it is very important that if it returns `false`, it leaves its current understanding of the atomic's value in the argument. Internally, `__cxx_atomic_wait_fn` dispatches to two waiting mechanisms, depending on the type of the atomic variable: 1. If the atomic variable can be waited on directly (for example, Linux's futex mechanism only supports waiting on 32 bit long variables), the value of the atomic variable (which `poll` made its decision on) is then given to the underlying system wait function (e.g. futex). 2. If the atomic variable can not be waited on directly, there is a global pool of atomics that are used for this task. The ["eventcount" pattern](<https://gist.github.com/mratsim/04a29bdd98d6295acda4d0677c4d0041>) is employed to make this possible. The eventcount pattern needs a "monitor" variable which is read before the condition is checked another time. libcxx has the `__libcpp_atomic_monitor` function for this. However, this function only has to be called in case "2", i.e. when the eventcount is actually used. In case "1", the futex is used directly, so the monitor must be the value of the atomic variable that the `poll` function made its decision on to continue blocking. Previously, `__libcpp_atomic_monitor` was _also_ used in case "1". This was the source of the ABA style bug that PR#79265 fixed. However, the solution in PR#79265 has some disadvantages: - It exposes internals such as `cxx_contention_t` or the fact that `__libcpp_thread_poll_with_backoff` needs two functions to higher level constructs such as `semaphore`. - It doesn't prevent consumers calling `__cxx_atomic_wait` in an error prone way, i.e. by providing to it a predicate that doesn't take an argument. This makes ABA style issues more likely to appear. Now, `__cxx_atomic_wait_fn` takes just _one_ function, which is then transformed into the `poll` and `backoff` callables needed by `__libcpp_thread_poll_with_backoff`. Aside from the `__cxx_atomic_wait` changes, the only other change is the weakening of the initial atomic load of `semaphore`'s `try_acquire` into `memory_order_relaxed` and the CAS inside the loop is changed from `strong` to `weak`. Both weakenings should be fine, since the CAS is called in a loop, and the "acquire" semantics of `try_acquire` come from the CAS, not from the initial load.
-
CarolineConcatto authored
This is needed by PR#77665[1] that uses a P-register while restoring Z-registers. The reverse for SVE register restore in the epilogue was added to guarantee performance, but further work was done to improve sve frame restore and besides that the schedule also may change the order of the restore, undoing the reverse restore. [1]https://github.com/llvm/llvm-project/pull/77665
-
Tomas Matheson authored
This reverts commit 89c1bf12. This has been unimplemenented for a while, and GCC does not implement it, therefore we need to consider whether we should just deprecate it in the ACLE instead.
-
Timm Bäder authored
Just delegate to the syntactic form.
-
Mikael Holmen authored
Without the fix gcc warned like ../../clang/lib/Analysis/UnsafeBufferUsage.cpp:2203:26: warning: unused variable 'CArrTy' [-Wunused-variable] 2203 | } else if (const auto *CArrTy = Ctx.getAsConstantArrayType( | ^~~~~~ -
Stephen Tozer authored
The function to print DPValues currently tries to incorporate the function it is part of, which is found through its marker; this means when we try to print a DPValue with no marker, we dereference a nullptr. We can print instructions without parents, and so the same should be true for DPValues; this patch changes DPValue::print to check for a null marker and avoid dereferencing it. Fixes issue: https://github.com/llvm/llvm-project/issues/82230
-
Simon Pilgrim authored
Vector truncations can be pretty expensive, especially on X86, whilst scalar truncations are often free. If the cost of performing the add/mul/and/or/xor reduction is cheap enough on the pre-truncated type, then avoid the vector truncation entirely. Fixes https://github.com/llvm/llvm-project/issues/81469
-
Timm Bäder authored
I'm not sure where this would be needed, but for the time being, removing it fixes a problem.
-
Vyacheslav Levytskyy authored
This PR adds support for atomic instruction on floating-point numbers: * SPV_EXT_shader_atomic_float_add * SPV_EXT_shader_atomic_float_min_max * SPV_EXT_shader_atomic_float16_add and fixes asm printer output for half floating-type.
-
Timm Bäder authored
We need to create a value for them, do that via visit()
-
elhewaty authored
Proof: https://alive2.llvm.org/ce/z/hfbEra Fixes: https://github.com/llvm/llvm-project/issues/73211
-
Timm Bäder authored
We were incorrectly returning true when the allocateLocal() call failed.
-
Timm Bäder authored
-
Momchil Velikov authored
Inline stack probing code may need a scratch register, hence basic blocks where such register is not available cannot be used as prologues. Checking for an available scratch regidster was incorrectly skipped when the function uses stack probing.
-
Momchil Velikov authored
-
Tim Northover authored
Pointers are 64-bits in the DAG, so we need to extend the result of loading the cookie when building the DAG.
-
Julien Schueller authored
I could reproduce using unix makefiles with -j1 option, with version 16.0.6 Closes #61543 Closes #57680
-
Timm Bäder authored
... involving function pointers on the RHS. The conversion to an RValue _can_ be requested, but we just ignore it.
-
SahilPatidar authored
[InstCombine] Fix failure to fold (and %x, (sext i1 %m)) -> (select %m, %x, 0) with multiple uses of %m (#81409) Resolves #81288.
-