forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 77
merge main into amd-staging #361
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
ronlieb
merged 32 commits into
amd-staging
from
amd/merge/upstream_merge_20251023130237
Oct 23, 2025
Merged
merge main into amd-staging #361
ronlieb
merged 32 commits into
amd-staging
from
amd/merge/upstream_merge_20251023130237
Oct 23, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… MMX/SSE/AVX2 PSIGN intrinsics to be used in constexpr (llvm#163685) Fix llvm#155812
This is a slightly more complicated variant of this, which supports 'x = expr', so the right hand side is an r-value. This patch implements that, adds some tests, and does some minor refactoring to the infrastructure added for the 'atomic read' to make it more flexible for 'write'. This is the second of four 'atomic' kinds.
…4413) While testing baremetal lldb, I came across a situation that if an instruction could not be disassembled, lldb will print nothing as an output which might be a bit strange. I added at least printing warning in this case.
) We started to list GitHub issues in the status CSV tables/pages due to e0d0b90. However, the changes made existing column header insufficient. We probably need to add new column headers for GitHub issues.
This commit adds support for the MATMUL_T_BLOCK_SCALED operation from the EXT_MXFP extension. This includes: - Operation definition in TosaOps.td - Micro-scaling supported types definition - Shape inference and verifiers - Validation pass checks to ensure usage is only valid when the target environment includes ext-mxfp and at least v1.1.draft of the specification. As part of this commit, a notion of EXT_MXFP is also added. The extension can be specified as part of the target environment and can only be used if the specification version is at least 1.1. Note: currently it excludes support for mxint8. This will be added in a later commit. Note: this commit adds support as defined in the spec in arm/tosa-specification@063846a. EXT_MXFP extension is considered experimental and subject to breaking change. Co-authored-by: Tat Wai Chong <tatwai.chong@arm.com>
The lldb-server platform help text is inconsistent with lldb-server gdbserver help text. This PR modernizes the platform server to use LLVM's [TableGen](https://llvm.org/docs/TableGen/)-based option parsing (matching the existing gdbserver implementation), which auto-generates option parsing code and help text. The changes improve documentation quality by adding comprehensive option descriptions,, adding support for `-h`/`--help` flags, and organizing help output with DESCRIPTION and EXAMPLES sections. Internal-only options (`--child-platform-fd`) and unused legacy options (`--debug`, `--verbose`) are now hidden from help while maintaining backward compatibility. All functional behavior remains unchanged—this is purely a documentation and code modernization improvement. ## before ``` > /opt/llvm/bin/lldb-server p -h p: unrecognized option '-h' Usage: /opt/llvm/bin/lldb-server p [--log-file log-file-name] [--log-channels log-channel-list] [--port-file port-file-path] --server --listen port ``` ## after ``` lldb-server p -h OVERVIEW: lldb-server platform USAGE: lldb-server p [options] --listen <[host]:port> [[--] program args...] CONNECTION OPTIONS: --gdbserver-port <port> Port to use for spawned gdbserver instances. If 0 or unspecified, a port will be chosen automatically. Short form: -P --listen <[host]:port> Host and port to listen on. Format: [host]:port or protocol://[host]:port (e.g., tcp://localhost:1234, unix:///path/to/socket). Short form: -L --socket-file <path> Write listening socket information (port number for TCP or path for Unix domain sockets) to the specified file. Short form: -f GENERAL OPTIONS: --help Display this help message and exit. --log-channels <channel1 categories...:channel2 categories...> Channels to log. A colon-separated list of entries. Each entry starts with a channel followed by a space-separated list of categories. Common channels: lldb, gdb-remote, platform, process. Short form: -c --log-file <file> Destination file to log to. If empty, log to stderr. Short form: -l --server Run in server mode, accepting multiple client connections sequentially. Without this flag, the server exits after handling the first connection. OPTIONS: -- program args Arguments to pass to launched gdbserver instances. DESCRIPTION Acts as a platform server for remote debugging. When LLDB clients connect, the platform server handles platform operations (file transfers, process launching) and spawns debug server instances (lldb-server gdbserver) to handle actual debugging sessions. By default, the server exits after handling one connection. Use --server to keep running and accept multiple connections sequentially. EXAMPLES # Listen on port 1234, exit after first connection lldb-server platform --listen tcp://0.0.0.0:1234 # Listen on port 5555, accept multiple connections lldb-server platform --server --listen tcp://localhost:5555 # Listen on Unix domain socket lldb-server platform --listen unix:///tmp/lldb-server.sock ``` For comparison, here is the **gdbserver** help text: ``` lldb-server g -h OVERVIEW: lldb-server USAGE: lldb-server g[dbserver] [options] [[host]:port] [[--] program args...] CONNECTION: --fd <fd> Communicate over the given file descriptor. --named-pipe <name> Write port lldb-server will listen on to the given named pipe. --pipe <fd> Write port lldb-server will listen on to the given file descriptor. --reverse-connect Connect to the client instead of passively waiting for a connection. In this case [host]:port denotes the remote address to connect to. GENERAL OPTIONS: --help Prints out the usage information for lldb-server. --log-channels <channel1 categories...:channel2 categories...> Channels to log. A colon-separated list of entries. Each entry starts with a channel followed by a space-separated list of categories. --log-file <file> Destination file to log to. If empty, log to stderr. --setsid Run lldb-server in a new session. TARGET SELECTION: --attach <pid-or-name> Attach to the process given by a (numeric) process id or a name. -- program args Launch program for debugging. DESCRIPTION lldb-server connects to the LLDB client, which drives the debugging session. If no connection options are given, the [host]:port argument must be present and will denote the address that lldb-server will listen on. [host] defaults to "localhost" if empty. Port can be zero, in which case the port number will be chosen dynamically and written to destinations given by --named-pipe and --pipe arguments. If no target is selected at startup, lldb-server can be directed by the LLDB client to launch or attach to a process. ```
I used 'expr' since that is what it is in the standard, but that obviously conflicts with our warnings on some build bots. This patch fixes that by renaming it.
…vm#163698) Implement KCFI (Kernel Control Flow Integrity) backend support for ARM32, Thumb2, and Thumb1. The Linux kernel has supported ARM KCFI via Clang's generic KCFI implementation, but this has finally started to [cause problems](ClangBuiltLinux/linux#2124) so it's time to get the KCFI operand bundle lowering working on ARM. Supports patchable-function-prefix with adjusted load offsets. Provides an instruction size worst case estimate of how large the KCFI bundle is so that range-limited instructions (e.g. cbz) know how big the indirect calls can become. ARM implementation notes: - Four-instruction EOR sequence builds the 32-bit type ID byte-by-byte to work within ARM's modified immediate encoding constraints. - Scratch register selection: r12 (IP) is preferred, r3 used as fallback when r12 holds the call target. r3 gets spilled/reloaded if it is being used as a call argument. - UDF trap encoding: 0x8000 | (0x1F << 5) | target_reg_index, similar to aarch64's trap encoding. Thumb2 implementation notes: - Logically the same as ARM - UDF trap encoding: 0x80 | target_reg_index Thumb1 implementation notes: - Due to register pressure, 2 scratch registers are needed: r3 and r2, which get spilled/reloaded if they are being used as call args. - Instead of EOR, add/lsl sequence to load immediate, followed by a compare. - No trap encoding. Update tests to validate all three sub targets.
) This patch stops propagating nowrap flags unconditionally. In the modified part, when we have an addrec `{%a,+,%b}` where `%b` is known to be negative, we create a new addrec `{%a,+,(-1 * %b)}`. When creating it, the nowrap flags are transferred from the original addrec to the new one without any checks, which is generally incorrect. Since the nowrap property is not essential for this analysis, it would be better to drop it to avoid potential bugs.
…lvm#164297) Existing pattern for lowering gpu.printf op to LLVM call uses fixed function name and calling convention. Those two should be exposed as pass option to allow supporting Intel Compute Runtime for GPU. Also adds gpu.printf op pattern to GPU to LLVMSPV pass. It may appear out of place, but integration test is added to XeVM integration test as that is the current best folder for testing with Intel Compute Runtime. Test should be moved in the future if a better test folder is added.
…lvm#162456) Add DTLTO linker option `--thinlto-remote-compiler-prepend-arg` to enable support for the multi-call LLVM driver that requires an additional option to specify the subcommand, e.g. "llvm clang ...". Fixes llvm#159125.
The `INTEL_CLEARWATERFOREST` belongs to `ProcessorTypes` enum, but it was assigned to `Subtype` value, leading to cpu_specific/cpu_dispatch not recognizing CWF. The type for `Subtype` and `Type` are changed to respective enums to guard against these sort of errors in the future
…n() (llvm#163639) Implement the constexpr evaluation for `__builtin_infer_alloc_token()` in Clang's constant expression evaluators (both in ExprConstant and the new bytecode interpreter). The constant evaluation is only supported for stateless (hash-based) token modes. If a stateful mode like `increment` is used, the evaluation fails, as the token value is not deterministic at compile time.
) Upstream moving the allocas from cir.try block to the surrounding cir.scope Issue llvm#154992
This ammends the fix commited in https://reviews.llvm.org/D109770 / 6cf6fa6 Comparing the number of template parameter lists with the number of template parameters is obviously wrong. Even then, the number of parameters being the same doesn't mean the templates are compatible. This change compares if the template parameters are actually equivalent. This fixes the crash, but I am not sure what is the design and intention here, this openmp template support looks too fragile. The added test case still doesn't work, but at least we don't crash now.
…2963) Adding Matching and Inference Functionality to Propeller. For detailed information, please refer to the following RFC: https://discourse.llvm.org/t/rfc-adding-matching-and-inference-functionality-to-propeller/86238. This is the second PR, which includes the calculation of basic block hashes and their emission to the ELF file. It is associated with the previous PR at llvm#160706. co-authors: lifengxiang1025 [lifengxiang@kuaishou.com](mailto:lifengxiang@kuaishou.com); zcfh [wuminghui03@kuaishou.com](mailto:wuminghui03@kuaishou.com) Co-authored-by: lifengxiang1025 <lifengxiang@kuaishou.com> Co-authored-by: zcfh <wuminghui03@kuaishou.com> Co-authored-by: Rahman Lavaee <rahmanl@google.com>
…onditionals (llvm#155570) Add test coverage to ensure comma operators remain properly rejected in `#if` directives. Per CWG 1436, comma is not among the permitted operators in preprocessor conditional expressions. This test prevents regressions and clarifies the intended behavior. Fixes llvm#132822
Fix windows test failures from llvm#162730 by including and optional .exe on the lldb-server name. Still passes on linux, but should pass on windows now. ``` > bin/llvm-lit -v tools/lldb/test/Shell/lldb-server/ llvm-lit: llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using clang: llvm-project/build/bin/clang llvm-lit: llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using ld.lld: /usr/bin/ld.lld llvm-lit: llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using lld-link: /usr/bin/lld-link llvm-lit: llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using ld64.lld: /usr/bin/ld64.lld llvm-lit: llvm-project/llvm/utils/lit/lit/llvm/config.py:531: note: using wasm-ld: /usr/bin/wasm-ld llvm-lit: llvm-project/llvm/utils/lit/lit/llvm/subst.py:126: note: Did not find obj2yaml in llvm-project/build/./bin:llvm-project/build/./bin llvm-lit: llvm-project/llvm/utils/lit/lit/llvm/subst.py:126: note: Did not find llvm-objdump in llvm-project/build/./bin:llvm-project/build/./bin llvm-lit: llvm-project/lldb/test/Shell/lit.cfg.py:125: warning: Could not set a default per-test timeout. Requires the Python psutil module but it could not be found. Try installing it via pip or via your operating system's package manager. -- Testing: 4 tests, 4 workers -- PASS: lldb-shell :: lldb-server/TestGdbserverErrorMessages.test (1 of 4) PASS: lldb-shell :: lldb-server/TestPlatformHelp.test (2 of 4) PASS: lldb-shell :: lldb-server/TestPlatformErrorMessages.test (3 of 4) PASS: lldb-shell :: lldb-server/TestPlatformSuccessfulStartup.test (4 of 4) Testing Time: 1.10s Total Discovered Tests: 4 Passed: 4 (100.00%) 1 warning(s) in tests ```
This PR enables module summary for Full LTO. Module summaries are enabled by default for Full LTO in clang, this change makes the flang behaviour consistent. Reference PR: https://reviews.llvm.org/D34156
This adds support for handling dynamic casts that are known at compile time to always result in a null pointer. For pointer casts, this emits a null pointer value. For reference casts, it calls the __bad_cast function.
…4840) PR llvm#150123 changed how we normalize the modules cache path. Unfortunately, empty path would get normalized to the current working directory. This means that even explicitly-built PCMs that don't rely on the CWD now embed it, leading to surprising behavior. This PR fixes that by normalizing an empty modules cache path to an empty string.
…IFINITY and NAN with float.h (llvm#164348) In C23 mode, both float.h and math.h are required to define INIFINITY and NAN. However, with clang modules, there needs to be a single owner for the declarations. Let that be float.h since that's the suggested true owner in Annex F.2.2 of ISO/IEC 9899:2024, and introduce `__need_infinity_nan` so that math.h can pick up the compiler definitions.
Follow up to llvm#162028 `SANITIZER_INTERCEPT_WCSNLEN` is not defined, so `internal_wcsnlen` is always used instead of using `REAL(wcsnlen)` if intercepted.
…164844) CBuffers still need a layout type for now. Fix the crash when looking up the cbuffer info.
When lowering atomic <1 x T> vector types with floats, selection can fail since this pattern is unsupported. To support this, floats can be casted to an integer type of the same size.
…ration (llvm#164329) Add support for Machine IR (MIR) triplet and entity generation in llvm-ir2vec. This change extends llvm-ir2vec to support Machine IR (MIR) in addition to LLVM IR, enabling the generation of training data for MIR2Vec embeddings. MIR2Vec provides machine-level code embeddings that capture target-specific instruction semantics, complementing the target-independent IR2Vec embeddings. - Extended llvm-ir2vec to support triplet and entity generation for Machine IR (MIR) - Added `--mode=mir` option to specify MIR mode (vs LLVM IR mode) - Implemented MIR triplet generation with Next and Arg relationships - Added entity mapping generation for MIR vocabulary - Updated documentation to explain MIR-specific features and usage (Partially addresses llvm#162200 ; Tracking issue - llvm#141817)
Collaborator
dpalermo
approved these changes
Oct 23, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.