[mlir][OpenACC] Use active_par_dims attribute when computing active dims (#217099)
In `computeActiveAndInactiveParDims` function, use the
`acc.active_par_dims` attribute set on privatize/private_local, deriving
inactive dims from the launch dims.
[KnownFPClass] Refactor sNaN handling for KnownFPClass (#216086)
Addresses
https://github.com/llvm/llvm-project/pull/215159#pullrequestreview-4898780491
I have added/modified some helpers to help with the handling of `sNaN`
and `qNaN` propagation
Changes:
- Allow `atan2` to rule out `sNaN` instead of only `NaN` in general.
- Renamed `Known.propagateNaN(KnownSrc)` to
`Known.propagateNonNaN(KnownSrc)`
- Added `Known.propagateNonSNaN(KnownSrc)` (same as `propagateNonNaN`
but does not touch sign or `qNaN`)
- Added two argument versions of `propagateNonNaN` and
`propagateNonSNaN`
Future plans:
- Add `sNaN` handling for `sin`, `cos`, `tan`, and `log`.
[scudo] Fix MTE remapping for cached allocations
When MTE is enabled, force page-alignment for all secondary allocations.
Since the allocation position can shift when reusing a cached block, the
new header page must be remapped with MAP_MEMTAG to enable MTE and the
old header page must be remapped without MAP_MEMTAG to disable MTE, as
it may now be a part of the user playload. This is necessary because
PROT_MTE is sticky and not cleared by the PROT_NONE mapping used during
caching.
Co-authored-by: Christopher Ferris <cferris1000 at users.noreply.github.com>
[CI] Pin runners to us-west cluster (#217111)
We are having scaling issues in the us-central cluster, so use a hack to
pin everything to the us-west cluster while we get things sorted out in
the us-central cluster.
This should be reverted after https://github.com/llvm/llvm-zorg/pull/914
gets applied and we have confirmed scaling is working better.
LLM assisted.
Emit DW_AT_identifier_case for compile units (#216197)
DWARF compile unit tags can contain an attribute that indicates the case
sensitivity of symbols in the source language. This attribute will be
useful in supporting Fortran in lldb (issue# 205872)
Co-developed with Claude Opus 4.6
[CIR] Implement 'init_priority' attribute (#216845)
This attribute sets the order of initialization of a global variable.
The test is pulled from classic codegen, and the rest is pretty rote.
All variables of the same 'priority' are initialized in the same init
function, generated based on the priority number.
[LLVMABI][AARCH64] Add support for simple direct argument cases (#216849)
This adds LLVM ABI library support for AArch64 argument type
classification for scalar and matrix types that are classified as
Direct. Other types are reported as not yet implemented.
This also adds a Clang test for the ABI handling of types which are
handled by the library.
Assisted-by: Cursor / Grok 4.5 (test generation)
[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
[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.
[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.