[lldb][Process/FreeBSDKernelCore] Fix thread ordering (#187976)
In #178306, I made an incorrect assumption that traversing `allproc` in
reverse direction would give incremental pid order based on the fact
that new processes are added at the head of allproc. However, this
assumption is false under certain circumstance such as reusing pid
number, thus failing to sort threads correctly. Without using any
assumption, explicitly sort threads based on pid retrieved from memory.
Fixes: 5349c664fabd49f88c87e31bb3774f40bf938691 (#178306)
---------
Signed-off-by: Minsoo Choo <minsoochoo0122 at proton.me>
[libc][docs][NFC] Rework GPU building documentation (#191381)
Reworked libc/docs/gpu/building.rst to match the style of
getting_started.rst:
* Removed mkdir and cd commands.
* Used -S and -B flags for CMake.
* Used -C flag for Ninja.
* Split commands into smaller blocks with brief explanations.
Use the same terminology as elsewhere in the LLVM libc docs and move
away from the deprecated runtime terms.
* Standard runtimes build -> Bootstrap Build
* Runtimes cross build -> Two-stage Cross-compiler Build
[llvm-dwarfdump][LineCov 2/3] Add coverage baseline comparison and line table coverage in isolation (#183790)
Patch 2 of 3 to add to llvm-dwarfdump the ability to measure DWARF
coverage of local variables in terms of source lines, as discussed in
[this
RFC](https://discourse.llvm.org/t/rfc-debug-info-coverage-tool-v2/83266).
This patch adds the ability to compare a variable’s coverage against a
baseline, e.g. an unoptimised compilation of the same code. This is
provided using the optional `--coverage-baseline` argument.
When a baseline is provided, the output also includes a per-variable
measure of the line table’s coverage (`LT`, `LTRatio`), distinct from
the variable’s coverage proper. See section 2.2 of the RFC for details
on this metric.
[libc++] Fix incorrect links and broken formatting in CSV status files (#191289)
Also, update the conformance script to look for closed issues when
searching for unlinked issues.
[Flang][Docs][NFC] Move OpenMP API extensions to separate document (#186981)
This PR follows suit of the Extensions.md document and provides the same
file for OpenMP API extensions. These have previously been stored in
OpenMPSupport.md. Having a more centralized view and place for these
extensions seems useful.
---------
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot at users.noreply.github.com>
[lldb][Process/FreeBSDKernelCore] Switch to LLDBLog::Process (#191408)
Failure to read all required fields for msgbuf isn't ObjectFile's fault
but FreeBSD-Kernel-Core plugin specific. Thus this should be logged
through `LLDBLog::Process` rather than `LLDBLog::Object`.
Signed-off-by: Minsoo Choo <minsoochoo0122 at proton.me>
[LV][NFC] Remove llvm.ident, tbaa and other attributes from tests (#191375)
While in this area I also removed unnecessary annotations for wchar_size
and also cleaned up some more function attributes.
[OpenMP][MLIR] Modify lowering OpenMP Dialect lowering to support attach mapping
This PR adjusts the LLVM-IR lowering to support the new attach map type that the runtime
uses to link data and pointer together, this swaps the mapping from the older
OMP_MAP_PTR_AND_OBJ map type in most cases and allows slightly more complicated ref_ptr/ptee
and attach semantics.
[libc] Add generate-libc-headers custom target (#191160)
Added the generate-libc-headers custom target depending on libc-headers.
This allows troubleshooting headers without needing to install them
first.
[flang][OpenMP] Move check for threadprivate iteration variable (#191208)
This moves the test of whether the iteration variable of an affected DO
loop is marked as threadprivate. This makes the `ordCollapseLevel`
member unnecessary.
Issue: https://github.com/llvm/llvm-project/issues/191249
[Flang][OpenMP][Offload] Modify MapInfoFinalization to handle attach mapping and 6.1's ref_* and attach map keywords
This PR is one of four required to implement the attach mapping semantics in Flang, alongside the
ref_ptr/ref_ptee/ref_ptr_ptee map modifiers and the attach(always/never/auto) modifiers.
This PR is the MapInfoFinalization changes required to support these features, it mainly deals with
applying the correct attach map type and manipulating the descriptor types maps for base address
and descriptor so that when we specify ref_ptr/ref_ptee we emit one of the two maps and when we
emit ref_ptr_ptee we emit our usual default maps. In all cases we add the "glue" of an new
attach map except in cases where a user has provided attach never. In cases where we are
provided an always, we apply the always map type to our attach maps.
It's important to note the runtime has a toggle for the auto map behaviour, which will flip the
attach behaviour to the newer semantics or the older semantics for backwards compatability (outside
the purview of this PR but good to mention).
[AMDGPU] Do not emit function prologue on naked functions (#191398)
Summary:
Naked functions are intended to allow the user to write the entirety of
the function block, so we shouldn't include the `waitcnt` instructions
for them.
[SystemZTTI][CostModel] Improve SystemZ cost model for scalar Read-Modify-Write Sequence, Fix #189183 (#190350)
This patch improves the SystemZ cost model to identify Read-Modify-Write
sequences
that can be folded into a single instruction (e.g., ASI, NI, OI).
If a load, a scalar arithmetic operation (ADD, SUB, AND, OR, XOR) with
an
immediate, and a store all target the same memory location and have no
external uses, the cost of the arithmetic and store insn should bw 0.
This implementation does not include TTI::TCK_RecipThroughput CostKind,
as
it causes regression in non-power-2-subvector-extract.ll.
Fixes #189183. (Refer it for example)
---------
Co-authored-by: anoopkg6 <anoopkg6 at github.com>
[OpenMP][MLIR] Modify lowering OpenMP Dialect lowering to support attach mapping
This PR adjusts the LLVM-IR lowering to support the new attach map type that the runtime
uses to link data and pointer together, this swaps the mapping from the older
OMP_MAP_PTR_AND_OBJ map type in most cases and allows slightly more complicated ref_ptr/ptee
and attach semantics.
AMDGPU: Match fract from compare and select and minimum (#189082)
Implementing this with any of the minnum variants is overconstraining
for the actual use. Existing patterns use fmin, then have to manually
clamp nan inputs to get nan propagating behavior. It's cleaner to
express this with a nan propagating operation to start with.
[clang-tidy] Fix readability-identifier-naming FP with DefaultCase on function templates (#189788)
Closes #189755
---------
Co-authored-by: EugeneZelenko <eugene.zelenko at gmail.com>
Co-authored-by: Daniil Dudkin <unterumarmung at yandex.ru>
[Clang] Pass toolchain paths unconditionally in linker wrapper (#191311)
Summary:
Previously we used the auto-forwarding mechanism to handle options like
forwarding --cuda-path. The problem is that this went over the toolchain
options and that meant if someone used just bare `--offload-link` there
would be no CUDA or ROCm toolchain to figure out if we should forward
it. Just do this unconditionally for all toolchains, there's no harm in
setting it if it's unused.
Fixes: https://github.com/llvm/llvm-project/issues/190979
[acc] Support for Optional arguments in firstprivate recipes (#190079)
Add support for explicit of implicit firstprivates that are Fortran
Optional arguments.
[AMDGPU] Add amdgcn.av.global.(load|store).b128 intrinsics
The two new intrinsica llvm.amdgcn.global.load.b128 and
llvm.amdgcn.global.store.b128 have availability and visibility semantics as
described in #191246. Each of them takes a scope operand that is then translated
to target-specific cache policy bits. This allows the user to control how the
side-effects of these loads and stores are made visible to other threads.
This is patch was extracted from #172090.
Co-authored-by: macurtis-amd <macurtis at amd.com>
Assisted-by: Claude Opus 4.6
[GlobalISel] Add GIM_CheckMachineOperandType for matching metadata operands
Add a new match table opcode GIM_CheckMachineOperandType and a
corresponding MachineOperandTypeMatcher class to support matching
operands by their MachineOperand type. This enables GlobalISel pattern
matching for intrinsics that have metadata operands (MVT::Metadata),
which previously could not be matched in the generated selector.
This is patch was extracted from #172090.
Co-authored-by: macurtis-amd <macurtis at amd.com>
Assisted-by: Claude Opus 4.6