[clang] Pass only CVR array index qualifiers to ASTContext (#225582)
ArrayType stores only the CVR index qualifiers, but array declarators
may also pass `__unaligned` or `_Atomic`, so getIncompleteArrayType and
getDependentSizedArrayType insert nodes whose profile doesn't match the
lookup. Mask the qualifiers in BuildArrayType and assert in ArrayType.
Fixes #223150
Aided by Opus 5.5
[SanitizerCoverage] Don't create comdat for unnamed functions (#228959)
MergeFunctions::mergeTwoFunctions may turn identical functions into a
private unnamed function, which trips `assert(F.hasName())`. Without
assertions, all unnamed functions share an empty-name IR comdat (which
yields no ELF section group per MCContext::getELFSection).
Fix #228820: Just drop comdat for unnamed functions. SanitizerCoverage
then retains the metadata sections via `llvm.used`. It's acceptable to
have redundat metadata sections with discarded associated text sections.
Improve comments at https://reviews.llvm.org/D97430 modified code.
[ELF] Error on non-TLS definition with TLS reference (#228658)
postParse() reports an error when a TLS definition has a non-TLS
reference. Extend it to cover non-TLS definition with a TLS reference,
which GNU ld also errors.
Before LTO, a TLS definition in a bitcode module asm still has a type of
STT_NOTYPE. Exempt TLS references in this case.
RelocScan-time error checking is not useful - assemblers set STT_TLS
when a symbol is used by a TLS relocation.
[SelectionDAG] Preserve cache hint metadata during legalization (#225273)
We want to preserve cache hint metadata everywhere that alias analysis
metadata is preserved. Even if an operation is expanded during
legalization, it makes sense to preserve cache hint metadata on each
part. For example, a load with an eviction policy should get expanded
into multiple loads with the same eviction policy. In the future it
might make sense to provide a TTI hook for how to propagate the
metadata, but this is simplest for now, and usually correct.
To propagate metadata, I introduced `getNonRangeMMOMetadata`. There are
probably some cases here where range metadata can be preserved, but I
don't want to touch that. That can be done as a follow-up.
There are 3 cases where we were not preserving `AAInfo` where we are
now.
[Expand to a bitconvert of the value to the integer type of the same
size, then a (misaligned) int
[7 lines not shown]
Update former maintainers (#229276)
b2ff0e8eae8236e7555afa6026e0cf251af8c4ae updated the
OpenMPOpt/Attributor maintainers but did not add Johannes to the former
maintainers list.
[InstCombine] Fix ProfCheck for canonicalizeClampLike (#229269)
We cannot know the profile in the general case (see the added comment),
so mark the selects unknown for now. In the case that C2 is at one of
the bounds we can, but I expect this case is rare enough that handling
it explicitly doesn't make much sense.
devfs_open: do not access dsw after dev_relthread()
Noted and reviewed by: markj
Fixes: 850d4562928e ("cdevsw: add D_NONPASSABLE flag")
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D60393
[flang][cuda] Reject implicit transfer of assumed-size device arrays (#229128)
An assignment in host code whose right-hand side mixes device data with
host data or constants is lowered as an implicit data transfer: each
device object is copied whole to a host temporary created from its mold,
and the expression is evaluated on the host. The size of an assumed-size
array (an assumed-size dummy or a Cray pointee declared with `(*)`) is
unknown, so the temporary cannot be created and lowering crashed with an
invalid fir.convert:
double precision :: a(*)
pointer (ip, a)
attributes(device) :: a
h = h + a(3)*2.0d0
Report a semantic error instead when such an assignment references an
assumed-size device array. Assignments that do not need an implicit
transfer are still accepted: element transfers like `h = a(3)` and
host-to-device assignments like `a(3) = h*2.0d0`.
This align flang with the reference compiler.
[lldb] Unload Wasm modules the stub no longer reports (#227814)
When a Wasm engine such as JavaScriptCore reloads a page, the modules it
ran go away and new instances take their place. LLDB kept two kinds of
stale module around.
ProcessGDBRemote::LoadModules never unloads the target's executable,
which no library list includes. A Wasm target has no executable, so
Target::GetExecutableModule falls back to the first module, and the
first module the stub ever reported stayed in the image list for good.
Let the dynamic loader say whether the process runs a main executable,
and have the Wasm loader say it does not.
A module reloaded under the same name matched the module read from
memory at its old address, and LLDB then moved that module to the new
one. That trips an assertion in ObjectFileWasm::SetLoadAddress, and
otherwise leaves a module whose image came from an instance that is
gone. A module read from memory now only matches a spec at the address
it was read from, like ModuleSpec::Matches already does for two specs.
rdar://175013476
fixup! [AMDGPU] Measure MFMA read hazards at each producer
Turn the walk into a small class, WindowDeficitSearch, with its state as
members, and count wait states through one helper that states the
inline asm assumption.
AI-assisted.
devel/guile-lib: Change to guile30 instead of guile22
The only users in pkgsrc+wip are:
wip/g-golf, which is maintained and wants 3.0
devel/g-golf, which is not maintained and wants 2.0 (not 2.2!)
My belief is that there are zero people that are using guile-lib from
pkgsrc with guile 2.2; if so we should probably version it.
[AMDGPU] Fix missed WMMA C-operand co-exec hazard
The gfx1250 WMMA co-execution hazard check treats only A, B and the
SWMMAC index as registers the in-flight MMA still reads. C (src2 of a
non-SWMMAC WMMA) is missing, so a VALU scheduled into the MMA's shadow
can clobber C and the MMA consumes the new value.
This is latent while C is tied to vdst, since the existing D check then
covers it. It miscompiles where the tie does not hold: for
v_wmma_bf16f32_16x16x32_bf16, whose D is narrower than C, and for the
_threeaddr form of any WMMA.
scapy: Fix send() and friends for NetBSD, bump revision
Scapy assumes that PF_ROUTE is 17 like on other *BSD systems.
However, for NetBSD, PF_ROUTE has been 34 since 6.0 release.