-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
[WIP] Enable opaque pointers mode in codegen #44334
Closed
Closed
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
pchintalapudi
added
compiler:codegen
Generation of LLVM IR and native code
compiler:llvm
For issues that relate to LLVM
labels
Feb 24, 2022
Comparison of code with and without opaque pointersWithout opaque pointers
With opaque pointers
|
pchintalapudi
force-pushed
the
pc/opaque-pointers
branch
from
March 6, 2022 21:46
c649809
to
82962be
Compare
Keno
added a commit
that referenced
this pull request
Apr 17, 2022
Essentially a rebase of #44334 to current master. I would like to work on some IR canonicalization improvements, but it doesn't make much sense to that without opaque pointers, since canonical forms will change. This bootstraps fine on LLVM master, though there are test failures both with and without this change. I think we'll just have to address those as part of the regular upgrade cycle as usual (though we should probably do LLVM 14 first to catch any 13->14 regressions).
LLVM 14 will not contain opaque pointer patches necessary for Julia to build/run, and enabling opaque pointer mode in LLVM 15 is handled in #45012. |
Keno
added a commit
that referenced
this pull request
Apr 21, 2022
Essentially a rebase of #44334 to current master. I would like to work on some IR canonicalization improvements, but it doesn't make much sense to that without opaque pointers, since canonical forms will change. This bootstraps fine on LLVM master, though there are test failures both with and without this change. I think we'll just have to address those as part of the regular upgrade cycle as usual (though we should probably do LLVM 14 first to catch any 13->14 regressions).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
Opaque pointers are untyped pointers in LLVM IR. By giving up types, they also remove many redundant bitcasts between various pointer types and thus could potentially reduce LLVM optimization time. In addition, some of our optimization passes can benefit from opaque pointers (alloc-opt, remove-addrspaces) as they will only need to insert addrspacecast instructions rather than changing the types of pointers while optimizing.
This PR builds on top of #43827 as that PR defers construction of the global context until after command line options are parsed, which enables us to specify opaque pointers mode in the command line arguments.
Restrictions:
ctxt->enableOpaquePointers();
in codegen.cpp ~ line 8319) and then turn on opaque pointers withJULIA_LLVM_ARGS="--opaque-pointers"
for experimentation purposesMore information on opaque pointers: https://llvm.org/docs/OpaquePointers.html
Make.user to force LLVM 14.0.0-rc version