clang/AMDGPU: Respect __launch_bounds__ attribute (#215615)
Currently the HIP headers manually implement this with a
macro setting amdgpu attributes, and the proper clang attribute
is silently ignored. Directly map the proper attribute into
the target IR attributes. The first argument sets
"amdgpu-flat-work-group-size" and the second (reinterpreted by HIP
as minimum waves per EU) sets "amdgpu-waves-per-eu". An explicit
amdgpu_flat_work_group_size / amdgpu_waves_per_eu attribute takes
precedence. This matches the launch_bounds macro in the HIP headers,
which can now be dropped.
The 3rd maxclusterrank argument is only handled for NVPTX, so restrict
the sm_90 arch check to NVPTX targets and ignore the third argument on
other targets.
Fixes #91468
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
[dyndbg][LLVM] Implement dynamic debugging support (#194854)
This patch adds support to LLVM to prepare a module for dynamic debugging.
`prepareForDynamicDebugging` modifies the input module (intended to be the
"optimized" module) and returns a modified clone (intended to be the
"unoptimized" module).
The (to be) optimized module holds global data referred to by both modules, and
all calls in the (to be) unoptimized module are to the optimized module
functions. To facilitate this the optimized module is modified, adding
external-linkage aliases for local symbols.
For more detail see RFC https://discourse.llvm.org/t/90113 and documentation at
llvm/docs/DynamicDebugging.md.
In later patches Clang will use this utility to implement ahead of time dynamic
debugging (compiling both optimized and unoptimized modules fully), though
additional modes may be supported in the future.
[libc++][ranges] Fix the LWG 3568 test for `basic_istream_view` (#215589)
The previous test was dereferencing `begin()` iterator on empty view
which is UB, because `begin() == end()`.
A new test case was suggested in a post-merge feedback in #193891, which
verifies LWG3568 through constant evaluation. Such a `constexpr`
`basic_istream_view` variable can only be created if it is completely
initialized, including its exposition-only _`value_`_ member.
The existing test case is changed to use a non-empty stream and a
testing class type for which `operator>>` is no-op. The state of the
class object stored in `basic_istream_view` is unchanged even after the
initial `operator>>` call.
This avoids dereferencing a past-the-end iterator while testing LWG3568.
[libc++] Trigger the benchmark-request job more often (#216003)
With the test suite taking under 1h to complete, it makes sense to
trigger at least every 30 minutes so we don't leave available capacity
unused.
*/*: Switch to USES=kde
All these ports use only the ECM module shipped with KDE Frameworks.
ECM from Frameworks 5 has been replaced by Frameworks 6 counterpart
a while ago. While here, drop runtime dependency on ECM.
Differential: D58578
Reviewed by: adridg, arrowd, jhale
[libc++][pstl] Implementation of parallel std::search_n() based on __parallel_find() (#214069)
This PR implements a parallel version of `std::search_n()` based on
`__parallel_find()`.
The algorithm crops the input range to a range where a potential match
can start and runs a chunked parallel find on the cropped range.
Inside each chunk potential matches are looked for and the first one
found is returned.
Since it's based on `__parallel_find()`, the algorithm supports early
termination.
[AMDGPU] Fix si-pre-emit-peephole to preserve S_AND when SCC is alive (#215829)
The optimization in si-pre-emit-peephole that removes S_AND_B64 after
V_CMP instructions does not check if the implicit SCC def is alive. This
causes miscompiles when the SCC value is used by subsequent
instructions.
Fixes #215745
victorialogs-*: use PKGBASE
Factor out the name of the program by using PKGBASE.
More resistant to copypastos for packaging of other VictoriaLogs
components.
[libcxx][FreeBSD] Mark unsupported only in XOPEN=500
FreeBSD hides all C99 definition when -D_XOPEN_SOURCE=500. As a result,
we can turn on these tests if we have definition higher than 500.
CodeGen: Remove TargetOptions::FloatABIType
This is now fully replaced with the "float-abi" module flag.
If the module flag is not present, the default is computed
from the triple. Consumers are updated to read the module flag.
RuntimeLibraryAnalysis now defers analysis until run() on a Module,
instead of during the pass constructor as before. This requires copying
all of the remaining relevant TargetOptions so they are available
when the module is seen.
Unfortunately, ARM still depends on TargetOptions for determining
the float-abi. -target-abi=aapcs16 still changes the default float-abi,
but an explicit module flag wins.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
victorialogs-vlagent: Import vlagent-1.52.0
VictoriaLogs is open source user-friendly database for logs from
VictoriaMetrics.
This package contains vlagent, an agent for collecting logs from
various sources and storing them in VictoriaLogs.
[CodeGen] Take the executable stack from a module flag (#215152)
AsmPrinter marked `.note.GNU-stack` executable whenever the module had a
use of `llvm.init.trampoline`. This was not compliant with the
documentation for the function, which causes regressions in Julia.
Instead read a new `"executable-stack"` module flag, so that the request
comes from the frontend that emitted the code rather than from scanning
for an intrinsic and auto-magically (and wrongly) guessing. Update the
documentation to be even more clear about this implementation's
expectations (which matches gcc's abilities for the same).
Frontends generating code that needs an executable stack now have to set
the flag for that purpose. For example, flang will do so from
BoxedProcedurePass when it emits a stack based trampoline; the
`-fsafe-trampoline` runtime pool does not need one (nor was the custom
runtime intrinsics really necessary for `-fsafe-trampoline`, since the
existing intrinsic was already defined to support that use case too).
Fixes a regression caused by #151754, which introduced new behavior onto
[4 lines not shown]
[lldb] Fix crash when adding a python ParsedCommand (#215807)
The expected result of `ParsedCommand.get_args_definition` is a List of
Lists and should not crash when it is not the case.