[Runtimes] Fix /clang: prefix warning for GNU-like clang on Windows (#192041)
libclc has configure warning on Windows:
clang: error: no such file or directory:
'/clang:--target=amdgcn-amd-amdhsa-llvm' clang: error: no such file or
directory: '/clang:-print-target-triple'
CMake Warning at CMakeLists.txt:239 (message):
Failed to execute `llvm-project/build/bin/clang.exe
/clang:--target=amdgcn-amd-amdhsa-llvm /clang:-print-target-triple` to
normalize target triple.
Switch to check CMAKE_C_COMPILER_FRONTEND_VARIANT because
- CMAKE_C_SIMULATE_ID=MSVC: true for both clang and clang-cl.
- CMAKE_C_COMPILER_FRONTEND_VARIANT=MSVC: true for clang-cl; false for clang.
[libc] Include CPU model in overlay CI sccache key (#196477)
[libc] Include CPU model in overlay CI sccache key
The overlay CI compiles opt_host memory tests with `-march=native`,
which generates object files specific to the runner CPU model. sccache
treats `-march=native` as a literal string in its hash key, so cached
`.o` files compiled on one CPU model get served to runners with a
different CPU. When the cached binary uses instructions the current CPU
lacks, the test crashes with SIGILL.
## Symptoms
The `memcmp_opt_host`, `memmove_opt_host`, `memset_opt_host`,
`bcmp_opt_host`, and `bzero_opt_host` tests crash when SIMD code paths
are first exercised. Simple tests like `CmpZeroByte` pass because they
use small sizes that do not enter SIMD routines. The failures are fully
reproducible on reruns because the cache stays poisoned.
[31 lines not shown]
[CUDA/HIP] Do not check function calls in discarded statement (#194606)
Previously, calling a host-device mismatch function inside a discarded
`if constexpr` branch would trigger an error. This patch recognizes that
discarded statements are never instantiated and allows such code.
[clang][DebugInfo] Store current location metadata in CGDebugInfo (#193918)
EmitLocation and related functions are particularly hot and rederive
current source location metadata (line, column, file). Storing this
metadata when updating the current location in CGDebugInfo::setLocation
and reusing is a nice compile-time improvement on debug builds:
CTMark geomean:
- stage1-ReleaseLTO-g: -0.65%
- stage1-O0-g: -3.48%
- stage1-aarch64-O0-g: -2.82%
- stage2-O0-g: -3.53%
http://llvm-compile-time-tracker.com/compare.php?from=99c9a1f566df3ab4f37e156b62afd1d743882de0&to=78d281116ba7ee7e6c13625906be325b6495205a&stat=instructions%3Au
Assisted-by: codex
Do not cache format for status line because it stores various pointers
that might be stale, instead cache the cmd_find_state and rebuild the
formats every time they are needed. Reported by Marcel Partap in GitHub
isue 5065.