[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
[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.
[NFC][lsan] Disable HWASan on key_destructor in detached_thread_dlsym.c (#229266)
Test-only change fixing the test added in
https://github.com/llvm/llvm-project/pull/228930.
In `detached_thread_dlsym.c`, `key_destructor` intentionally runs on the
final (`PTHREAD_DESTRUCTOR_ITERATIONS`) TSD destruction pass after
`HwasanTSDDtor` has called `Thread::Destroy()` and zeroed
`__hwasan_tls`.
Mark `key_destructor` with `__attribute__((no_sanitize("hwaddress")))`.
Fixes https://lab.llvm.org/buildbot/#/builders/51/builds/45276.
Assisted-by: Gemini
[flang][acc] Preserve association status of privatized pointers (#228581)
Privatization allocated a target and copied it even when a Fortran
pointer or allocatable was unassociated or unallocated. That reads
through a null address. The private allocation now follows the original
association status. A reduction stores its initial value only when that
storage exists. The target is copied only when one exists.
Before:
```
%private = fir.allocmem f32
// Box %private into the private descriptor.
hlfir.assign %src to %private temporary_lhs : f32, !fir.heap<f32>
```
After:
```
%private = fir.if %is_associated -> !fir.heap<f32> {
%allocation = fir.allocmem f32
[9 lines not shown]
[CIR][OpenMP] Add support for host_eval so that SPMD kernels can be used
This patch adds support for host_eval so that SPMD kernels and in the future
num_threads etc. can be implemented correctly.
Assisted-by: Cursor / Claude Sonnet 5 High
[mlir] Migrate AMDGPU/ROCDL to targets, not chipset versions
**migration tl;dr:** Replace usages of `amdgpu::Chipset` with `ROCDL::TargetInfo`, ideally move from `chipset=` to `arch=`. If you don't use upstream pipelines, call 'TargetInfo::migrateArchFeaturesToModuleFlags` at the appropriate location.
Further note: if you've got a build pipeline that's getting a `gfxXXX` name from something like `rocm_agent_enumerator`, using a full triple name like the ones you get from `rocminfo` is preferred.
`amdgpu::Chipset` was an awkward hack that was hard to keep up to date
with changes in the compiler/new architectures, and didn't properly
support generic targets (and has been strongly disfavored by the
compiler team).
This PR replaces `amdgpu::Chipset` with `ROCDL::TargetInfo`, a
structure that uses LLVM's TargetParser and the underlying LLVM
features tables to get the real nature of the target being compiled
for.
This also helps MLIR move to
new-style (`-mtriple=amdgpuX.YZ-amd-amdhsa`) over "old
style" (`-mtriple=amdgcn-amd-amdhsa -mcpu=gfxXYZ`) triples.
[36 lines not shown]
[SLP] Clear VectorizableTree in before calling canBuildSplitNode() from tryToReduce() (#220014)
The tree may be left-over from the prior vectorization attempt in this case which can affect the decision.
[DAG] Add basic deinterleave/interleave(poison) -> poison combines. (#228858)
This mirrors the existing combine currently performed for shuffles,
converting a deinterleave or interleave with all undef inputs to a undef
output.
The st3 combine currently sometimes overeagerly triggers first.
[CIR][OpenMP] Add support for host_eval so that SPMD kernels can be used
This patch adds support for host_eval so that SPMD kernels and in the future
num_threads etc. can be implemented correctly.
Assisted-by: Cursor / Claude Sonnet 5 High
vmd(8): better handling of virtual switch descriptions
in vm.conf, switch definitions can now include the keyword 'description':
switch myswitch {
description "foo"
interface veb0
}
will cause vmd to change the host veb0 interface description to "foo".
switch myswitch {
description
interface veb0
}
eg "description" by itself without a provided description,
will simulate the 8.0 and previous behavior; vmd will change the host
veb0 interface description to "switch%d-%s", where %d is the numerical
[17 lines not shown]