Repository navigation
Conversation
…5541) In #162162, I added support for OSC 9;4 graphical progress. I put it behind the `show-progress` setting because I didn't have a reliable way to detect whether the escape code was supported by the terminal. Since then, more tools have added support for it, most notably Claude Code and Homebrew. While I still don't have a good way to detect this, there are a handful of known terminals that are easy enough to identify. This PR toggles the default of `show-progress` to on again and puts showing the progress behind a check for those known terminals (Windows Terminal, ConEmu & Ghostty). This means that if you're running in one of those, you'll get the visual progress by default unless you set `show-progress` to off. The downside is that if you're on an unrecognized terminal, you can't force it on any longer by setting `show-progress` to on. I think that's a fair trade-off as the setting wasn't really advertised and I doubt many people are using that. As a workaround, they can set `OSC_PROGRESS` to spoof an OSC-supporting terminal.
This PR adds WaveActiveBitXor function to HLSL, with spirv and DXIL code generation. Fixes llvm/llvm-project#99168
Use the same format string in DWARFCompileUnit.cpp as we do everywhere else to report the error from GetAttributeAddressRanges. I noticed the inconsistency when looking at our system log: ``` 2026-03-12 05:36:48.600914 -0700 0x2e66: DIE has no address range information 2026-03-12 05:36:48.600950 -0700 0x2e8c: DIE has no address range information 2026-03-12 05:36:48.601068 -0700 DIE(0x1dc2): DIE has no address range information 2026-03-12 05:36:48.631000 -0700 DIE(0x80f4): DIE has no address range information ```
Instrumentation emitted for overflow by division was not checking with the sanitizer case list's type entries. The original type-based ignorelist support (#107332) added `isTypeIgnoredBySanitizer` calls to `CanElideOverflowCheck`, which covers `+`, `-`, `*`, `++`, `--`. However, division and remainder have a separate code path in `EmitUndefinedBehaviorIntegerDivAndRemCheck` that never calls `CanElideOverflowCheck` or checks the ignorelist directly. Add a check so that the SCL is honored for the div/rem case.
Some VPlan transforms, like vectorizing fmin without fast-math, introduce AnyOfs, which have costs assigned in the VPlan-based cost model, but not the legacy cost model. Account for their cost like done for other similar VPInstrctions, like EVL. Fixes llvm/llvm-project#185867.
…#186243) This pass handles `acc routine` directive by creating specialized functions with appropriate parallelism information that can be used for eventual creation of device function. For each acc.routine that is not bound by name, the pass creates a new function (the "device" copy) whose body is a single acc.compute_region containing a clone of the original (host) function body. Parallelism is expressed by one acc.par_width derived from the routine's clauses (seq, vector, worker, gang). The device copy created is simply a staging place for eventual move to device module level function. --------- Co-authored-by: Delaram Talaashrafi <dtalaashrafi@nvidia.com>
…loading (#185514) Weak symbols may be overridden during linking, and this may cause profile mismatch when compiling the weak symbols, while the profile was created based on the overriding function. Skip counting the weak symbol while checking the mismatched function profiles to avoid false alarm on rejecting legit profiles.
…186023) `iswdigit` was implemented (llvm/llvm-project#181635) but not declared in the generated wctype.h (wctype.yaml) and was missing from the Windows config entrypoints. This pr declares iswdigit in wctype.h and enables it for the Windows config. also is part of llvm/llvm-project#185136.
…inlining (#186266) When the MLIR inliner inlines a callable region that has more than one block, it calls `handleTerminator(op, Block *newDest)` for the terminator of every inlined block. `TestInlinerInterface` only implemented the single-block variant (`handleTerminator(op, ValueRange)`), so the default `llvm_unreachable` was hit when inlining a `test.functional_region_op` whose body contained multiple blocks (e.g. an explicit `cf.br` jump to a successor block whose terminator was `test.return`). Fix: add the missing `handleTerminator(op, Block *)` override to `TestInlinerInterface`. Mirror the pattern used by `FuncDialectInlinerExtension`: if the terminator is a `TestReturnOp`, replace it with a `cf.br` to `newDest` carrying the return operands. Any other terminator (e.g. `cf.br` for intra-region branches) is left untouched — the existing `ControlFlowInlinerInterface` no-op already handles those correctly. Add a regression test in `test/Transforms/inlining.mlir` that inlines a `call_indirect` into a `test.functional_region_op` with two blocks. Fixes #185350 Assisted-by: Claude Code
…5547) Currently these functions take a target pointer. In Cross-language projects this means it's down to chance what typesystem the resulting value will be in, since the implementation returns the first scratch type system in the target, which depends on the order of images and their implementation language. By passing in an execution context the selected frame is used to determine the typesystem, which is usually the expected outcome when using DIL. This should be entirely NFC for Clang-only LLDBs, but is a necessity for LLDBs with additional type system plugins such as the Swift plugin. Assisted by Claude to patch the call sites.
Summary: We use this `dyn_ptr` argument in Clang/OpenMP to handle the `KernelLaunchEnvironment`. This is a per-kernel argument used to share some information. Currenetly, it's prepended to the argument list and we generate storage for it in the runtime. This is bad for a few reasons: 1. It changes the ABI by shifting user arguments 2. It cannot be trivially be left uninitialized if unused 3. The runtime must allocate its own memory for it This PR changes it to be appended instead. Additionally, space for this is always emitted. This means the OMPIRBuilder itself will provide the storage, we simply need to populate it in the runtime if it is used. This means that if it's unused we don't always pay the cost and it's easier for non-OpenMP users to ignore it. Backward compatibility is maintained by auto-upgrading the kernel arguments. In `libomptarget` we completely allocate a new buffer to store this in the new format. The plugins still need to respect the old ABI of the called device object, so we simply rotate it if it's the old version.
…to be zero (#186267) The zext_inreg test changes are interesting - we mostly get closer to the VPBLENDW(XMM,0) pattern, but the fast-shuffle targets still fail to recognize the upper half of the YMM is zero and don't simplify the AND(YMM,C) as much as they could. Helps with regression identified on #182200
Change the default of `LLDB_ENABLE_ARM64E_DEBUGSERVER` so we build debugserver fat for arm64 and arm64e when running on macOS Tahoe (26) or later on ptrauth-capable hardware.
WaitcntGenerator state depends on MF attributes, so create a new WCG object per MF until we have a better solution. This patch also adds a test that exercises this. Even though we stopped creating a new WCG instance in #177689, the behavior didn't change because SIInsertWaitcnts gets recreated on every MF (so this patch is practically an NFC).
Remove `NoNaNsFPMath` uses in X86 part. This should be the last part.
Fixes a redefinition warning on Ubuntu 25.10 coming from `ptrace.h`
including `hwcap.h`.
```
/home/jonas/llvm/llvm-project/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp:84:9: warning: ‘HWCAP2_POE’ redefined
84 | #define HWCAP2_POE (1ULL << 63)
| ^~~~~~~~~~
In file included from /usr/include/aarch64-linux-gnu/asm/ptrace.h:25,
from /home/jonas/llvm/llvm-project/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.h:19,
from /home/jonas/llvm/llvm-project/lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp:11:
/usr/include/aarch64-linux-gnu/asm/hwcap.h:141:9: note: this is the location of the previous definition
141 | #define kkk (1UL << 63)
| ^~~~~~~~~~
```
This extends the cir.delete_array lowering code to introduce a loop that calls destructors when the array being deleted represents a destructed type. The lowering introduces the destructors by way of a cir.array.dtor operation, which is further expanded during LoweringPrepare. This also required updating the cir.array.dtor operation to accept a raw pointer to the element type and a value representing the number of elements to be destructed. This does not yet handle the possibility of destructors throwing exceptions.
This fixes 2d70dbd.
…186055) Some trailing kill/dead register operands may added by MachineInstr::addRegisterKilled or MachineInstr::addRegisterDead, which uses the overlap registers same with the operand 1-4. Let's remove them here as only 5 operands are assert existing.
…939) Our use case requires making two (or more) hashes for the same input but with different keys. The library already supports this - we just need to expose the API
Add the architecture-specific pieces needed for the ASan and UBSan
sanitizer runtimes to build and run on hexagon-unknown-linux-musl.
Without this patch, building sanitizer runtimes for Hexagon Linux fails
with:
sanitizer_linux.cpp: error: member access into incomplete type
'struct stat64'
because musl libc does not provide struct stat64. This patch routes
Hexagon through the statx() syscall path (like LoongArch) to avoid the
stat64 dependency entirely.
Changes:
* asan_mapping.h: Add ASAN_SHADOW_OFFSET_CONST (0x20000000) for Hexagon
with shadow layout documentation.
* sanitizer_linux.cpp: Implement internal_clone() for Hexagon using
inline assembly (trap0 syscall, generic clone argument order: flags,
stack, ptid, ctid, tls). Route Hexagon through the statx() path for stat
operations since musl lacks struct stat64.
* sanitizer_linux.h: Add Hexagon to the internal_clone() declaration
guard.
* sanitizer_stoptheworld_linux_libcdep.cpp: Add Hexagon to the
StopTheWorld architecture guard with register definitions.
* sanitizer_asm.h: Define ASM_TAIL_CALL as 'jump' for Hexagon.
* CMakeLists.txt: Add -fno-emulated-tls for Hexagon targets. Hexagon
Linux uses native TLS via the UGP register; emulated TLS produces broken
sanitizer runtimes with unresolvable __emutls references.
TranslateOpenMPTargetArgs drops OPT_m_Group options, including `-mlinker-version`, when the device triple differs from the host triple. This can cause an assertion failure in MachO::getLinkerVersion when running `offload-Xarch.c` and `openmp-offload-gpu.c` on Darwin as it expects the linker version obtained via `-mlinker-version` and the version cached during a previous invocation to match. Fix this by preserving `-mlinker-version` when filtering OPT_m_Group options. The tests currently pass because 6758bec ("[ObjC] Support emission of selector stubs calls instead of objc_msgSend."), which triggered the assertion, was reverted. This fix is a prerequisite for reapplying that commit.
Adds CIRGen support for a subset of the __sync_fetch_and_* builtins, including arithmetic (add, sub) and bitwise (and, or, xor, nand) variants.
…ng (#186172) Now we need to provide a location when call `load()`, e.g. ```python with Context(), Location.unknown(): MyDialect.load() ``` But it's actually weird: IRDL is just an implementation details, so for users they don't know why they need to provide a location for loading a dialect, which is unrelated to constructing an IR module. This PR made location optional for dialect loading.
…ch as possible (#179178)" This reverts commit 8eb0dfe. Breaks some clang header module targets. See the original PR for discussion/reproducers.
…r (#186326) Collect allocation traces for tagged memory when using the `darwin-mte-launcher` to help debug MTE crashes.
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.
…823) 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.)
Summary: These linked to the extern "C" versions which did not exist in test builds.
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
The test expects crash after commit essentially null-dereferencing. Just check that it's nullptr directly. Fixes asan/ubsan buildbot.
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
…mmediates (#185643) This is a follow-up to #182456. This PR adds support for short forward branches where branches are from Qualcomm uC `Xqcibi` extension.
…6538) 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
…erated (#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.
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 most FreeBSD developer's choice for scripting language over Python. Until school starts again in May, I will work full time in the foundation which means I can actively create new features, fix bugs, and review other's code changes. I will have less time to dedicate myself to contribute to open source projects after May, but I will still commit myself to code reviews and bug fixes that do not take too much time. My FreeBSD contributions: https://cgit.freebsd.org/src/log/?qt=author&q=Minsoo+Choo My FreeBSD Phabricator profile: https://reviews.freebsd.org/p/minsoochoo0122_proton.me/ Signed-off-by: Minsoo Choo <minsoochoo0122@proton.me>
Signed-off-by: Minsoo Choo <minsoochoo0122@proton.me>
…mment (#186544) Align with cmake function name.
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
…lers (#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 easy to distinguish separate call chains. Also add documentation for deferred diagnostics and the concept of HD-promoted functions to the HIP and CUDA docs. Fixes: llvm/llvm-project#180638
CONFLICT (content): Merge conflict in clang/lib/Sema/SemaDecl.cpp
CONFLICT (content): Merge conflict in libclc/CMakeLists.txt
CONFLICT (content): Merge conflict in libclc/clc/lib/amdgpu/math/clc_exp.cl
CONFLICT (content): Merge conflict in clang/lib/CodeGen/Targets/NVPTX.cpp
CONFLICT (content): Merge conflict in clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp
CONFLICT (content): Merge conflict in libclc/CMakeLists.txt CONFLICT (add/add): Merge conflict in libclc/test/CMakeLists.txt CONFLICT (add/add): Merge conflict in libclc/test/lit.cfg.py CONFLICT (add/add): Merge conflict in libclc/test/lit.site.cfg.py.in
CONFLICT (content): Merge conflict in clang/lib/Driver/ToolChain.cpp
CONFLICT (content): Merge conflict in clang/lib/Sema/Sema.cpp
| run: | | ||
| ./llvm/utils/release/github-upload-release.py \ | ||
| --token ${{ github.token }} \ | ||
| --release ${{ inputs.release-version }} \ |
Check failure
Code scanning / zizmor
code injection via template expansion Error
| name: Test SYCL | ||
| runs-on: ubuntu-24.04 | ||
| container: | ||
| image: ghcr.io/llvm/ci-ubuntu-24.04:latest |
Check failure
Code scanning / zizmor
unpinned image references Error
| name: Test SPIR-V | ||
| runs-on: ubuntu-24.04 | ||
| container: | ||
| image: ghcr.io/llvm/ci-ubuntu-24.04:latest |
Check failure
Code scanning / zizmor
unpinned image references Error
| container: | ||
| image: ghcr.io/llvm/ci-ubuntu-24.04:latest | ||
| steps: | ||
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 |
Check warning
Code scanning / zizmor
credential persistence through GitHub Actions artifacts Warning
| container: | ||
| image: ghcr.io/llvm/ci-ubuntu-24.04:latest | ||
| steps: | ||
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 |
Check warning
Code scanning / zizmor
credential persistence through GitHub Actions artifacts Warning
| repo = github.Github(auth=github.Auth.Token("${{ github.token }}")).get_repo("${{ github.repository }}") | ||
| pr = repo.get_pull(${{ github.event.issue.number }}) | ||
| comment = pr.get_issue_comment(${{ github.event.comment.id }}) | ||
| add_text = "> _Running benchmarks in ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/job/${{ job.check_run_id }}_" |
Check notice
Code scanning / zizmor
code injection via template expansion Note
| run: | | ||
| digest_file="sha256" | ||
| echo "$INPUTS_DIGEST -" > $digest_file | ||
| cat ${{ steps.download-artifact.outputs.download-path }}/* | sha256sum -c $digest_file |
Check notice
Code scanning / zizmor
code injection via template expansion Note
| - name: Rename attestation file | ||
| shell: bash | ||
| run: | | ||
| for f in ${{ steps.download-artifact.outputs.download-path }}/*; do |
Check notice
Code scanning / zizmor
code injection via template expansion Note
| shell: bash | ||
| run: | | ||
| for f in ${{ steps.download-artifact.outputs.download-path }}/*; do | ||
| cp ${{ steps.provenance.outputs.bundle-path }} $(basename $f).jsonl |
Check notice
Code scanning / zizmor
code injection via template expansion Note
| --token ${{ github.token }} \ | ||
| --release ${{ inputs.release-version }} \ | ||
| upload \ | ||
| --files ${{ steps.download-artifact.outputs.download-path }}/* *.jsonl |
Check notice
Code scanning / zizmor
code injection via template expansion Note
No description provided.