forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 333
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
Pointer TBAA Improvements #9811
Open
fhahn
wants to merge
15
commits into
swiftlang:stable/20240723
Choose a base branch
from
fhahn:pick-pointer-tbaa
base: stable/20240723
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains 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
@swift-ci please test |
@swift-ci please test llvm |
@swift-ci please test |
Precommit tests for follow-up improvements to Clang's TBAA emission. Also add variants with -pointer-tbaa to tbaa-reference.cpp. (cherry picked from commit df3f291)
…0569) Extend the logic added in 123c036 (llvm#76612) to support pointers to non-builtin types by using the mangled name of the canonical type. PR: llvm#110569 (cherry picked from commit 4334f31)
Currently we generate incorrect metadata not considering compatible types in C. (cherry picked from commit c4eeef3)
Be conservative if the type isn't a record type. Handling other types may require stripping const-qualifiers inside the type, e.g. MemberPointerType. Also look through array types same as through pointer types, to not pessimize arrays of pointers. Without this, we assign different tags to the accesses for p an q in the second test in cwg158. PR: llvm#116991 (cherry picked from commit decb874)
…16596) For unnamed structs or unions, C's compatible types rule applies. Two compatible types in different compilation units can have different mangled names, meaning the metadata emitted below would incorrectly mark them as no-alias. Use AnyPtr for such types in both C and C++, as C and C++ types may be visible when doing LTO. PR: llvm#116596 (cherry picked from commit 41a0c66)
(cherry picked from commit a41ae90)
…#116382) When sinking a store, preserve common metadata present on stores on both sides of the diamond. PR: llvm#116382 (cherry picked from commit 3734e4c)
Test cases for llvm#115595. (cherry picked from commit 1aff96b)
Add variant with different metadata on all loads, for llvm#115868 (cherry picked from commit 9e0ea8c)
…vm#115868) Preserve llvm.access.group metadata on the replacement instruction, if it does not move. In that case, the program would be UB, if the parallel property encoded in the metadata does not hold. This matches the LangRef recently updated in llvm#116220 PR llvm#115868 (cherry picked from commit 0765136)
Preserve tbaa metadata on the replacement instruction, if it does not move. In that case, the program would be UB, if the aliasing property encoded in the metadata does not hold. This makes use of the clarification re tbaa metadata implying UB if the property does not hold: llvm#116220 Same as llvm#115868, but for !tbaa PR: llvm#116682 (cherry picked from commit 0bb1b68)
…ves (llvm#117716) Preserve !alias.scope, !noalias and !mem.parallel_loop_access metadata on the replacement instruction, if it does not move. In that case, the program would be UB, if the aliasing property encoded in the metadata does not hold. This makes use of the clarification re aliasing metadata implying UB if the property does not hold: llvm#116220 Same as llvm#115868, but for !alias.scope, !noalias and !mem.parallel_loop_access. PR: llvm#117716 (cherry picked from commit 46a0857)
fhahn
force-pushed
the
pick-pointer-tbaa
branch
from
January 9, 2025 22:28
b76a948
to
0f3de86
Compare
@swift-ci please smoke test |
@swift-ci please smoke test macOS |
@swift-ci Please smoke test macOS platform |
@swift-ci please test |
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.