-
-
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
code_* cleanup, and strip IR metadata from code_llvm output #10747
Conversation
47f55f0
to
17e8b2a
Compare
Now removes these lines as well:
Also added a helper function It would be nice to have a way to go all the way back to the original Julia method signature from one of these mangled names, but I don't think we store that mapping anywhere. |
Thanks @ihnorton. I can't quite tell if the windows failure is related or not, but otherwise, LGTM. This is a much needed cleanup. |
Definitely related. The added include |
Thanks. Should be fixed now, will let appveyor run through. I am on windows, but using llvm-3.6 and forgot to remove a line that is incompatible with 3.3. |
Also added this notice to the output of
|
I don't think the notice is necessary – it should suffice to put this in the documentation of |
This certainly shouldn't hold up this PR, but is it possible to turn the debug metadata into line numbers? Right now we get them in |
Good point -- that would be a much more useful thing to do with the data before throwing it away. I'll have to get a bit more familiar with how the debug locations work, but will see what I can do (there is enough information in the system to eventually make the DWARF annotations, so it must be possible). |
Remove intermediate function, now pick the action and call directly from the Julia side with a pointer to the LLVM::Function.
This makes IR output easier to use with external tools.
Useful with the _ir and _asm dump functions to trace through a call path without figuring out all of the necessary Julia signatures.
8d596d3
to
d593ac7
Compare
code_* cleanup, and strip IR metadata from code_llvm output
@ihnorton Is it possible to show just the TBAA metadata? I'm finding that I miss it. I know I can get it with |
@simonster this will preserve TBAA
|
(replaces #10741 ... because github)
The first commit cleans up the
code_native
andcode_llvm
pathways a little bit by removing an intermediate function and calling the one we want directly from Julia code.The second commit changes the behavior of
code_llvm
to strip all metadata before printing the IR. This reduces the work needed to runcode_llvm
output withlli
for debugging purposes. I also added acode_llvm_raw
version with the current behavior. If people don't think stripped should be the default I'll switch it around.Should now compile against gcc 4.6.
before:
after: