[ObjcARCContract] Do not replace llvm.lifetime argument. (#216991)
Only alloca or poison is allowed as arguments for lifetime intrinsics.
Before replacing, check if the operand can be replaced with a variable
and skip replacement if it is not valid.
Fixes a verifier crash in the added test case.
PR: https://github.com/llvm/llvm-project/pull/216991
bhyve: Add SPDX-License-Identifier tag
Reviewed by: emaste
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 499d0f04f55e52327d624d27ead3a0d16e3b465a)
[CIR] Set alignment correctly in getOrCreateConstAggregateGlobal (#216321)
Just a drive-by that I discovered while debugging something else, we end
up not getting the 'alignment' of these aggregates set at all. This
patch just wires through the alloca's alignment onto these constants,
which matches classic codegen.
[libc] Implement freopen (#207837)
Add implementation of freopen. This involved some refactoring of the
internal FILE. Currently it's only implemented for linux, despite being
a C standard function. This is because POSIX adds several features and
ties the implementation tightly to the concept of file descriptors.
Other platforms will need separate implementations.
Needed for #191075
Assisted-by: Automated tooling, human reviewed.
sound: Use unsigned long instead of legacy u_long
No functional change intended.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
(cherry picked from commit afe56ee24679d6584acf02dd17f6ed52c052abe7)
[MLGO] Model selection for models lowered through EmitC (#212650)
This adds support for lowering models through an MLIR based pipeline and
selecting between one or more of them. It creates the `-mlgo-model` CLI
flag in `MLInlineAdvisor` to select between available models which are
configured through the `LLVM_MLGO_MODELS` build flag.
[clang-tidy] Add AllowReferencedInitialValues to `readability-enum-initial-value` (#189459)
Add a new `AllowReferencedInitialValues` option to the
`readability-enum-initial-value` check.
When enabled, enumerators initialized by referencing another enumerator
in the same enum (e.g., `last = first`) are allowed, and the remaining
enumerators are checked for consistency.
This **implements** the `INT09-C-EX1` exception from the [CERT C Coding
Standard](https://wiki.sei.cmu.edu/confluence/spaces/c/pages/87152467/INT09-C.+Ensure+enumeration+constants+map+to+unique+values#INT09C.Ensureenumerationconstantsmaptouniquevalues-Exceptions).
The option defaults to `false` to preserve existing behavior.
Example:
```cpp
// OK when AllowReferencedInitialValues is true.
enum E {
first,
second,
[7 lines not shown]
[clang][lex] Deduplicate `-Wheader-shadowing` diags (#216748)
The `-Wheader-shadowing` diagnostic emits duplicate diagnostics. This PR
deduplicates these diagnostics by caching the check per file name.
[AMDGPU] Configure the software pipeliner policy
Set the pipeliner policy in overridePipelinerPolicy(): raise the maximum MII
and opt into the generic register-pressure detector.
MFMA latencies push the MII of otherwise pipelineable loops past the generic
limit of 27, so AMDGPU raises it to 256, which covers the II distributions
observed across Composable Kernels and Triton workloads on gfx950. Removing
the limit entirely pipelines no additional loops on those workloads and costs
around 23% more compile time, so the bound stays finite.
Enable the generic register-pressure detector so schedules exceeding the
target-provided pressure-set limits are rejected and retried at a higher II.
games/vkquake: Update 1.34.1 => 1.35.0
Notable changes:
+ Dynamic lighting if dynamic shadows set to medium+ and ray tracing GPU
+ Mods menu now shows friendly mod names
+ Bugfixes and latency improvements
+ SDL3 is now the default upstream and in port
+ Port now has pkg message detailing setup instructions
+ Port no longer installs a build artifact, vkquake.pak
PR: 296635
Approved by: Amelia Marsh <seafork at disroot.org> (maintainer timeout)
Fix stale-SID recovery test to match stable/26's call_sync-based restart
PR #19223 (call_sync2 migration) wasn't backported here, so
_recover_ad still restarts idmap via middleware.call_sync, not
call_sync2. Update the test to match, instead of pulling in the
unrelated migration.