[BOLT] Delay indirect call pointer setup (#204229)
There is a race in the instrumentation runtime during setup. The setup
initializes the function pointers for indirect call instrumentation
before the indirect call counters array. If the application spawns a
background thread through a constructor (as does jemalloc), the
background thread has a chance to derefence that uninitialized array
pointer. Defer initialization of these function pointers to prevent this
race.
Fixes #198181.
Co-authored-by: Fabian Parzefall <parzefall at meta.com>
[RFC][CodeGen] Add generic target feature checks for intrinsics
This PR adds target-independent infrastructure for annotating LLVM intrinsics
with required subtarget feature expressions.
It introduces a TargetFeatures string field to intrinsic TableGen records.
TableGen emits an intrinsic-to-feature mapping table.
Both SelectionDAG and GlobalISel now perform this check before lowering target
intrinsics. This allows targets to opt in by annotating intrinsic definitions
directly, rather than adding custom checks during lowering, legalization, or
instruction selection.
This PR uses one AMDGPU intrinsic as an example.
[Clang][CodeGen] Fix C++20 NTTP object field indexing (#204174)
C++20 allows a class object to be used as a non-type template
parameter. For example, a template can take an object of a struct like
`{ char A; long long B; char C; char First[2]; char Second[2]; }`.
That struct has padding before `B`. The constant emitter can represent
the value with an ordinary LLVM struct and let LLVM provide that padding
implicitly. Normal record CodeGen instead uses the memory type for the
record, which may contain explicit padding fields so C++ fields have
stable LLVM field numbers.
The bytes are laid out the same, but the LLVM field numbers are not.
For the normal padded record type, `First` has one field index. For the
compact constant type, that same index names a later field. Clang was
computing the field index for the padded record type, then applying it
to the compact template parameter object type. As a result, reading
`First` could read from the bytes for `Second` instead.
[3 lines not shown]
math/polymake: Update 4.13 => 4.15, improve port
Changelogs:
https://polymake.org/doku.php/news/release_4_14https://polymake.org/doku.php/news/release_4_15
- Set USES+=llvm:max=19 for FreeBSD with llvm 21+ - this is a stop-gap
measure, as polymake fails to compile with newer versions of llvm:
https://forum.polymake.org/viewtopic.php?p=4242.
- Remove OPTIMIZED_CFLAGS option.
- Replace BLISS_{BUILD,RUN}_DEPENDS with BLISS_LIB_DEPENDS.
- Set default option to nauty instead of bliss.
- Move 7 common dependencies from BUILD_DEPENDS and RUN_DEPENDS to
_BR_DEPENDS.
- Fix warnings from portclippy.
- Reformat Makefile with portfmt.
- Replace *_CONFIGURE_ON/*_CONFIGURE_OFF with *_CONFIGURE_WITH -
simplify and reduce size of options block.
- Move perl module Ext.so from PLIST_FILES in Makefile to pkg-plist.
[6 lines not shown]
[clang-format] Stop inserting blank line in disabled region (#201995)
Previously, a blank got inserted before the `// clang-format off`
comment with the `SeparateDefinitionBlocks` option set.
Fixes #106983 and #146317.
[lldb][test] Skip unsupported tests on WebAssembly (#204245)
Mark more tests that rely on features unavailable on wasm32-wasip1 (or
in LLDB's Wasm support): expression evaluation (skipIfWasm), shared
libraries (skipIfTargetDoesNotSupportSharedLibraries), threads
(skipIfTargetDoesNotSupportThreads), and llvm-strip --keep-symbol, which
the Wasm object format doesn't support. Where a test also has supported,
passing cases, the decorator is applied per method.
The "expression" category is already skipped for Wasm, but that only
covers commands/expression/*, where the category is set by a
"categories" file. The tests in this PR live elsewhere and merely use
expression evaluation incidentally, so they aren't in that category and
need skipIfWasm directly.
[Driver] Re-enable -fobjc-constant-literals by default (#204208)
This reverts 4d154f6ea5eb ([Driver] Disable -fobjc-constant-literals by
default (#195000)), which was a temporary measure to unblock a project
that the original constant-literal change (#185130) broke.
For background on the feature and the discussion that led to disabling
and then re-enabling it, see
https://github.com/llvm/llvm-project/pull/185130.
rdar://179823193
emulators/mame: fix build on armv7
The bundled copy of the LZMA toolkit has been updated to a fairly
recent version. As a result, while our patches still apply, they are
largely obsolete or even defective.
Remove the obsolete patches and add a missing compile option to fix the
build on armv7 (-march=armv8-a enables AES intrinsics required by LZMA).
Approved by: portmgr (build fix blanket)
MFH: 2026Q2
(cherry picked from commit f55f8180ef148c80198ba0b928f9d323d228ce15)
[SSAF][WPA] Add a lit test for the WPA improvement of #198889 (#204018)
This commit adds a lit test, which is an example of the issue solved by
#198889 and was discovered independently when applying the analysis to a
real project.
rdar://179754164
emulators/mame: fix build on armv7
The bundled copy of the LZMA toolkit has been updated to a fairly
recent version. As a result, while our patches still apply, they are
largely obsolete or even defective.
Remove the obsolete patches and add a missing compile option to fix the
build on armv7 (-march=armv8-a enables AES intrinsics required by LZMA).
Approved by: portmgr (build fix blanket)
MFH: 2026Q2
[RISC-V][MC] Improve the diagnostic for invalid compressed register number
Instead of a generic `invalid operand for instruction`, print
`register must be a GPR from x8 to x15` instead.
Pull Request: https://github.com/llvm/llvm-project/pull/204237
lang/gcc/16: moved libquadmath.info to PLIST-main
gcc installs it uncoditionally, without depends on __float128 like
libquadmath itself.
Confirmed by make plist on arm64 and powerpc64