forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 75
merge main into amd-staging #478
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
z1-cciauto
merged 55 commits into
amd-staging
from
amd/merge/upstream_merge_20251103120011
Nov 4, 2025
Merged
merge main into amd-staging #478
z1-cciauto
merged 55 commits into
amd-staging
from
amd/merge/upstream_merge_20251103120011
Nov 4, 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
…llvm#164934) To remove some test diffs in llvm#160449
This commit rewrites the big comment block at the beginning of MallocChecker because it contained lots of obsolete and inaccurate information. I see that this block is a bit verbose (especially compared to the analogous comments in other checkers), but as this is one of the most complex checker families, I think it's useful to give this overview at the beginning of the source file.
This implements the parts of https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3457.htm which were adopted at the recent meeting in Brno. Clang already implemented `__COUNTER__`, but needed some changes for conformance. Specifically, we now diagnose when the macro is expanded more than 2147483647 times. Additionally, we now give the expected extension and pre-compat warnings for the feature. To support testing the limits, this also adds a -cc1-only option, `-finitial-counter-value=`, which lets you specify the initial value the `__COUNTER__` macro should expand to.
The method `CallEvent::invalidateRegions()` takes (an unsigned `BlockCount` and) a `ProgramStateRef` which was previously defaulted to `nullptr` -- and when the state argument was `nullptr`, the method used the "inner" state of the `CallEvent` as a starting point for the invalidation. My recent commit 0f6f13b turned the "inner" state of the `CallEvent` into a hidden `protected` implementation detail; so this commit follows that direction by removing the "defaults to the inner state" behavior from `invalidateRegions` to avoid exposing the inner state through this channel. The method `CallEvent::invalidateRegions()` was only called in two locations, only one of those was relying on the existence of the default argument value, and even there it was easy to explicitly pass the `State` object. This commit also eliminates a footgun: with the old logic, if some code had tried to pass a state explicitly (presumably because the "inner" state of the call was obsolete) but that "new" state happened to be `nullptr`, then `invalidateRegions` would have silently used the inner state attached to the call. However, I reviewed the call sites and don't think that it was actually possible to reach this buggy execution path.
) For ALLOCATORS and executable ALLOCATE first perform list item checks in the context of an individual ALLOCATE clause or directive respectively, then perform "global" checks, e.g. whether all list items are present on the ALLOCATE statement. These changes allowed to simplify the checks for presence on ALLOCATE statement and the use of a predefined allocator. Additionally, allow variable list item lists to be empty, add a test for the related spec restriction. This is a first step towards unifying OpenMPDeclarativeAllocate and OpenMPExecutableAllocate into a single directive.
Originally done in llvm#166088. This broke 2 of our Flang builds with this error: FAILED: examples/OptSubcommand/CMakeFiles/OptSubcommand.dir/llvm-hello-sub.cpp.o /usr/local/bin/c++ <..> -c /home/tcwg-buildbot/worker/flang-aarch64-rel-assert/llvm-project/llvm/examples/OptSubcommand/llvm-hello-sub.cpp ../llvm-project/llvm/examples/OptSubcommand/llvm-hello-sub.cpp:49:51: error: expected '{' or ',' 49 | OptionSubCommandIDsTable) = default; | ^
Reverts llvm#165858 due to failures on Arm 32-bit. ``` Traceback (most recent call last): File "/home/tcwg-buildbot/worker/lldb-arm-ubuntu/llvm-project/lldb/test/API/tools/lldb-dap/exception/TestDAP_exception.py", line 24, in test_stopped_description self.assertEqual(exceptionInfo["description"], "signal SIGABRT") AssertionError: '\x01ignal SIGABRT' != 'signal SIGABRT' - �ignal SIGABRT ? ^ + signal SIGABRT ? ^ ```
…w-on-overaligned-type` (llvm#165542) Moves `cert-mem57-cpp` check into `bugprone` module and gives it a clearer name: `bugprone-default-operator-new-on-overaligned-type` This is part of the cleanup described in llvm#157287. Closes [llvm#157289](llvm#157289)
…lvm#163737) It wanted at least Python 3.6, LLVM's minimum is now 3.8, so remove this check. It was still using print as a statement, which was removed in 3.0 (https://docs.python.org/3/whatsnew/3.0.html#print-is-a-function). Exception syntax changed in 3.0 from "A, B" to "A as B" (https://docs.python.org/3/whatsnew/3.0.html#changed-syntax).
Linux uses `sparc64` triple name on 64-bit SPARCs. This should fix the test failure in discriminated-union.ll.
…#166069) Fixed: llvm#161913 --------- Co-authored-by: Baranov Victor <bar.victor.2002@gmail.com>
Bound ISL operations during pre-vectorization to prevent indefinite compilation. The MaxOpGuard previously used for schedule computation is now extended to also guard pre-vectorization optimizations. This patch includes a reduced test case derived from the original bug report. --------- Co-authored-by: Michael Kruse <llvm-project@meinersbur.de>
The ALLOCATE directive has two forms:
- A declarative form with a standalone directive:
```
!$OMP ALLOCATE (variable-list-item...)
```
- An executable form that consists of several directives followed by an
ALLOCATE statement:
```
!$OMP ALLOCATE (variable-list-item...)
!$OMP ALLOCATE (variable-list-item...)
...
ALLOCATE (...)
```
The second form was deprecated in OpenMP 5.2 in favor of the ALLOCATORS
construct.
Since in the parse tree every type corresponding to a directive only
corresponds to a single directive, the executable form is represented by
a sequence of nested OmpAllocateDirectives, e.g.
```
!$OMP ALLOCATE(x)
!$OMP ALLOCATE(y)
ALLOCATE(x, y)
```
will become
```
OmpAllocateDirective
|- ALLOCATE(x) // begin directive
`- OmpAllocateDirective // block
|- ALLOCATE(y) // begin directive
`- ALLOCATE(x, y) // block
```
With this change all AST nodes for directives use
OmpDirectiveSpecification as the directive representation.
…sure we merge the full / truncated load chains (llvm#166160) The full load might persist so ensure that the chains are merged into a token factor instead of just transferring the chain to the new load Noticed while trying to fix the regression reported from llvm#165540
There are cases where the progress indicator does not align at all with the action printed in FAILED:. Default to just using the action there so that we can ensure the results are accurate. This still leaves some issues where we are not capturing all the log lines, but I'll look at those in a future crash. Those are also less critical since they do not cause the script to patch. Partially fixes llvm#165131. Reviewers: DavidSpickett Reviewed By: DavidSpickett Pull Request: llvm#166100
…ace(0) (llvm#164432) By convention the AS of the elements of `llvm.compiler.used` & `llvm.used` is 0. However, the AS of `CGM.Int8PtrTy` is not always 0. This leaves some LLVM helpers (`appendToUsed/appendToCompilerUsed/removeFromUsedLists`) unusable. This patch makes the AS of the elements of these variables to be 0. This PR is related to llvm#162660
Summary: The changes in llvm@43bd7e3 altered how we handled including headers, this included the system on the GPU target which poisoned the include path that was curated to not include any system headers. Change this to only apply is the target OS is Linux.
…166133) Better match exactly rather than just a prefix.
…m#165853) It is possible for "Enter potentially blocking region" to come before "Enter constructor" in this test - if the thread that acquires the guard fails to reach its printf before the other thread that enters the blocking region reaches its own printf. Note that for the exit logs this inversion is not possible. This patch addresses this by allowing those two log lines to come in either order. rdar://163375661
…lbr instruction with inline-asm (llvm#152161) Finishes adding inline-asm callbr support for AMDGPU, started by llvm#149308.
…er.getFileLocSlowCase (llvm#164269) Optimize implementations of `getSpellingLocSlowCase` and `getFileLocSlowCase` by inlining called methods to avoid repeated calls to `getSLocEntry` and `getFileID`. a performance improvement follow up for llvm#160667
Following [recent discussion](http://lists.isocpp.org/core/2025/10/18637.php) on CWG reflector, `cwg_index.html` now contains stable name of the section for each Core issue. I thought that this would be a useful information to have on our C++ DR status page for that handful of experts who actually open it, so here we are. This PR consists of 3 parts: 1. Rewrite of a small routine that parses `cwg_index.html` from splits and indicies to a single regular expression with named groups, adding section information. 2. Changes to the rest of the `make_cxx_dr_status` to accommodate for the first part. 3. Regenerated `cxx_dr_status.html`. Ideally this PR would only add lines to `cxx_dr_status.html`, but previously we've been leaving some newlines in issue titles (which never affected how this page is rendered), which are now properly replaced with whitespaces — hence a couple of deletions in that file. --------- Co-authored-by: Richard Smith <richard@metafoo.co.uk>
BranchProbability fails an assert when its denominator is zero. Reported at <llvm#159163 (review)>.
…fault assumed alignment
…ion (llvm#164941) After: <img width="1904" height="186" alt="Screenshot From 2025-10-24 09-59-40" src="https://github.com/user-attachments/assets/c860227f-50c5-4afe-a959-83e3452fc72d" /> <img width="1366" height="204" alt="Screenshot From 2025-10-24 09-59-12" src="https://github.com/user-attachments/assets/450bffec-b4b2-465c-b435-bddf8ebdbd32" /> <img width="1310" height="204" alt="Screenshot From 2025-10-24 09-58-53" src="https://github.com/user-attachments/assets/8015ec6f-e032-4f0b-b55c-b2c718d14f6b" />
…nd has a use in binop. If the parent node is non-schedulable (only externally used instructions), and at least one instruction has multiple uses and used in the binop, such copyable node should be created. Otherwise, it may contain wrong def-use chain model, which cannot be effective detected. Fixes llvm#166035
…gers (REAPPLIED) (llvm#166176) This patch allows us to narrow single bit-test/twiddle operations for larger than legal scalar integers to efficiently operate just on the i32 sub-integer block actually affected. The BITOP(X,SHL(1,IDX)) patterns are split, with the IDX used to access the specific i32 block as well as specific bit within that block. BT comparisons are relatively simple, and builds on the truncated shifted loads fold from llvm#165266. BTC/BTR/BTS bit twiddling patterns need to match the entire RMW pattern to safely confirm only one block is affected, but a similar approach is taken and creates codegen that should allow us to further merge with matching BT opcodes in a future patch (see llvm#165291). The resulting codegen is notably more efficient than the heavily micro-coded memory folded variants of BT/BTC/BTR/BTS. There is still some work to improve the bit insert 'init' patterns included in bittest-big-integer.ll but I'm expecting this to be a straightforward future extension. REAPPLIED from llvm#165540 which was reverted due to a sanitizer regression that should have been fixed by llvm#166160 Fixes llvm#164225
There's no need to create temporary SmallVectors.
… for callbr instruction with inline-asm" (llvm#166186) Reverts llvm#152161 Need to revert to fix changed logic for the expensive checks.
Specify that the first match is returned and bail out early when processing multiple case values.
llvm#166127) We have: /// Once all uses of this constructor are migrated to other constructors, /// consider marking this overload ""= delete" to prevent calls from being /// incorrectly bound to the APInt(unsigned, uint64_t, bool) constructor. LLVM_ABI APInt(unsigned numBits, unsigned numWords, const uint64_t bigVal[]); This patch migrates away from this soft-deprecated constructor.
…llvm#166128) We have: /// Once all uses of this constructor are migrated to other constructors, /// consider marking this overload ""= delete" to prevent calls from being /// incorrectly bound to the APInt(unsigned, uint64_t, bool) constructor. LLVM_ABI APInt(unsigned numBits, unsigned numWords, const uint64_t bigVal[]); This patch migrates away from this soft-deprecated constructor.
Identified with modernize-use-using.
Identified with modernize-use-using.
Mailgun limits the size of an email payload to 16k. Truncate the issue body, which should be the largest part around 15k and point the user to Github to see the rest. Fixes llvm#165020
…5792) Add C intrinsics for XSfvfexp16e/32e, XSfvfbfexp16e, and XSfvfexpa(64e) introduced in llvm#164349 and llvm#164499 Co-authored-by: Jesse Huang <jesse.huang@sifive.com> Co-authored-by: Craig Topper <craig.topper@sifive.com>
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [EnricoMi/publish-unit-test-result-action](https://redirect.github.com/EnricoMi/publish-unit-test-result-action) | action | minor | `v2.20.0` -> `v2.21.0` | | [actions/upload-artifact](https://redirect.github.com/actions/upload-artifact) | action | patch | `v4.6.0` -> `v4.6.2` | | [docker/login-action](https://redirect.github.com/docker/login-action) | action | minor | `v3.5.0` -> `v3.6.0` | | [github/codeql-action](https://redirect.github.com/github/codeql-action) | action | minor | `v3.30.4` -> `v3.31.2` | | llvm/actions | action | digest | `a1ea791` -> `42d8057` | | [ossf/scorecard-action](https://redirect.github.com/ossf/scorecard-action) | action | patch | `v2.4.2` -> `v2.4.3` | | [python](https://redirect.github.com/actions/python-versions) | uses-with | minor | `3.13` -> `3.14` |
Replace assert with an error and improve the report when unclaimed PC-relative relocation is left in strict mode.
Fix typos in clang release notes
llvm#166197) …arget de…" This reverts commit 47c54d5.
Due to limitations in GISel / IRTranslator, the SPIR-V BE replaces aggregate function args with `i32` placeholders, which are subsequently used to retrieve the original type after IR translation, from metadata. Due to what appears to be an oversight, the current implementation only handles a single mutation, as it does not traverse the metadata, but rather only takes the first operand. This patch addresses that limitation by correctly iterating the metadata.
llvm#165810) For the simplification ``` (C && A) || (!C && B) --> sel C, A, B ``` (and related), if `C` (or (`!C`)) is the condition in the select instruction representing the logical and, we can preserve that logical and's branch weights when emitting the new instruction. Otherwise, the profile data is unknown. If `C` is the condition of both logical ands, then we just take the branch weights of the first logical and (though in practice they should be equal.) Furthermore, `select-safe-transforms.ii` now passes under the profcheck configuration, so we remove it from the failing tests. Tracking issue: llvm#147390
Add a new abstraction layer UnifiedOnDiskCache that adds new functions of disk space management and data validation that builds on top of OnDiskGraphDB and OnDiskKeyValueDB. Build upon UnifiedOnDiskCache, it is OnDiskCAS that implements ObjectStore and ActionCache interface for LLVM tools to interact with CAS storage.
Collaborator
dpalermo
approved these changes
Nov 3, 2025
…s addrspace(0) (llvm#164432)" This reverts commit bf2f577.
Collaborator
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.