LLVM/project a63a548clang/lib/Driver Driver.cpp, clang/test/Driver ftime-trace-offload.cpp

[Driver] Enable -ftime-trace for CUDA/HIP device compilation (#179701)

Previously, -ftime-trace only generated trace files for host compilation
when compiling CUDA/HIP code. Device compilation was excluded because
the OffloadingPrefix was non-empty, causing handleTimeTrace() to be
skipped.

This patch enables -ftime-trace for offload device compilation by:
1. Passing the offloading prefix to handleTimeTrace()
2. Including the bound architecture in the trace filename
3. Deriving the trace output directory from the -o option for device
   compilation (since the device output is a temp file)

Trace files are now generated for each offload target:
- Host: output.json
- Device: output-hip-amdgcn-amd-amdhsa-gfx906.json

Note: When using --save-temps, multiple compilation phases (preprocess,
compile, codegen) write to the same trace file, with each phase

    [3 lines not shown]
DeltaFile
+37-7clang/lib/Driver/Driver.cpp
+37-0clang/test/Driver/ftime-trace-offload.cpp
+74-72 files

LLVM/project cc4ff7fclang/docs HIPSupport.rst, clang/lib/Sema Sema.cpp

[CUDA/HIP][SYCL] Deduplicate deferred diagnostics across multiple callers (#185926)

[CUDA/HIP][SYCL] Deduplicate deferred diagnostics across multiple
callers

Deferred diagnostics for a function were emitted once per caller that
forced the function into device context. When multiple device functions
called the same host-device function containing errors, the diagnostics
were repeated for each caller, producing noisy duplicate output.

Change the deferred diagnostic emission to a two-pass approach:
1. During the call graph walk, collect callers in DeviceKnownEmittedFns
   (now storing multiple callers per function) and mark functions that
   need diagnostics, but don't emit yet.
2. After the walk completes, emit diagnostics once per function with
   all callers listed as notes.

Call chain notes now use "called by" for the first caller in each chain
and "which is called by" for subsequent callers in the chain, making it

    [5 lines not shown]
DeltaFile
+84-0clang/docs/HIPSupport.rst
+41-23clang/lib/Sema/Sema.cpp
+56-0clang/test/SemaCUDA/deferred-diags-dedup.cu
+12-11clang/test/SemaSYCL/sycl-kernel-entry-point-attr-device-odr-use.cpp
+10-10clang/test/SemaCUDA/deferred-diags.cu
+12-5clang/test/SemaCUDA/deferred-diags-limit.cu
+215-494 files not shown
+236-5310 files

LLVM/project f87ce0fllvm/include/llvm/DebugInfo/CodeView SymbolRecord.h

[CodeView] Initialize RegisterId members to RegisterId::NONE (#186551)

All other fields in these tracts are already initialized.
Fixes Msan report in DebugInfoCodeViewTests after #183172.

https://lab.llvm.org/buildbot/#/builders/sanitizer-x86_64-linux-fast
DeltaFile
+3-3llvm/include/llvm/DebugInfo/CodeView/SymbolRecord.h
+3-31 files

LLVM/project b1ab83ellvm/include/llvm/DebugInfo/CodeView SymbolRecord.h

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+3-3llvm/include/llvm/DebugInfo/CodeView/SymbolRecord.h
+3-31 files

LLVM/project 5c38a68clang/lib/Format TokenAnnotator.cpp, clang/unittests/Format FormatTest.cpp

[clang-format] Fix an assertion failure on invalid C++ lambda (#185349)

Fixes #185268
DeltaFile
+4-0clang/unittests/Format/FormatTest.cpp
+1-1clang/lib/Format/TokenAnnotator.cpp
+5-12 files

LLVM/project e945f7alibclc/cmake/modules AddLibclc.cmake

[libclc][CMake] Rename opencl to clc in add_libclc_library, update comment (#186544)

Align with cmake function name.
DeltaFile
+7-7libclc/cmake/modules/AddLibclc.cmake
+7-71 files

LLVM/project ecc8894clang/test/OpenMP target_teams_distribute_parallel_for_simd_schedule_codegen.cpp teams_distribute_parallel_for_simd_schedule_codegen.cpp, libc/AOR_v20.02/math/test/traces sincosf.txt exp.txt

[𝘀𝗽𝗿] changes to main this commit is based on

Created using spr 1.3.6-beta.1

[skip ci]
DeltaFile
+0-31,999libc/AOR_v20.02/math/test/traces/sincosf.txt
+0-16,000libc/AOR_v20.02/math/test/traces/exp.txt
+5,294-4,814clang/test/OpenMP/target_teams_distribute_parallel_for_simd_schedule_codegen.cpp
+5,238-4,758clang/test/OpenMP/teams_distribute_parallel_for_simd_schedule_codegen.cpp
+4,350-4,098clang/test/OpenMP/distribute_parallel_for_simd_codegen.cpp
+4,004-3,524clang/test/OpenMP/teams_distribute_parallel_for_schedule_codegen.cpp
+18,886-65,1933,045 files not shown
+215,055-229,5713,051 files

LLVM/project 9ceef33clang/test/OpenMP target_teams_distribute_parallel_for_simd_schedule_codegen.cpp teams_distribute_parallel_for_simd_schedule_codegen.cpp, libc/AOR_v20.02/math/test/traces sincosf.txt exp.txt

[𝘀𝗽𝗿] initial version

Created using spr 1.3.6-beta.1
DeltaFile
+0-31,999libc/AOR_v20.02/math/test/traces/sincosf.txt
+0-16,000libc/AOR_v20.02/math/test/traces/exp.txt
+5,294-4,814clang/test/OpenMP/target_teams_distribute_parallel_for_simd_schedule_codegen.cpp
+5,238-4,758clang/test/OpenMP/teams_distribute_parallel_for_simd_schedule_codegen.cpp
+4,350-4,098clang/test/OpenMP/distribute_parallel_for_simd_codegen.cpp
+4,004-3,524clang/test/OpenMP/teams_distribute_parallel_for_schedule_codegen.cpp
+18,886-65,1933,056 files not shown
+215,370-229,9203,062 files

LLVM/project e3bb71c.github CODEOWNERS

[lldb][FreeBSD] Add myself to CODEOWNERS (#180052)

Signed-off-by: Minsoo Choo <minsoochoo0122 at proton.me>
DeltaFile
+1-0.github/CODEOWNERS
+1-01 files

LLVM/project f45cf97lldb Maintainers.md

[lldb] Nominate myself for FreeBSD maintainer (#180053)

I've been FreeBSD src contributor since 2022 and started working for the
FreeBSD Foundation starting from January. I created and have been
actively working on #180061 to achieve [LLDB improvement on
FreeBSD](https://wiki.freebsd.org/SummerOfCodeIdeas#Improve_LLDB_on_FreeBSD)
which was originally Google Summer of Code idea.

The initial LLDB support for userspace and kernel debugging on FreeBSD
was initiated by Moritz system back in 2020, but there are some missing
bits like architecture support due to lack of time. Due to this, FreeBSD
developers still depend on GDB-derived kernel debugger and it still
remains de-facto tier 1 debugger (e.g. no scripts in source tree for
lldb).

To track what/how I'm working on this task, please take a look at my
foundation [status report on LLDB
improvement](https://github.com/FreeBSDFoundation/status-updates/blob/main/Minsoo_Choo/kdb.md).
As you see, I will also improve Lua scripting on LLDB as Lua remains

    [13 lines not shown]
DeltaFile
+3-0lldb/Maintainers.md
+3-01 files

LLVM/project 8175bd9libclc/cmake/modules AddLibclc.cmake

[libclc][CMake] Check SOURCES and LIBRARIES arguments are not empty (#186542)
DeltaFile
+6-0libclc/cmake/modules/AddLibclc.cmake
+6-01 files

LLVM/project c31ffbfflang/lib/Lower OpenACC.cpp, flang/lib/Optimizer/Builder CUFCommon.cpp

[flang][cuda][openacc] Fix interoperability when host_data is not generated (#186516)

Update lowering to not process operands if the operation will not be
generated because of a `if(.false.)` clause. This was breaking when
enabling CUDA Fortran on the same test.
DeltaFile
+20-21flang/lib/Lower/OpenACC.cpp
+4-3flang/test/Lower/OpenACC/acc-host-data.f90
+2-0flang/lib/Optimizer/Builder/CUFCommon.cpp
+26-243 files

LLVM/project 5a87cbacompiler-rt/test/sanitizer_common/TestCases/Linux getpwnam_r_invalid_user.cpp

[NFC][sanitizer] Accept ETIMEDOUT in getpwnam_r_invalid_user.cpp (#186538)

On some systems, looking up an result in a timeout.

Error here is not a sign of compiler-rt issue.

Fixes flakiness on
https://lab.llvm.org/buildbot/#/builders/sanitizer-ppc64le-linux
DeltaFile
+2-1compiler-rt/test/sanitizer_common/TestCases/Linux/getpwnam_r_invalid_user.cpp
+2-11 files

LLVM/project bbb6417compiler-rt/test/sanitizer_common/TestCases/Linux getpwnam_r_invalid_user.cpp

Document inconsistent failure of getpwnam_r test

Added comment about inconsistent failure on some bots.
DeltaFile
+1-0compiler-rt/test/sanitizer_common/TestCases/Linux/getpwnam_r_invalid_user.cpp
+1-01 files

LLVM/project e1ddff1compiler-rt/test/sanitizer_common/TestCases/Linux getpwnam_r_invalid_user.cpp

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+1-1compiler-rt/test/sanitizer_common/TestCases/Linux/getpwnam_r_invalid_user.cpp
+1-11 files

LLVM/project 0088575lldb/source/Plugins/LanguageRuntime/CPlusPlus CPPLanguageRuntime.cpp

[lldb] Upstream missing FixCodeAddress in CPPLanguageRuntime (#186519)
DeltaFile
+12-0lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.cpp
+12-01 files

LLVM/project 696208bllvm/test/CodeGen/RISCV short-forward-branch-opt-with-branch-with-immediates_48_ne.ll short-forward-branch-opt-with-branch-with-immediates_48_eq.ll

[RISCV] Add codegen patterns to support short forward branches with immediates (#185643)

This is a follow-up to #182456. This PR adds support for short forward
branches where branches are from Qualcomm uC `Xqcibi` extension.
DeltaFile
+952-0llvm/test/CodeGen/RISCV/short-forward-branch-opt-with-branch-with-immediates_48_ne.ll
+952-0llvm/test/CodeGen/RISCV/short-forward-branch-opt-with-branch-with-immediates_48_eq.ll
+948-0llvm/test/CodeGen/RISCV/short-forward-branch-opt-with-branch-with-immediates_48_sge.ll
+948-0llvm/test/CodeGen/RISCV/short-forward-branch-opt-with-branch-with-immediates_48_slt.ll
+948-0llvm/test/CodeGen/RISCV/short-forward-branch-opt-with-branch-with-immediates_48_uge.ll
+948-0llvm/test/CodeGen/RISCV/short-forward-branch-opt-with-branch-with-immediates_48_ult.ll
+5,696-010 files not shown
+11,180-616 files

LLVM/project 5d3aae9libclc/clc/include/clc/math clc_ep_decl.inc clc_ep.inc, libclc/opencl/lib/generic/relational relational_binary_def.inc binary_def.inc

[libclc][NFC] Rename three .inc files to avoid name conflicts (#186384)

Follow-up of 9b96ebc. There are binary_def.inc and unary_def.inc in
header directory.
- clc_ep.inc -> clc_ep_decl.inc
- relational/binary_def.inc -> relational/relational_binary_def.inc
- relational/unary_def.inc -> relational/relational_unary_def.inc
DeltaFile
+131-0libclc/clc/include/clc/math/clc_ep_decl.inc
+0-131libclc/clc/include/clc/math/clc_ep.inc
+24-0libclc/opencl/lib/generic/relational/relational_binary_def.inc
+0-24libclc/opencl/lib/generic/relational/binary_def.inc
+23-0libclc/opencl/lib/generic/relational/relational_unary_def.inc
+0-23libclc/opencl/lib/generic/relational/unary_def.inc
+178-17815 files not shown
+193-19321 files

LLVM/project 4409a62llvm/unittests/Support Caching.cpp

[NFC][Support] Don't test UB in Caching.WriteAfterCommit (#186532)

The test expects crash after commit essentially null-dereferencing.
Just check that it's nullptr directly.

Fixes asan/ubsan buildbot.
DeltaFile
+1-3llvm/unittests/Support/Caching.cpp
+1-31 files

LLVM/project de2bf13clang/test/CodeGenHLSL basic_types.hlsl, clang/test/CodeGenHLSL/BasicFeatures VectorElementwiseCast.hlsl InitLists.hlsl

[clang][DirectX] Specify element-aligned vectors in TargetInfo (#185954)

Add a bit to TargetInfo to specify that vectors are element-aligned
rather than naturally aligned. This is needed to match DirectX's Data
Layout in LLVM.

Note that this removes the `Opts.HLSL` early exit from
`checkDataLayoutConsistency` so that we actually get these checks when
compiling HLSL. This check looks like it was put there because of
similarity between OpenCL and HLSL, but it isn't actually necessary.

Resolves #123968
DeltaFile
+48-48clang/test/CodeGenHLSL/builtins/mad.hlsl
+30-30clang/test/CodeGenHLSL/BasicFeatures/VectorElementwiseCast.hlsl
+27-27clang/test/CodeGenHLSL/basic_types.hlsl
+26-26clang/test/CodeGenHLSL/BasicFeatures/InitLists.hlsl
+18-18clang/test/CodeGenHLSL/BasicFeatures/MatrixToAndFromVectorConstructors.hlsl
+18-18clang/test/CodeGenHLSL/builtins/ScalarSwizzles.hlsl
+167-16735 files not shown
+377-36141 files

LLVM/project 5e6a6d7libc/src/stdio/gpu file.h

[libc] Reference the proper namespaced variables in the GPU header

Summary:
These linked to the extern "C" versions which did not exist in test
builds.
DeltaFile
+3-1libc/src/stdio/gpu/file.h
+3-11 files

LLVM/project 7bc3bb0llvm/include/llvm/Analysis ScalarEvolution.h, llvm/lib/Analysis ScalarEvolution.cpp

[ScalarEvolution] Limit recursion in getRangeRef for PHI nodes. (#152823)

Restrict PHI nodes that getRangeRef is allowed to recursively examine so
we don't need a "visited" set. And fix createSCEVIter so it creates all
the relevant SCEV nodes before getRangeRef tries to examine them.

The tests that are affected have induction variables that aren't
AddRecs. (Other cases are theoretically affected, but don't seem to show
up in our tests.)
DeltaFile
+110-31llvm/lib/Analysis/ScalarEvolution.cpp
+8-8llvm/test/Analysis/ScalarEvolution/shift-recurrences.ll
+6-6llvm/test/Analysis/ScalarEvolution/addrec-computed-during-addrec-calculation.ll
+5-5llvm/test/Analysis/ScalarEvolution/ranges.ll
+0-6llvm/include/llvm/Analysis/ScalarEvolution.h
+2-2llvm/test/Transforms/LICM/update-scev-after-hoist.ll
+131-585 files not shown
+136-6311 files

LLVM/project 60669c1clang/lib/CodeGen CodeGenModule.cpp, clang/test/CodeGen call-graph-section-internal.cpp

Fix callee type generation (#186272)

The callee_type metadata is expected to be a list of generalized type
metadata by the IR verifier. But for indirect calls with internal
linkage the type metadata is just an integer. Avoid including them in
callee_type metadata.

This will reduce the precision of the generated call graph as the edges to internal linkage functions whose address were taken will not be present anymore. We need to handle this in the future.
DeltaFile
+37-0clang/test/CodeGen/call-graph-section-internal.cpp
+6-2clang/lib/CodeGen/CodeGenModule.cpp
+43-22 files

LLVM/project a27a504llvm/unittests/Support Caching.cpp

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+1-3llvm/unittests/Support/Caching.cpp
+1-31 files

LLVM/project 7449009lldb/tools/darwin-mte-launcher darwin-mte-launcher.cpp

[lldb] Enable SanitizersAllocationTraces=tagged in darwin-mte-launcher (#186326)

Collect allocation traces for tagged memory when using the
`darwin-mte-launcher` to help debug MTE crashes.
DeltaFile
+19-8lldb/tools/darwin-mte-launcher/darwin-mte-launcher.cpp
+19-81 files

LLVM/project 8121900lldb/utils/lldb-dotest CMakeLists.txt lldb-dotest.in

[lldb] Add support for the darwin-mte-launcher to lldb-dotest (#186319)

Add support for the `darwin-mte-launcher` to `lldb-dotest` when LLDB is
configured to run the tests under MTE.
DeltaFile
+5-0lldb/utils/lldb-dotest/CMakeLists.txt
+3-0lldb/utils/lldb-dotest/lldb-dotest.in
+8-02 files

LLVM/project a254ca5clang/include/clang/Basic AttrDocs.td

Remove unicode character from AttrDocs.td (#186521)

PR #185225 introduced a single unicode character, which is the only
unicode character in this file. Change this to a ASCII/Latin1 letter.
DeltaFile
+1-1clang/include/clang/Basic/AttrDocs.td
+1-11 files

LLVM/project a9b944allvm/lib/Transforms/Vectorize LoopIdiomVectorize.cpp, llvm/test/Transforms/LoopIdiom/AArch64 find-first-byte.ll

[LoopIdiomVectorize] Preserve address space in FindFirstByte (#185226)

Fixes #185188

Use SearchStart->getType() instead of Builder.getPtrTy() so that
pointer-typed PHI nodes preserve the address space of the original
pointers.

Assisted-by: Claude (Anthropic)
DeltaFile
+165-0llvm/test/Transforms/LoopIdiom/AArch64/find-first-byte.ll
+2-2llvm/lib/Transforms/Vectorize/LoopIdiomVectorize.cpp
+167-22 files

LLVM/project 440a5b5flang/lib/Semantics resolve-names.cpp resolve-directives.cpp, flang/test/Semantics bug2359.f90

[flang] Fix SELECT TYPE in OpenACC construct (#186511)

A routine in Semantics/resolve-directives.cpp was overwriting a symbol
table pointer in a parse tree Name, thereby removing the AssocEntity
with the correct type for a TYPE IS or CLASS IS clause that had been
placed there. I don't really understand why resolve-directives has to
overwrite symbol table pointers in the first place, but it definitely
shouldn't be replacing these.
DeltaFile
+33-0flang/test/Semantics/bug2359.f90
+4-3flang/lib/Semantics/resolve-names.cpp
+2-1flang/lib/Semantics/resolve-directives.cpp
+39-43 files

LLVM/project 5a3d71dutils/bazel/llvm-project-overlay/mlir BUILD.bazel, utils/bazel/llvm-project-overlay/mlir/test BUILD.bazel

[Bazel] Port 717d1a23c978e5fe25063a4a90ee31652b6912bf
DeltaFile
+4-1utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
+1-1utils/bazel/llvm-project-overlay/mlir/test/BUILD.bazel
+5-22 files