[PGO][HIP] Stop pulling ROCm.o into every PGO host link (#200101)
PR #177665 added an unconditional `extern` reference to
`__llvm_profile_hip_collect_device_data` from `InstrProfilingFile.c`,
which forces `InstrProfilingPlatformROCm.o` (and its sanitizer_common /
interception dependencies) out of `libclang_rt.profile.a` in every PGO
binary. That breaks bots without `-lpthread` and races dlsym/PLT state
in non-HIP programs via the interceptor constructor.
Fix:
- Declare the hook `COMPILER_RT_WEAK` and gate the call on its address.
No `COMPILER_RT_VISIBILITY`: a hidden weak-undef function would be
non-preemptible and the address test would fold to true.
- Gate `installHipModuleInterceptors` on `dlsym(hipModuleLoad)` so the
constructor is a no-op if `ROCm.o` is still pulled in.
Fixes:
- https://lab.llvm.org/buildbot/#/builders/66/builds/31311
- https://lab.llvm.org/buildbot/#/builders/174/builds/36180
[7 lines not shown]
graphics/mesa-devel: unbreak build after 57a95f9faa65
Traceback (most recent call last):
File "src/intel/vulkan/anv_dricrc_gen.py", line 275, in <module>
main()
File "src/intel/vulkan/anv_dricrc_gen.py", line 268, in main
drirc_validate([args.validate], options, driver="anv")
File "src/util/drirc_gen.py", line 201, in drirc_validate
tree = ET.parse(conf_path)
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/xml/etree/ElementTree.py", line 1219, in parse
tree.parse(source, parser)
File "/usr/local/lib/python3.11/xml/etree/ElementTree.py", line 570, in parse
source = open(source, "rb")
^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'src/util/00-mesa@-defaults.conf'
Reported by: pkg-fallout
[clang][AMDGPU] Fix -ast-print crash on expanded predicate builtins (#199963)
ExpandAMDGPUPredicateBuiltIn synthesized an IntegerLiteral typed
_Bool/bool — a shape no other producer creates, and one that
StmtPrinter::VisitIntegerLiteral has no case for. -ast-print on the
resulting if-condition hit llvm_unreachable.
Emit the canonical boolean literal instead:
- C++, C23, OpenCL, HIP: CXXBoolLiteralExpr 'bool'
- pre-C23 C: IntegerLiteral 'int'
In the C case this matches what <stdbool.h>'s true/false macros expand
to.
Fixes #199563
[clang] fix getTemplateInstantiationArgs
This implements a new strategy for collecting the template arguments, by
relying on the qualifiers and template parameter lists to navigate the template
context of out-of-line definitions.
This greatly simplifies the signature of that function, by removing a bunch
of workarounds, and simpliffying a couple that weren't removed yet.
Since this now relies on qualifiers and template parameter lists,
this patch expends most of its effort making sure these are placed,
transformed and propagated to template instantiations.
Also makes the explicit specialization AST nodes stop abusing the template
parameter lists by storing it's own template parameter list, creating a
dedicated field for them, similar to partial specializations.
[SelectionDAG] Widen <2 x T> vector types for atomic store
Vector types of 2 elements must be widened. This change does this
for vector types of atomic store in SelectionDAG so that it can
translate aligned vectors of >1 size.
[RISCV] Fix incorrect CM.MVSA01/QC_CM_MVSA01 generation with Zdinx (#200000)
The `RISCVMoveMerger` pass was incorrectly forming
`CM_MVSA01/QC_CM_MVSA01` when `Zdinx` was enabled. The pass attempted CM
merge for copy pairs even when the first copy was not an `a0/a1-based`
CM candidate.
Fix by only running `findMatchingInst` when the current copy is a valid
CM candidate.
[RISCV][P-ext] Split v4i16/v8i8 INSERT/EXTRACT_VECTOR_ELT on RV32. (#199917)
With a constant lane index, split the vector and recurse on the
single-GPR half containing Idx (already Custom-lowered).
fix(firewire): fix tcode switch fallthrough on little-endian
The break statements in fwohci_arcv_swap() were inside
#if BYTE_ORDER == BIG_ENDIAN guards, causing all cases to fall
through to the default "Unknown tcode" handler on little-endian
(x86) systems. This meant every received packet was dropped,
breaking bus manager election, split transactions, and all
asynchronous communication.
Move break statements outside the #if guards to match FreeBSD.
[AMDGPU] This reverts patches to use fp16 inline constants for i16 (#200091)
Patches reverted:
commit c315c662cd2d33e0c7f962fed742ee53626d8005
Author: Stanislav Mekhanoshin <Stanislav.Mekhanoshin at amd.com>
Date: Wed May 27 12:51:13 2026
[AMDGPU] Fix codesize estimate after #198005 (#200033)
This fixes failure in libc tests which checks the exact encoding
size. Encoding is now shorter, but it did not recognize fp16
immediates as an inlinable constant and assumes literal encoding.
Shorter encodings were created here:
https://github.com/llvm/llvm-project/pull/198005
commit 2b3bc03b5ef00e7eaa245420ca981c700e1c05c4
Author: Stanislav Mekhanoshin <Stanislav.Mekhanoshin at amd.com>
[15 lines not shown]
expect: set channel type to TCL_CHANNEL_VERSION_2 for llvm22
Avoid passing the ExpBlockModeProc function pointer through an object
pointer type and instead move it to the proper place in the struct. Setting
the channel version of expChannelType to 2 in the version field tells tcl's
Tcl_ChannelBlockModeProc() to use the function pointer directly, and avoids
undefined behavior. Using TCL_CHANNEL_VERSION_2 is the conservative choice,
although version 5 would also work.
discussed with stu
tested/ok jca
[alpha.webkit.UncountedLocalVarsChecker] Detect an assignment to a guardian argument (#198695)
A function parameter of type RefPtr<T>& should not be used as a guardian
variable of a raw pointer/reference variable if the function body
contains an assignment to it since such an assignment can shorten the
lifetime of the guarded object.