clang/AMDGPU: Stop passing redundant -target-cpu to cc1 (#206483)
Now that the exact target is encoded in the triple's subarch field,
-target-cpu is redundant. This avoids polluting the resultant IR with
unwanted "target-cpu" attributes. The net result is the desired codegen
when compiling libraries for a major subarch and linking it into a
program compiled for a specific arch. e.g., compiling for "gfx9-generic"
would pollute the IR with "target-cpu"="gfx9-generic", so codegen
would ultimately be performed for the generic target even after
linking into the concrete gfx9 cpu. The specialization will now be
achieved by merging the triples without the linker or optimization
passes needing to fixup function attributes.
e1000: Rework Wake-on-LAN policy and programming
The driver used the NVM APME default as both the hardware-support
decision and the mutable filter mask. Consequently, an NVM-disabled
but capable port did not advertise wake support, disabling a wake mode
once could keep it disabled across later suspends, and directed-unicast
wake could never be selected.
Require the PCI power management capability to report D3hot PME support
before advertising or arming wake. A PM capability alone does not mean
the function can signal PME from the state used during system sleep.
Separate the board and port capability matrix from the NVM-selected
magic packet default. Read the proper per function NVM word on igb
controllers, cover the newer PCH generations, and retain the documented
legacy, multi-port, and OEM restrictions. Decode the distinct APM
Enable locations used by 82544, 82541EI/82547EI, and the later 8254x
parts. Do not advertise wake on the 82541ER, whose power-management
logic cannot assert PME for wake events. For I210/I211 internal iNVM,
[92 lines not shown]
[clang] Delay dependent co_return promise calls (#218779)
Avoiding selection of return_value or return_void while building
co_return whose operand is type-dependent and keeping it unset until
template init rebuild for a type allows dependent operations like
co_return ctx.f(v) to use promise.return_void() instead of needing
promise.return_value().
Fixes #218368
[clang-format] Keep empty Java interface/record body on one line (#219910)
`AllowShortRecordOnASingleLine` (introduced for C++ records) made
`LineJoiner::tryFitMultipleLinesInOne` route Java `TT_RecordLBrace`
lines to `tryMergeRecord`, which only handles C++ class/struct/union
records. Empty Java `interface` and `record` bodies were therefore no
longer merged onto a single line, regressing the behavior that
`BraceWrapping.SplitEmptyRecord: false` previously provided.
Handle Java records separately and restore the pre-existing
`SplitEmptyRecord`-based merge.
Fixes #219711
clang/AMDGPU: Accept subarch names in --offload-arch
Accept the triple subarch names as aliases. e.g.,
--offload=arch=amdgpu9.50 is equivalent to --offload-arch=gfx950
[MIR] Round-trip all machine metadata nodes (#219612)
MIR only emitted definitions for a subset of metadata referenced by
machine
functions. Other nodes were printed as pointer values and could not be
parsed
back.
Collect metadata referenced by machine instructions, memory operands,
and
variable debug information. Keep debug locations inline so the output
remains
readable.
Parse each machine metadata item with LLVM IR's metadata parser while
preserving the YAML item boundaries. This supports specialized nodes,
cycles,
and forward references without accepting definitions split across list
items,
and removes the old tuple-only parser.
[docs] Remove stale FIXMEs in LibASTMatchers.md (#219741)
Replace the stale "Introduce link to ASTMatchersTutorial.html" FIXMEs
with a link to the existing LibASTMatchersTutorial, drop the
ASTMatchersCookbook FIXMEs (no cookbook exists), and fix the "macros
(see below)" reference which should point to the AST_MATCHER_P section
above.
[AMDGPU] Reject image load merges with mismatched dim (#219923)
dim was missing from the operand equality check, so loads with different
dim could wrongly get merged into one
InstSimplify: Fold nonnull addrspacecast of null to poison
Perform the definitional fold if the source value is null
in the default address space.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
IR: Intersect and drop the addrspacecast nonnull flag
Teach the flag-propagation controls about the nonnull flag
on addrspacecast.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
IR: Add nonnull flag to addrspacecast
Introduce the nonnull flag on the addrspacecast instruction,
asserting that the source pointer is not the null value of its
source address space. If the source is the source-address-space null
value, the result is poison.
The LangRef does not yet acknowdlege the existence of non-0 null
pointers, or null pointers for address spaces other than default,
but will "soon".
This gives the target a way to omit the runtime null check to map
between the null values. Currently AMDGPU works around the lack of
this flag by introducing the hacky llvm.amdgcn.addrspacecast.nonnull
intrinsic in a late target codegen pass.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
cat: add -A, -E and -T flags
Support cat -A, -E and -T, which are commonly used by Linux shell
scripts. -E prints a "$" at the end of each line, -T renders tabs
as ^I, and -A is equivalent to -vET.
MFC After: 1 week
Discussed with: jrtc27
Reviewed by: jrtc27, ziaee
Differential Revision: https://reviews.freebsd.org/D59250
Give the __COUNTER__ pedantic diagnostic a group (#218669)
Adding the pedantic diagnostic after supporting the extension for so
long without correctly diagnosing it is disruptive, so this gives folks
a way to disable just the `__COUNTER__` pedantic diagnostic without
losing all other pedantic diagnostics.
Fixes #196557
[SCEV] Make predicates optional in isKnownMultipleOf (NFC) (#219935)
This allows us to simplify some code in DependenceAnalysis, and brings
the routine in line with other SCEV routines.