Make sure global constants are recognized as such in our own pass #36970
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.
The metadata on the load may be striped by LLVM when moving code around.
Example of passes that does this is LICM, which is actually already doing a better job then some of the other places.
This is a bit of a hack, but AFAICT, it is NOT an LLVM bug to remove tbaa and other metadata here, since in general, these metadata might be guarded by some other checks. (Maybe there could be an exception made for constant tbaa metadata here though). Almost all of our metadata are based on static type info and is legal to keep when moving code around but I don't see a way to convince LLVM about it. If there is a way that'll be a better fix though the current one should be pretty cheap.
Reduce
.text
in the sysimg by ~2%, which sounds like quite a few gc frame stores and write barriers....