[Offload][Omp] Use libomptarget values to initialize the Device Environment (#238271)
Use the values for total devices and device id from the libomptarget
side instead of the Plugin Interface.
With this not only we remove another usange of the Plugin Interface, but
make it more correct. As those values were only correct if only one RTL
was being used (probably 99.9% of the cases). This is a likely a
leftover of when it was initialized on the
Plugin side.
New test created by Claude.
NAS-144958 / 28.0.0-BETA.1 / Fix more UPS tests (#20087)
Production code issue: `handle_upssched_event` would shutdown the system
if `upsc` exits 1 while `upsd` restarts or the driver reconnects.
Forced shutdown flag was then persistently stored in `upsd` and
interfered with further tests.
Additionally, `ups.status` flags were compared as strings, not sets,
which was fragile.
[Offload][Omp] Replace usages of Plugin getName (#237269)
Create a new class `PlatformTy` to add liboffload platform related
operations. Add a new `getName` method and use it substitute lingering
and already substituted `GenericPluginTy::getName` usages.
The new method also fixes a bug where we were printing an extra `NULL`
character with the platform name.
Assisted by Claude.
[LV] Allow runtime checks for low trip count loops without scalar epilogues (#197391)
Previously, under `CM_EpilogueNotAllowedLowTripLoop`, any loop with a
trip count below `TinyTripCountVectorThreshold` that required runtime
checks was barred from vectorization. However, vectorization should
still be considered profitable as long as the runtime check overhead
does not exceed the actual vectorization gains.
This patch makes `CM_EpilogueNotAllowedLowTripLoop` rely directly on the
minimum profitable trip count check. After this patch, vectorization is
only prohibited if the trip count is below the minimum profitable trip
count. `CM_EpilogueNotAllowedLowTripLoop` will focuse on preventing
scalar epilogue generation rather than restricting runtime checks.
TODO: Refine the cost calculation for scalar epilogues to eventually
remove `CM_EpilogueNotAllowedLowTripLoop`.
This change was suggested by Alexey Bataev in #176754 .
[Clang][OpenMP] Fix capture of variables under nested default(firstprivate) (#216329)
This patch fixes a data-sharing attribute lookup in isOpenMPCapturedByRef
to use the default data-sharing attribute at the capture level being
considered, instead of that of the innermost directive. The adjacent
check for an explicit data-sharing attribute already queries that level.
Previously, a construct with default(firstprivate) or default(private)
nested inside e.g. a 'parallel' region would cause the 'parallel'
region to capture the scalar variables it shares by copy, rather than
by reference. Writes made through the copy via several routes were then
silently lost; the result of a reduction on the nested construct, a
write to a variable listed in a 'shared' clause on the nested construct, or a
write made by the 'parallel' region itself after the nested construct
had referenced the variable (the capture kind is decided by the first
reference). This affects globals and function-scope statics as well as
local variables, and happens under plain -fopenmp (currently defaulting
to OpenMP 5.1).
[8 lines not shown]
[mlir][tosa] Apply error_if checks in tosa validation without strict mode (#235741)
Enable most error_if checks by default rather than requiring
`strict-op-spec-alignment`. As a consequence, enable error_if checks
in the tosa-to-linalg lowering pipeline.
For resize in particular, behaviour such as broadcasting the input
height and width is now disallowed in validation. However, some checks
are omitted as they can be too strict for some implementations, such
as scaling limits.
Also note that the current implementation requires
cond_if and while_loop operations be isolated from above. If this
restriction is too strict, the check can be relaxed similarly to resize.
The commit also includes a small refactor, opting to split the
error if checks between two new files: tosa-validation-invalid-strict
and tosa-validation-invalid.
[libc] Use a syscall wrapper for openat
This PR move openat behind the centralized syscall wrappers, following libc/docs/dev/syscall_wrapper_refactor.md.
sysutils/proc-cli: import proc-cli-2.2.0
proc finds, inspects and stops processes and ports. Target a process by
port (:3000), PID, name or path, see what holds a port and why it is
there, and free it. Commands that change anything ask first, preview
with --dry-run, and print JSON with stable exit codes for scripts.
NetBSD is supported upstream since 2.2.0, whose CI runs the whole test
suite on NetBSD 11. Ports come from sockstat(1) and open files from
fstat(1), both in the base system, so it has no run dependencies.
www/caddy: Emit access log plain to socket and filesystem at the same time when LogAccessPlain is enabled.
LogAccessPlain is mostly used by crowdsec and splitted the access log out into separate files in /var/log/caddy/access,
but for debugging having it in both log streams is better, which is possible now.
[clangd] Move clang-tidy integration into a FeatureModule (#236054)
The main purpose of this patch is to improve `clangd`s maintainability
by separating `clang-tidy`-specific logic from the `clangd`s core
parsing and diagnostic logic and consolidating that integration in a
single module. This also improves maintainability of `clang-tidy`
integration itself.
The diff is quite large, but most of it moves existing `clang-tidy`
logic as is, together with its original comments (and FIXMEs), into a
`FeatureModule`. Increase of ~200 lines primarily comes from module
structure, provider ownership, and application/test adapters.
To make this easier to understand and review, I created (with LLM help)
a [visual
walkthrough](https://arcsinx.github.io/clang-tidy-feature-module-walkthrough/)
showing the code moves, preserved comments, and integration changes.
RFC:
https://discourse.llvm.org/t/rfc-clangd-move-clang-tidy-integration-into-a-featuremodule/91707
Reland "[VectorCombine] Combine adjacent loads feeding as shuffle operands" (#229662)
Sanitizer reported overflow issue for the
Transforms/VectorCombine/AArch64/shuffle-of-adjacent-loads.ll in PR
#213007 due to which PR #213007 had to be reverted.
**Actual issue**
When we compile with `-DLLVM_USE_SANITIZER=Undefined`, we see the
following error
```
/home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/IR/Instructions.cpp:1844:50:
runtime error: signed integer overflow: 2147483646 * 2 cannot be
represented in type 'int'
#0 0xc250e57616a4 in
llvm::ShuffleVectorInst::isValidOperands(llvm::Value const*, llvm::Value
const*, llvm::ArrayRef<int>)
/home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/lib/IR/Instructions.cpp:1844:50
[5 lines not shown]
translate-toolkit: updated to 3.20.2
3.20.2
Formats and Converters
Compressed translation files
Add optional limits on decompressed bytes and extracted units when
loading gzip and bzip2 files through the storage factory
ODF and IDML
Add optional limits on XML bytes, elements, and extracted units
Skip unnecessary ODF reference scanning when there are no embedded
documents
YAML and Markdown
Reject cyclic YAML collections and limit alias traversal and
extracted units in YAML files and Markdown YAML front matter
Allow callers to adjust or disable the traversal and unit limits
Other
[4 lines not shown]
[analyzer] Standardize loop body notes in BugReporter (#236804)
Until now, there was no consensus between using single spaces or double
spaces after sentence endings in the emitted diagnostics by the Clang
Static Analyzer (CSA). This led to inconsistently formatted diagnostics
by the CSA.
Currently there are the following cases where the CSA is not consistent
with the Clang compiler:
- 1: Using double spaces after sentence endings
- 2: Using full sentences in diagnostics
- 3: Using a capital letter at the start of the diagnostic
This PR resolves (1) by removing the double spaces after sentence
endings in `BugReporter` and converts those multiples sentences into one
using `;`. #228777 resolves (1) in the rest within the CSA while also
partially resolves (2) because for the affected lines it removes the
full sentence diagnostics as well.
[4 lines not shown]
[offload][acc] Add the initial version of libacctarget (#231174)
Adds the initial version of the OpenACC runtime library libacctarget.
This
version currently only makes sure everything links correctly and there
are no
undefined symbols and that the initialization of the PluginManager works
correctly. The implementation will follow in incremental patches.