forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 107
Update LLVM to 21.1.7 + some 21.1.8 patches #192
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
dianqk
merged 18 commits into
rust-lang:rustc/21.1-2025-08-01
from
inkreasing:rustc/21.1-2025-08-01
Dec 10, 2025
Merged
Update LLVM to 21.1.7 + some 21.1.8 patches #192
dianqk
merged 18 commits into
rust-lang:rustc/21.1-2025-08-01
from
inkreasing:rustc/21.1-2025-08-01
Dec 10, 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
The VM_MEMORY_SANITIZER constant was added in macOs 10.15 and friends. Support using the constant on older OSes. Fixes llvm#156144 (cherry picked from commit bc55f4f)
This patch just copies the definitions from main, which should be working. There are a lot of changes that were not explicitly backported.
… units (llvm#166272) Fixes llvm#165445. Fixes a crash when `ASTWriter::GenerateNameLookupTable` processes enum constants from C++20 header units. The special handling for enum constants, introduced in fccc6ee, doesn't account for declarations whose owning module is a C++20 header unit. It calls `isNamedModule()` on the result of `getTopLevelOwningNamedModule()`, which returns null for header units, causing a null pointer dereference. (cherry picked from commit bc08e69)
We need to take into account that we may have already done a FirstSPAdjust. Fixes llvm#164805. (cherry picked from commit ff11b93)
…oves produced after forwarded uses (llvm#167336) As reported in <llvm#166870>, some copies with src==reg are not no-ops, e.g. when self-assigning a w-reg on AArch64 which will zero-extend the corresponding x register. Revert in order to fix the issue. We may revisit whether the optimisation can be made safe at a later point. Reverts dffbc03. Fixes llvm#166870. (cherry picked from commit a314b3b)
This was causing a build failure on Darwin and a test failure on Linux. This config is not widely used or well tested, so I don't think the potential and likely small performance gains and the portability from this are worth the maintenance costs. (cherry picked from commit 1906c3e)
…tion motion" (llvm#167465) This patch introduces a new virtual method `TargetInstrInfo::isSafeToMove()` to allow backends to control whether a machine instruction can be safely moved by optimization passes. The `BranchFolder` pass now respects this hook when hoisting common code. By default, all instructions are considered safe to to move. For LoongArch, `isSafeToMove()` is overridden to prevent relocation-related instruction sequences (e.g. PC-relative addressing and calls) from being broken by instruction motion. Correspondingly, `isSchedulingBoundary()` is updated to reuse this logic for consistency. Relands llvm#163725 (cherry picked from commit ea10026)
… when the compilation database is unavailable (llvm#153802) fixes llvm#132413 (cherry picked from commit 5b55899)
Summary: Test Plan: Reviewers: Subscribers: Tasks: Tags: Differential Revision: https://phabricator.intern.facebook.com/D87662897
We already ensure that code for different architectures is always placed in different pages in `assignAddresses`. We represent those ranges using their first and last chunks. However, the RVAs of those chunks may not be page-aligned, for example, due to extra padding for entry-thunk offsets. Align the chunk RVAs to the page boundary so that the emitted ranges correctly include the entire region. This change affects an existing test that checks corner cases triggered by merging a data section into a code section. We may now include such data in the code range. This differs from MSVC’s behavior, but it should not cause practical issues, and the new behavior is arguably more correct. Fixes llvm#168119. (cherry picked from commit af45b02)
Addresses llvm#169377. Previously, the RealtimeSanitizer pass only handled attributed function _definitions_ in IR, and we have recently found that attributed function _declarations_ caused it to crash. To fix the issue, we must check whether the IR function is empty before attempting to do any manipulation of its instructions. This PR: - Adds checks for whether IR `Function`s are `empty()` ~~in each relevant~~ at the top-level RTSan pass routine - ~~Removes the utility function `rtsanPreservedCFGAnalyses` from the pass, whose result was unused and which would otherwise have complicated the fix~~ (cherry picked from commit 5d4c441)
) Fixes llvm#154846 (cherry picked from commit dfe9838)
Fixes llvm#157405 (cherry picked from commit 836919b)
…re lambda (llvm#170969) Backport 4930e94
dianqk
approved these changes
Dec 10, 2025
89bab96
into
rust-lang:rustc/21.1-2025-08-01
24 of 25 checks passed
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.
This includes the fix for rust-lang/rust#149250, which made rtsan unusable.
This is my first time doing a llvm update, so let me know if something looks wrong. I am not sure if you only want to update to a llvm dot release or anything on the release branch is fine. If you want a dot release i will wait until 21.1.8 is released.