style.mdoc.5: Document Nd style
The Nd macro takes the rest of the line as an argument,
so there is no need for extra quoting.
MFC after: 3 days
(cherry picked from commit 4ef1a73c22f8cd07f733bdeb6ff49da28ea8aa93)
[X86][GlobalISel] Explicitly legalize G_INVOKE_REGION_START (#203503)
Removing dependency on the legacy ruleset similarly to #197374
The missing testing coverage was found during LegacyLegalizerInfo
removal in #197308
[LifetimeSafety] Count escape facts when classifying persistent origins (#204485)
computePersistentOrigins marks an origin persistent (kept across CFG
blocks)
only if it appears in more than one block, but it omitted
OriginEscapesFact.
A global is not seeded at function entry, so a global assigned a stack
address
on a conditional or loop path had its origin appear only in the storing
block;
misclassified as block-local, its loan was dropped at the join before
the
escape check, a silently missed dangling-global
(stack-use-after-return).
Count the escaped origin as a cross-block appearance.
Assisted-by: Claude Opus 4.8
Co-authored-by: Gabor Horvath <gaborh at apple.com>
[Flang][Driver] Support for -fsplit-lto-unit option in flang driver (#202858)
When mixing Fortran objects from Flang with C/C++ objects compiled by
Clang during a combined LTO build, it is necessary to ensure that all
files use the same setting for split-lto-unit. This requires the support
for -fsplit-lto-unit option in the flang driver. This support is added
as part of this commit.
Co-authored-by: Shivarama Rao <shivarama.rao at amd.com>
AMDGPU: Add subtarget feature for controllable xnack modes
This replaces the previously removed xnack-any-only feature,
with the inversion xnack-on-off-modes. All pre-gfx12.5 xnack
targets support the controllable mode. Ignore explicitly
set xnack settings the same way as is done for xnack requests
on other unsupported targets.
AMDGPU: Remove xnack-any-only subtarget feature and handling (#204514)
This reverts commit f4caa0a172d96597c375e6b6b2192c289723a6b9.
This feature was added to gfx12-5-generic only, which does not make
sense given that both gxf1250 and gfx1251 have the same unconditional
xnack handling. It also does not make sense to diagnose trying to use
a specific xnack mode on the generic target only, and only from the
backend.
The current feature management is a confusing mess, given that we have
2 parallel feature systems. AMDGPUTargetParser has a table containing
a bitmask of features, which already contained FEATURE_XNACK_ALWAYS
for gfx1250/gfx1251, but not gfx12-5-generic. Add this handling there
so the sanitizer detection is consistent on the generic target.
These 2 feature tables probably should be unified in some way. We also
probably should have a subtarget feature for the xnack handling, but it
should be inverted. xnack-any-only is an antifeature, in that it removes
functionality from the base target. It would be better to invert this,
so all of the older targets support configurable xnack modes.
[AMDGPU] Capping max number of registers to function's occupancy budget for indirect calls (#199765)
Depends on https://github.com/llvm/llvm-project/pull/199746
Changed the SetMaxReg Lambda function to cap at
ST.getMaxNumVectorRegs(F) for VGPRs and AGPRs and ST.getMaxNumSGPRs(F)
for SGPR. ST.getMaxNumVectorRegs(F) and ST.getMaxNumSGPRs(F) returns the
budget for the given function F and is mainly determined by the
occupancy of the function.
This cap is needed since the module's max could overestimate register
usage because it includes functions that earlier in the compiler was
determined inaccessible by that indirect call. ST.getMaxNumVectorRegs(F)
and ST.getMaxNumSGPRs(F) were calculated according to an more accurate
call graph.
This fixes an issue of overinflated number of VGPR/AGPR for kernels that
have indirect function calls. This inflation has led to some kernels
with indirect calls to go over the limit for VGPR/AGPR and crash.
[5 lines not shown]
[CommandLine] Make cl::boolOrDefault a scoped enum
Prevents implicit conversion to bool/int, where BOU_FALSE wrongly
evaluated as true. All uses qualified as cl::boolOrDefault::BOU_*.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply at anthropic.com>
[NFC][AMDGPU] Introduce SIInstrFlags predicates for TSFlags access (#201512)
Add inline predicate templates to SIDefines.h for each TSFlags bit
(isSALU, isVOP3, isFLAT, isMaybeAtomic, hasFPClamp, ...) plus compound
predicates (isAtomic, isSegmentSpecificFLAT, isImage, isVMEM).
Route all SIInstrInfo.h thin wrapper bodies through the new predicates
instead of reading TSFlags bits directly.
---------
Co-authored-by: Claude Sonnet 4.6 <noreply at anthropic.com>
Copy over iked's proc.c, with the addition that proc_run()'s run argument
is called after IMSG_CTL_PROCREADY is handled. This addition makes sure
that run() can drop recvfd pledge if the process itself doesn't need it,
and data can be send to peers immediately.
Help from, and ok jmatthew@
audio/gsm: Update 1.0.23 => 1.0.24
Changelog:
Fri Mar 6 07:16:24 2026 Jutta Degener (jutta at pobox.com)
* Release 1.0 Patchlevel 24
Left-shifting negative signed integers is undefined behavior as per
the C standard; so let's not do that.
Thanks to Nanang Izzuddin <nanang at teluu.com> for an exhaustive list
of places where we definitely did do that, and for the patience to
wait until I managed to Actually Read What the C99 Standard Says,
rather than what I _want_ it to say.
Also, don't forget the P0() and the void and int return types in a few
places of the test code.
Sponsored by: UNIS Labs
CodeGenPassBuilder: Use cl::boolOrDefault directly in CGPassBuilderOption
Current implementation that uses std::optional<bool> captures cl::BOU_FALSE,
for example -global-isel=0, as true. Explictly setting option to 0 should be
false, forced option not set.
This could be fixed but I find it cleaner to use boolOrDefault directly and
use same logic as in TargetPassConfig.
Options EnableIPRA and EnableGlobalISelAbort are left as optional since for
them it is explictly checked if they are set using getNumOccurrences.
boolOrDefault has encoded unset option.
Revert "[SimpleLoopUnswitch] Generalize the notion of trivial unswitching" (#204538)
Reverts llvm/llvm-project#193989.
That change caused failed assertions, see that PR for examples.
[clang][bytecode] Diagnose jumps to case labels in StmtExprs (#204539)
We need another bit of state to save if the switch was also in the
StmtExpr or not.
Reapply "[LifetimeSafety] Support C Language in LifetimeSafety" (#204536)
There are a few constraints that make supporting C a bit cumbersome:
* C assignment expressions are rvalues, unlike C++ assignment
expressions. The analysis has to account for the different origin shape
of the assignment result by stripping an origin from `LHSExpr`.
* Function addresses in C do not need lifetime tracking. Taking `&f`
should not create origins because functions do not have local object
lifetime (unlike in C++).
* GNU C permits `void*` subscripting/pointer arithmetic. Expressions
like `bytes[0]` (where `bytes` is `void*`) have type `void` and do not
produce an addressable object with origins, even though `void*` itself
can carry pointer origins.
* Some C subscripts, such as vector subscripts, are not GLValues, so
they do not have storage origins to track.
* `va_arg(ap, array_type)` is undefined behavior, so we skip it instead
of trying to model origins for it.
* C does not have a spelling for `[[gsl::Owner]]` / `[[gsl::Pointer]]`,
[24 lines not shown]