Skip to content

Conversation

@ronlieb
Copy link
Collaborator

@ronlieb ronlieb commented Jan 6, 2026

No description provided.

sarnex and others added 30 commits January 6, 2026 15:10
SPIR-V does not have a production-grade linker so it is often necessary
to stay in LLVM-IR as long as possible and only convert to SPIR-V at the
very end.

As such, it is common that we want to create a BC library that is linked
into a user program (motivating example here is the OpenMP device RTL).
We only convert to SPIR-V at the very end when we have a fully linked
program.

Other targets can achieve a similar goal by using LTO to get a linked-BC
file, but the SPIR-V linker does not support LTO, so we have no way to
do it with `clang`. We can do it with `llvm-link` directly, but my
understanding is that it is not intended to be directly called in
production workflows and does not fit well into code that supports
multiple targets.

Extend the existing behavior for `HIP` that allows `-emit-llvm` without
`-c`.

---------

Signed-off-by: Nick Sarnie <nick.sarnie@intel.com>
Add a lit test that exercises RocmInstallationDetector when clang is
installed under /opt/rocm/lib/llvm/bin, using a synthetic sysroot so it
does not depend on any real /opt/rocm installation. The test copies the
built clang binary into the test tree so the driver observes the
expected InstalledDir and real path, following the precedent of other
driver tests that copy %clang into a temporary layout.

This is for testing llvm#138928
Static analysis flagged a case where we had defined the destructor but
not copy ctor or copy assignment, which violates the Rule of Three. I
applied this to all the cases I found. With the exception to destructors
with empty bodies. These should be defaulted but that should be done
seperately.
…e `hash` specializations (llvm#174120)

In this release:
- [x] `file_clock`
- [x] `steady_clock`
- [x] `system_clock`
- [x] `time_point`
- [x] some `hash` specializations 

Any other existing clocks are already annotated. Annotated some `hash`
specializations for already annotated classes.

`[[nodiscard]]` should be applied to functions where discarding the
return value is most likely a correctness issue.

- https://libcxx.llvm.org/CodingGuidelines.html
- https://wg21.link/time.point
- https://wg21.link/time.clock.file
- https://wg21.link/time.clock.steady
- https://wg21.link/time.clock.system

Towards llvm#172124
…llvm#173345)

Clang provides lambdas as an extension in C++03 now, so we can use them
to simplify our code a bit.
This macro provides relatively little value. Using the standard FTM
directly removes one level of indicretion, making it easier to
understand what is actually happening.
…lvm#171625)

Clang provides these macros since LLVM 19, so we can assume they are
available.
The scale is a signed quantity.

This avoids an assertion failure with github.com/llvm/pull/171456.
…lvm#174243)

add test case to test lib call are used for the ___strcpy milicode.
…llvm#173509)

Add lowering support for the OpenMP `device` clause on the `target`
directive in Flang.

The device expression is propagated through MLIR OpenMP and passed to
the host-side `__tgt_target_kernel` call.
…lvm#174522)

Darwin supports running tests on targets other than the host machine
e.g. simulators. In such configurations, tests are run via a wrapper
script (e.g. iossim_run.py).

This refactors the lit test config to use a dedicated option to
distinguish test suites that run on the host from those that run in any
other configuration. This will allow the test suites to distinguish a
local osx configuration from a "remote" one.

rdar://167591463
llvm#174518)

Casting a pointer to a different address space is a nice trick to
prevent an access from being instrumented by sanitizers such as ASan.
However, this trick is currently broken, as the test demonstrates.

A minimal C PoC of the issue is:

```
void access(void *p) {
  auto tmp = (unsigned long __attribute__((address_space(1))) volatile *)p;
  *tmp = 0;
}
```

Under fsanitize=address, the access does not get instrumented, but under
fsanitize=thread, it does.

(Note: Before this patch, this test will actually hit a CallInst
assertion if you have them turned on, because the TSan runtime functions
are defined to take pointer arguments, and non-default address space
pointers are not compatible).

rdar://166743781
Based on the name of the function, I think it's safe to assume
`sys::fs::createTemporaryFile()` is not to be used for formal compiler
outputs and should only be used for compiler-internal outputs (caches,
debugging output, etc.). Thus, it should be fine to disable the IO
sandbox and allow bypassing `vfs::OutputBackend` here.
…s link (llvm#174616)

The old link is still dead/protected. Use the new link.
PR llvm#142970 Added for Windows targets to emit minimal codeview metadata
even when debug info is disabled. This crashes the backend for UEFI
x86_64-uefi triple as llvm.dbg.cu is expected unconditionally there.
Handling it correctly in AsmPrinter and adding a regression test.
…:' string (llvm#174572)

When the crashing thread was submitted to a libdispatch queue, the
`Triggered by Thread:` string looks like:
```
Triggered by Thread: 0, Dispatch Queue: com.apple.main-thread
```

Trying to run the `crashlog` command on such crashlog file fails with:
```
(lldb) crashlog -i '/tmp/lldb.crash'
Traceback (most recent call last):
  File "Git/llvm-worktrees/main/builds/release/lib/python3.13/site-packages/lldb/macosx/crashlog.py", line 1444, in __call__
    SymbolicateCrashLogs(debugger, shlex.split(command), result, True)
    ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "Git/llvm-worktrees/main/builds/release/lib/python3.13/site-packages/lldb/macosx/crashlog.py", line 1888, in SymbolicateCrashLogs
    load_crashlog_in_scripted_process(
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        debugger, crashlog_path, options, result
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "Git/llvm-worktrees/main/builds/release/lib/python3.13/site-packages/lldb/macosx/crashlog.py", line 1495, in load_crashlog_in_scripted_process
    crashlog = CrashLogParser.create(debugger, crashlog_path, options).parse()
  File "Git/llvm-worktrees/main/builds/release/lib/python3.13/site-packages/lldb/macosx/crashlog.py", line 1043, in parse
    self.parsers[self.parse_mode](line)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
  File "Git/llvm-worktrees/main/builds/release/lib/python3.13/site-packages/lldb/macosx/crashlog.py", line 1121, in parse_normal
    self.crashlog.crashed_thread_idx = int(line[20:].strip().split()[0])
                                       ~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: '0,'
```

This patch strips the possibly trailing comma in when parsing this
string.

Tested locally that this fixes the issue. LLDB test suggestions welcome
In W64, size_t and ul are different sizes. So, std::max cannot correctly
deduce the operator type, resulting an error at compile time.

The fix was originally added in
llvm#173802, but as suggested it's
best to keep unrelated changes separate.
)

Implement part of the ConstantExpr support for the ScalarExpr
…ve pre 20 support (llvm#173157)

It makes sense to decouple traits from the things they describe, since
that's the purpose of traits. Furthermore, this will make it possible to
reuse these traits from other places in the library (e.g. <semaphore>)
outside of the synchronization library.

Pre-C++20 support is removed as a drive-by since the synchronization
library does not support pre-C++20 anymore. This makes it possible to
simplify a few constructs by using concepts.

Requested in llvm#172214 (comment)
Clang's rewriter currently violates the IO sandbox due to a call to
`llvm::writeToOutput()`. Since the "blessed" `llvm::vfs::OutputBackend`
isn't easily available in that particular spot, this PR instead disables
the sandbox and leaves a FIXME behind.
…llvm#173238)

This patch adds the bare-minimum tests for the LLDB `llvm::ArrayRef`
formatters. Since this would be the first LLVM data fromatter test for
LLDB, I wanted to keep the test itself minimal and mainly set up/agree
on the infrastructure (i.e., CMake machinery, etc.).

The setup mimicks that of GDB. The main differences are:
1. the GDB formatter tests put all the test cases in one monolithic test
file, whereas I'm planning on having one test-file per LLVM container.
2. the GDB formatter tests currently only get run if LLVM was built with
debug-info. Not sure we have any build-bots out there running this
configuration. In this patch we rely on just the debug-info from the
LLVM headers (see latest commit). That way the tests get more
consistently run (at least our public macOS buildbot runs the
cross-project-tests in Release+Asserts).
Move all lldb-dap vscode extension files to the extension directory. 

Follow up from
llvm#162635 (comment)
There was a typo introduced in llvm#168637, this PR fixes it. Thanks to
Nikolas for pointing it out.
…vm#153338)

This tests that we don't ICE if a struct hasn't been forward declared.
Originally fixed in 160fb11

Link: ClangBuiltLinux/linux#2114
This PR adds more value types for future use.
DrSergei and others added 12 commits January 6, 2026 22:16
This patch adds libstdcpp string view summary provider.
Follow-up to llvm#171204 and
1f331e4 to only rely on isAddressSCEVForCost in legacy isAddressSCEVForCost,
completely aligning the decisions of VPlan and legacy cost model.
…174373)

This avoids the GOT slot being generated which is undesirable when using
static linking. A better solution would be to reorganize the code to
avoid the use of weak symbols altogether.

Fixes llvm#173409
…clarators with identifier-list parameters (llvm#174017)

Fixes llvm#173826

---

This patch resolves an issue where Clang could crash while parsing the
`enable_if` attribute on C function declarators with identifier-list
parameters.

In C, identifier-list function declarators use parameter identifiers
rather than full parameter declarations, as specified by the C spec.
Since `enable_if` is parsed early to participate in redeclaration checks


https://github.com/llvm/llvm-project/blob/0f3a9f658a7f459b9aa701ec42a999b645653862/clang/lib/Parse/ParseDecl.cpp#L674-L675

the parser could encounter such identifiers before their parameter
declarations exist and incorrectly assume they were already formed,
leading to an assertion failure.

This change makes the early `enable_if` parsing path handle parameters
that have not yet been declared, preventing the crash while preserving
existing behavior for well-formed function prototypes.
Trimming the content of the progress event is the responsibility of the
consumer, not the producer. For example, when using the statusline,
there's plenty of space to show longer expressions.

rdar://166879951
)" (llvm#174614)

This change adds a new intrinsic for AMDGPU that implements a wave
shuffle, allowing arbitrary swizzling between lanes using an index. In
the initial version of this commit, there was an issue in one of the
tests added that returned a signal, causing testing to fail when
combined with another recent change to 'not'.

For context on the initial commit see llvm#167372

---------

Signed-off-by: Domenic Nutile <domenic.nutile@gmail.com>
Co-authored-by: Jay Foad <jay.foad@gmail.com>
The files in the lldb-dap local .gitignore are only relevant to the
extension. Moving it into the extension dir also makes it easier to
mirror to the lldb-vscode repo.
)

Support Type with PointerRepresentation in CatchParam

Issue llvm#154992
Keeping them conservatively simple and coarse grained.
…oadcast` (llvm#174206)

Use the same repacking logic as for shuffle/swizzle.
@ronlieb ronlieb requested review from a team and dpalermo January 6, 2026 22:26
@ronlieb ronlieb requested a review from fabianmcg as a code owner January 6, 2026 22:26
@ronlieb ronlieb removed the request for review from fabianmcg January 6, 2026 22:26
@z1-cciauto
Copy link
Collaborator

@z1-cciauto z1-cciauto merged commit 3682b2d into amd-staging Jan 7, 2026
13 checks passed
@z1-cciauto z1-cciauto deleted the amd/merge/upstream_merge_20260106140852 branch January 7, 2026 01:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.