LLVM/project d6c1811 — llvm/tools/llvm-profdata llvm-profdata.cpp

[llvm-profdata] Propagate Error in loadInput and mergeWriterContexts

Propagate Error from loadInput and mergeWriterContexts in mergeInstrProfile,
supplementInstrProfile, and overlapInstrProfile. In mergeInstrProfile's
ThreadPool, catch errors from worker threads, stop scheduling new jobs,
and return the first encountered fatal error.

Ensure ~WriterContext() consumes any pending unhandled errors in
WriterContext::Errors upon destruction.

Not NFC as destructors are run on the stack and ThreadPool workers exit
earlier on error.

With all subcommands propagating llvm::Error to main, exitWithError,
exitWithErrorCode, and the LSan leak suppression workaround are no
longer needed.

Assisted-by: Gemini
DeltaFile
+64-41llvm/tools/llvm-profdata/llvm-profdata.cpp
+64-411 files

LLVM/project 9f8331d — llvm/tools/llvm-profdata llvm-profdata.cpp

[NFCI][llvm-profdata] Propagate Error in merge subcommand (#228157)

Change merge_main and its helpers to return Error and handle it
with reportError in main.

Not NFC as destructors are run on the stack.

Assisted-by: Gemini
DeltaFile
+146-127llvm/tools/llvm-profdata/llvm-profdata.cpp
+146-1271 files

LLVM/project a22dd47 — compiler-rt/lib/csan csan.cpp, compiler-rt/test/csan access-sizes.cpp

Use unaligned loads when snapshotting watched values
DeltaFile
+22-0compiler-rt/test/csan/access-sizes.cpp
+3-3compiler-rt/lib/csan/csan.cpp
+25-32 files

LLVM/project 5771c0f — compiler-rt/lib/csan csan_gpu.cpp csan.cpp, compiler-rt/test/csan volatile.cpp

Remove separate volatile entry points
DeltaFile
+49-0compiler-rt/test/csan/volatile.cpp
+22-0compiler-rt/test/csan/AMDGPU/volatile.hip
+0-4compiler-rt/lib/csan/csan_gpu.cpp
+0-4compiler-rt/lib/csan/csan.cpp
+71-84 files

LLVM/project 4d1d7ce — compiler-rt/lib/csan CMakeLists.txt, compiler-rt/lib/csan/offload csan_offload_preinit.cpp CMakeLists.txt

[compiler-rt] Remove dlsym interceptor and support `-shared-libsan` for CSan

Summary:
Follow the UBSan offload runtime. Offload now resolves HSA through the
global scope, so the `dlsym` interceptor is no longer needed. The real
HSA entry points are still taken from the loaded HSA library rather than
`RTLD_NEXT`, since every DSO with a static runtime exports the same
wrappers and they would otherwise chain back into each other.

Build `libclang_rt.csan.so` with the offload objects folded in. The
exported HSA wrappers report failure when HSA is absent and warn when HSA
was loaded ahead of the runtime. The preinit hook moves to a separate
`csan_offload-preinit` archive for executables.
DeltaFile
+34-98compiler-rt/lib/csan/offload/csan_offload_hsa_interceptors.cpp
+84-9compiler-rt/lib/csan/CMakeLists.txt
+35-0compiler-rt/test/csan/hsa-load-order.cpp
+22-4compiler-rt/lib/csan/offload/CMakeLists.txt
+24-0compiler-rt/test/csan/hsa-missing.cpp
+22-0compiler-rt/lib/csan/offload/csan_offload_preinit.cpp
+221-1115 files not shown
+241-11111 files

LLVM/project cdbaef0 — compiler-rt/cmake config-ix.cmake, compiler-rt/cmake/Modules AllSupportedArchDefs.cmake

comments
DeltaFile
+13-9compiler-rt/lib/csan/csan_gpu.cpp
+3-3compiler-rt/cmake/config-ix.cmake
+2-2compiler-rt/lib/csan/CMakeLists.txt
+1-1compiler-rt/test/csan/CMakeLists.txt
+1-1compiler-rt/lib/csan/offload/CMakeLists.txt
+1-0compiler-rt/cmake/Modules/AllSupportedArchDefs.cmake
+21-166 files

LLVM/project 9007828 — compiler-rt/lib/csan csan_watch.h csan_report.cpp, compiler-rt/lib/csan/offload csan_offload_report.cpp csan_offload_hsa_interceptors.cpp

[compiler-rt] Add 'csan' library for the concurrency sanitizer

Summary:
Adds the runtime for the concurrency sanitizer, both CPU and GPU.
Fundamentally, this works using the following pseudocode:

```c
static u64 watchpoints[N]; // Hash-indexed, zero is empty.

// Emitted before the access, so we never trip on our own write.
void check_access(volatile void *addr, u32 size, u32 type) {
    // Every access probes. A read conflicts only with a watched write, a
    // write conflicts with either.
    if (u64 *wp = find_watchpoint(addr, size, type))
        consume(wp, this_pc()); // Hand our location to the owner.

    if (!should_sample()) // Wave-uniform, 1-in-N chance.
        return;


    [17 lines not shown]
DeltaFile
+456-0compiler-rt/lib/csan/csan_gpu.cpp
+370-0compiler-rt/lib/csan/offload/csan_offload_hsa_interceptors.cpp
+334-0compiler-rt/lib/csan/csan.cpp
+279-0compiler-rt/lib/csan/csan_report.cpp
+184-0compiler-rt/lib/csan/offload/csan_offload_report.cpp
+163-0compiler-rt/lib/csan/csan_watch.h
+1,786-044 files not shown
+2,940-250 files

LLVM/project c8a0ebb — clang/lib/Driver/ToolChains CommonArgs.cpp, clang/test/Driver fsanitize.c fsanitize-concurrency-offload.c

[Clang] Support `-shared-libsan` for offload CSan

Summary:
Follow the UBSan handling. The shared runtime embeds the HSA
interceptors, so `csan_offload` is only linked with static runtimes and
executables pull in `csan_offload-preinit` to initialize early.
DeltaFile
+38-0clang/test/Driver/fsanitize-concurrency-offload.c
+9-4clang/lib/Driver/ToolChains/CommonArgs.cpp
+3-1clang/test/Driver/fsanitize.c
+50-53 files

LLVM/project 6767083 — clang/test/CodeGen sanitize-concurrency.c, clang/test/CodeGen/Inputs sanitize-concurrency-ignorelist.txt

ignore
DeltaFile
+29-0clang/test/CodeGen/sanitize-concurrency.c
+2-0clang/test/CodeGen/Inputs/sanitize-concurrency-ignorelist.txt
+31-02 files

LLVM/project 1ddebe8 — llvm/lib/Transforms/Instrumentation ConcurrencySanitizer.cpp

enum class and return Res
DeltaFile
+20-14llvm/lib/Transforms/Instrumentation/ConcurrencySanitizer.cpp
+20-141 files

LLVM/project caa7bd0 — clang/lib/Driver SanitizerArgs.cpp, clang/lib/Driver/ToolChains AMDGPU.cpp CommonArgs.cpp

Comments
DeltaFile
+48-0clang/test/Driver/fsanitize-concurrency-offload.c
+27-0clang/test/Driver/fsanitize.c
+16-7clang/lib/Driver/ToolChains/Clang.cpp
+11-4clang/lib/Driver/SanitizerArgs.cpp
+5-6clang/lib/Driver/ToolChains/CommonArgs.cpp
+3-2clang/lib/Driver/ToolChains/AMDGPU.cpp
+110-195 files not shown
+112-2111 files

LLVM/project 83c8a60 — clang/docs ConcurrencySanitizer.md, clang/lib/CodeGen CodeGenFunction.cpp

[Clang] Add support for the `-fsanitize=concurrency` runtime

Summary:
Add the frontend sanitizer kind, function attributes, pass pipeline
integration, predefined macro, driver handling, and documentation for
ConcurrencySanitizer.
DeltaFile
+207-0clang/docs/ConcurrencySanitizer.md
+73-0clang/test/CodeGen/sanitize-concurrency.c
+32-8clang/lib/Driver/ToolChains/CommonArgs.cpp
+15-0clang/test/Driver/fsanitize.c
+10-4clang/lib/Driver/SanitizerArgs.cpp
+10-3clang/lib/CodeGen/CodeGenFunction.cpp
+347-1510 files not shown
+375-1616 files

LLVM/project ad7ad53 — llvm/lib/Transforms/Instrumentation ConcurrencySanitizer.cpp, llvm/test/Instrumentation/ConcurrencySanitizer function_control.ll callbacks.ll

[LLVM] Add a ConcurrencySanitizer LLVM pass

Summary:
Add an LLVM ConcurrencySanitizer pass to instrument memory and atomic
operations for a sampling race detector. Fundamentally the pass iterates
through every candidate memory operation and adds a check above it.
Unlike TSAN, we do not replace any operations, which heavily simplifies
the instrumentation.

We do not re-use the TSAN instrumentaiton because the appraoches are
different enough and the passes simple enough that the extra code is not
a large concern. More differences will be added in the future, so
keeping them separate is easlier.
DeltaFile
+614-0llvm/lib/Transforms/Instrumentation/ConcurrencySanitizer.cpp
+131-0llvm/test/Instrumentation/ConcurrencySanitizer/selection.ll
+106-0llvm/test/Instrumentation/ConcurrencySanitizer/address_space.ll
+86-0llvm/test/Instrumentation/ConcurrencySanitizer/atomic.ll
+72-0llvm/test/Instrumentation/ConcurrencySanitizer/callbacks.ll
+59-0llvm/test/Instrumentation/ConcurrencySanitizer/function_control.ll
+1,068-010 files not shown
+1,321-016 files

LLVM/project 2c0f112 — llvm/lib/Transforms/Instrumentation ConcurrencySanitizer.cpp, llvm/test/Instrumentation/ConcurrencySanitizer memintrinsics.ll basic.ll

triples, comments, and volatile fix to flags
DeltaFile
+6-22llvm/lib/Transforms/Instrumentation/ConcurrencySanitizer.cpp
+23-2llvm/test/Instrumentation/ConcurrencySanitizer/callbacks.ll
+1-1llvm/test/Instrumentation/ConcurrencySanitizer/memintrinsics.ll
+1-1llvm/test/Instrumentation/ConcurrencySanitizer/basic.ll
+1-1llvm/test/Instrumentation/ConcurrencySanitizer/atomic.ll
+1-1llvm/test/Instrumentation/ConcurrencySanitizer/address_space.ll
+33-281 files not shown
+34-297 files

LLVM/project 8739f3f — llvm/lib/Transforms/Instrumentation ConcurrencySanitizer.cpp, llvm/test/Instrumentation/ConcurrencySanitizer callbacks.ll

Apply the volatile policy in the instrumentation
DeltaFile
+14-7llvm/lib/Transforms/Instrumentation/ConcurrencySanitizer.cpp
+7-3llvm/test/Instrumentation/ConcurrencySanitizer/callbacks.ll
+21-102 files

LLVM/project d35beef — llvm/lib/Transforms/Instrumentation ConcurrencySanitizer.cpp, llvm/test/Instrumentation/ConcurrencySanitizer memintrinsics.ll

Instrument atomic and pattern memory intrinsics
DeltaFile
+28-26llvm/lib/Transforms/Instrumentation/ConcurrencySanitizer.cpp
+54-0llvm/test/Instrumentation/ConcurrencySanitizer/memintrinsics.ll
+82-262 files

LLVM/project b78111f — llvm/test/CodeGen/AMDGPU amdgpu-attributor-min-agpr-alloc.ll, llvm/test/CodeGen/X86 x86-sanitizer-shrink-wrapping.ll

[IR] Add the sanitize_concurrency function attribute

This introduces a new concurrency sanitizer attribute to be used with
the runtime of the same name. This has no major change and simply
updates the IR to handle it properly. This attribute is invalid when
combined with the thread sanitizer one as they are mutually exclusive.
DeltaFile
+26-14llvm/test/CodeGen/AMDGPU/amdgpu-attributor-min-agpr-alloc.ll
+30-0llvm/test/CodeGen/X86/x86-sanitizer-shrink-wrapping.ll
+25-0llvm/test/Transforms/SimplifyCFG/no_speculative_loads_with_tsan.ll
+14-0llvm/test/Transforms/HotColdSplit/X86/do-not-split.ll
+11-1llvm/test/Transforms/ExpandMemCmp/X86/sanitizer-skip.ll
+9-0llvm/test/Verifier/sanitize-concurrency-attrs.ll
+115-1515 files not shown
+155-1921 files

LLVM/project cddeb55 — lld/ELF Driver.cpp

[ELF] Initialize LLVM targets before parsing -mllvm (#228314)

readConfigs parses -mllvm before initLLVM initializes the targets, so an
option that a target registers at initialization (currently only Sparc
#227977)
is rejected as unknown.
Call initLLVM first, as the COFF, MachO, and wasm ports do. This will be
covered once a -mllvm used by lld/test/ELF/lto tests migrates.
DeltaFile
+3-1lld/ELF/Driver.cpp
+3-11 files

LLVM/project a675e11 — llvm/include/llvm/MCA Support.h, llvm/lib/MCA InstrBuilder.cpp

[MCA] Explicitly instantiate and export template for unittest (#227893)
DeltaFile
+3-0llvm/lib/MCA/InstrBuilder.cpp
+1-0llvm/include/llvm/MCA/Support.h
+4-02 files

LLVM/project 6b122ae —

[compiler-rt] Add more common HSA utilities for memory and symbolization (#228297) (#228312)

Summary:
Adds memory pool management for different kinds of allocation. Intended
to be used for the in-progress concurrency sanitizer.

RFC:

discourse.llvm.org/t/rfc-a-thread-concurrency-sanitizer-for-gpus-in-compiler-rt/91113

---

<sub>Stack created with <a
href="https://github.com/github/gh-stack">GitHub Stacks CLI</a> • <a
href="https://gh.io/stacks-feedback">Give Feedback 💬</a></sub>
DeltaFile
+0-00 files

LLVM/project 645790c — compiler-rt/lib/sanitizer_common sanitizer_offload_hsa.h sanitizer_offload.h

[compiler-rt] Add more common HSA utilities for memory and symbolization (#228297) (#228312)

Summary:
Adds memory pool management for different kinds of allocation. Intended
to be used for the in-progress concurrency sanitizer.

RFC:

discourse.llvm.org/t/rfc-a-thread-concurrency-sanitizer-for-gpus-in-compiler-rt/91113

---

<sub>Stack created with <a
href="https://github.com/github/gh-stack">GitHub Stacks CLI</a> • <a
href="https://gh.io/stacks-feedback">Give Feedback 💬</a></sub>
DeltaFile
+46-3compiler-rt/lib/sanitizer_common/sanitizer_offload.cpp
+21-0compiler-rt/lib/sanitizer_common/sanitizer_offload_image.cpp
+15-0compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_libcdep.cpp
+4-0compiler-rt/lib/sanitizer_common/sanitizer_symbolizer.h
+3-0compiler-rt/lib/sanitizer_common/sanitizer_offload.h
+2-0compiler-rt/lib/sanitizer_common/sanitizer_offload_hsa.h
+91-36 files

LLVM/project 497c284 — llvm/tools/llvm-jitlink llvm-jitlink.cpp

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+1-1llvm/tools/llvm-jitlink/llvm-jitlink.cpp
+1-11 files

LLVM/project 26f4c32 — compiler-rt/lib/sanitizer_common sanitizer_offload_hsa.h sanitizer_offload.h

[compiler-rt] Add more common HSA utilities for memory and symbolization (#228297)

Summary:
Adds memory pool management for different kinds of allocation. Intended
to be used for the in-progress concurrency sanitizer.

RFC:
discourse.llvm.org/t/rfc-a-thread-concurrency-sanitizer-for-gpus-in-compiler-rt/91113

---

<sub>Stack created with <a
href="https://github.com/github/gh-stack">GitHub Stacks CLI</a> • <a
href="https://gh.io/stacks-feedback">Give Feedback 💬</a></sub>
DeltaFile
+46-3compiler-rt/lib/sanitizer_common/sanitizer_offload.cpp
+21-0compiler-rt/lib/sanitizer_common/sanitizer_offload_image.cpp
+15-0compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_libcdep.cpp
+4-0compiler-rt/lib/sanitizer_common/sanitizer_symbolizer.h
+3-0compiler-rt/lib/sanitizer_common/sanitizer_offload.h
+2-0compiler-rt/lib/sanitizer_common/sanitizer_offload_hsa.h
+91-36 files

LLVM/project d18bc26 — orc-rt/lib/bedrock/sys/windows SocketConnector.cpp

[orc-rt] Moving bootstrapinfo to make msvc++ happy (#228308)
DeltaFile
+1-1orc-rt/lib/bedrock/sys/windows/SocketConnector.cpp
+1-11 files

LLVM/project a0ebf45 — llvm/lib/MC MCLFI.cpp

[MC] Fix MCLFI coding style. NFC (#228301)
DeltaFile
+10-13llvm/lib/MC/MCLFI.cpp
+10-131 files

LLVM/project 7d6ff5b — openmp/runtime/src kmp_tasking.cpp, openmp/runtime/test/tasking omp_untied_taskloop.f90 omp_untied_task_cancel.c

[OpenMP] Initialize td_last_tied when an untied task starts (#214320)
DeltaFile
+62-0openmp/runtime/test/tasking/omp_untied_task_if0.c
+58-0openmp/runtime/test/tasking/omp_untied_task_cancel.c
+50-0openmp/runtime/test/tasking/omp_untied_taskloop.f90
+16-5openmp/runtime/src/kmp_tasking.cpp
+186-54 files

LLVM/project cd7f071 — llvm/tools/llvm-profdata llvm-profdata.cpp

[llvm-profdata] Propagate Error in loadInput and mergeWriterContexts

Propagate Error from loadInput and mergeWriterContexts in mergeInstrProfile,
supplementInstrProfile, and overlapInstrProfile. In mergeInstrProfile's
ThreadPool, catch errors from worker threads, stop scheduling new jobs,
and return the first encountered fatal error.

Ensure ~WriterContext() consumes any pending unhandled errors in
WriterContext::Errors upon destruction.

Not NFC as destructors are run on the stack and ThreadPool workers exit
earlier on error.

With all subcommands propagating llvm::Error to main, exitWithError,
exitWithErrorCode, and the LSan leak suppression workaround are no
longer needed.

Assisted-by: Gemini
DeltaFile
+64-41llvm/tools/llvm-profdata/llvm-profdata.cpp
+64-411 files

LLVM/project 0fe7901 — llvm/tools/llvm-profdata llvm-profdata.cpp

[NFCI][llvm-profdata] Propagate Error in merge subcommand

Change merge_main and its helpers to return Error and handle it
with reportError in main.

Not NFC as destructors are run on the stack.

Assisted-by: Gemini
DeltaFile
+146-127llvm/tools/llvm-profdata/llvm-profdata.cpp
+146-1271 files

LLVM/project a30a988 — orc-rt/test/unit/bedrock ExecutorProcessInfoTest.cpp

[orc-rt] Use the Error matchers in ExecutorProcessInfoTest (#228307)

Use the Error matchers introduced in 4c8a437d0487 to clean up error
checks in ExecutorProcessInfoTest.
DeltaFile
+11-7orc-rt/test/unit/bedrock/ExecutorProcessInfoTest.cpp
+11-71 files

LLVM/project 14513d6 — utils/bazel/llvm-project-overlay/clang BUILD.bazel, utils/bazel/llvm-project-overlay/clang-tools-extra/clangd BUILD.bazel

[bazel] Replace various genrules with bazel_skylib rules (#228170)
DeltaFile
+12-21utils/bazel/llvm-project-overlay/openmp/runtime/src/BUILD.bazel
+18-13utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+19-7utils/bazel/llvm-project-overlay/lldb/BUILD.bazel
+14-11utils/bazel/llvm-project-overlay/clang-tools-extra/clangd/BUILD.bazel
+12-12utils/bazel/llvm-project-overlay/clang/BUILD.bazel
+10-11utils/bazel/llvm-project-overlay/libc/libc_build_rules.bzl
+85-7510 files not shown
+144-10516 files