[compiler-rt] [Darwin] Enable arm64e tests on macOS (#193391)
This enables compiler-rt tests on Darwin arm64e (when supported by the
linker).
Note that arm64e is not enabled for sanitizers yet, but this does add
test coverage for builtins.
rdar://175303507
[NFC][MachineBlockHashInfo] Add static asserts to guard agains hash_16_bytes changes (#192862)
`hashing::detail::hash_16_bytes` is not guaranteed to be stable across
different versions of LLVM, it can change any time.
We put asserts here, so if it changed, author don't forget to work
around them here.
Revert "[SelectionDAG] Salvage debuginfo when combining load and z|s ext instrs. (#188544)" (#193554)
This reverts commit fe5d5b762ab3b92b18b56f413965abb81a459ac6.
Reverted because of https://github.com/llvm/llvm-project/issues/193475
clang crashes on valid code at -O{2,3} on x86_64-linux-gnu: Assertion
`N->getOpcode() != ISD::DELETED_NODE && "DELETED_NODE in CSEMap!"'
failed
[lldb] Scope symbol lookups to specific modules in ObjC/SystemRuntime plugins (#193379)
This narrows `FindSymbolsWithNameAndType` calls from searching all
loaded images to the specific module that owns the symbol (Foundation,
CoreFoundation, libBacktraceRecording.dylib).
The arclite fallback in `CalculateHasNewLiteralsAndIndexing` still
searches all images because libarclite is a static library linked into
the main executable.
[Runtimes] Allow HandleLibc.cmake to be called multiple times (#193540)
Summary:
This needs to check to see if it's already been called now that we want
to use it more places than just libcxx.
[LegalizeTypes][DAG] Use SHL(X,1) instead of ADD(X,X) for variable vector indices for extraction/insertion legalization (#188277)
Avoid ADD(X,X) as it doesn't correctly handle undef elements and helps avoid some FREEZE() fold headaches
Resurrects #86857
[lldb] Decorate tests that use threading (#193117)
Add a new decorator `skipIfTargetDoesNotSupportThreads` to skip tests
that use threading. This is motivated by running the test suite
targeting WebAssembly, where `wasip1` does not support threads. There
are variants that do support threading (e.g. `wasip1-threading`) that
the current implementation accounts for.
[libc][NFC] Fix minor RPC warnings (#192997)
Summary:
Fix some warnings that show up with strict warnings set, reduces noise
when used as a header onyl library in projects.
[MLIR][XeGPU] Do not use ocloc lib if LLVM_BUILD_LLVM_DYLIB is ON (#193259)
This fixes LLVM dylib build in environments with installed ocloc.
The problem is that LLVM shared lib is never linked with ocloc and the
linker fails to resolve the symbols `oclocInvoke` and `oclocFreeOutput`.
[libc] Fix .params file generation for integration tests (#193544)
Update add_integration_test to include loader arguments in the .params
file. The lit format already supported three-part .params files, but
add_integration_test was only generating two parts.
[NFC][ADT] Make a few functions constexpr (#193302)
So we can use them in static_asserts in #192862.
It converts what ever is trivially possible. In future more can
be converted as well, if we constexpr fetch32/fetch64.
---------
Co-authored-by: Matt Arsenault <Matthew.Arsenault at amd.com>
[ELF] Factor linker-script dispatch loops into helpers. NFC (#193547)
Extract the per-token dispatch inside readLinkerScript, readSections,
readOutputSectionDescription, and readMemory into four new helpers.
Preparatory for making INCLUDE run a nested parse (#193427).
[RISCV] Expand vp.fshl, vp.fshr (#193225)
It looks like we never implemented custom lowering for the corresponding
ISD nodes so these were always just expanded by expandVPFunnelShift.
[Support][JSON] Use `std::unordered_map` for object storage (#171230)
`llvm::DenseMap` is not suitable for the key-value `Storage` inside
`llvm::json::Object`. Use `std::unordered_map` instead to optimize
memory usage.
`llvm::DenseMap` is optimized for mapping small keys and values
(pointers), and it pre-allocates 64 buckets by default.
`llvm::json::ObjectKey` is 24 bytes in size, and `llvm::json::Value` is
40 bytes. Currently, the JSON parser allocates 4KB of memory for each
JSON object. In practice, most JSON objects contain only a handful of
fields, and likely to have lists of many small objects. This is a
significant waste of memory.
Assisted-by: Claude Code (claude-opus-4-6)
[lldb] add terminfo name (#191740)
Fixes #191532
This PR just adds terminfo next to tinfo in FindCursesAndPanel.cmake
since NetBSD uses a separate library terminfo that LLDB’s CMake did not
look for (see #191532).
[lldb/test] Fix BacktraceRecording path for Darwin embedded devices (NFC) (#193436)
rdar://172707080
Signed-off-by: Med Ismail Bennani <ismail at bennani.ma>
[SelectionDAG] Change SSUBO to do (LHS < RHS) XOR (RESULT < 0) (#191747)
Refactor expandSADDSUBO in TargetLowering so addition and subtraction
use separate, clearly named paths.
SADDO: unchanged meaning: overflow when (result < LHS) disagrees with
(RHS < 0) (signed compares).
SSUBO: use the equivalent formulation: overflow when (LHS < RHS)
disagrees with (result < 0) instead of (result < LHS) vs (RHS > 0).
[libc][docs][NFC] Rename Maintainers.rst to Maintainers.md (#191882)
Renamed Maintainers.rst to Maintainers.md at the root of libc to match
other LLVM projects.
* Updated libc/docs/Maintainers.md to use MyST include directive,
following the pattern used by Clang.
* Fixed libc/docs/CMakeLists.txt to copy Maintainers.md instead of
Maintainers.rst to the build directory.
[profcheck] Fix assert in getInitializer call on global with no initializer (#193514)
This code calls `getInitializer` without checking if the global has an
initializer, which causes an assert if there isn't one. These globals
may have no initializer after optimization from `globalopt`.
Check for an initializer first.
This is already locked down with
`CodeGen/SPIRV/legalize-zero-size-arrays-appending.ll` so we don't need
a new test.
This issue was exposed by
https://github.com/llvm/llvm-project/pull/192730.
Signed-off-by: Nick Sarnie <nick.sarnie at intel.com>
IR: Allow !fpmath metadata on homogeneous float structs
This matches the logic for fast math flags / nofpclass, and allows
marking llvm.sincos calls with !fpmath.