Skip to content
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

Get Anvill building with LLVM 15 #330

Merged
merged 13 commits into from
Nov 18, 2022
Merged

Get Anvill building with LLVM 15 #330

merged 13 commits into from
Nov 18, 2022

Conversation

tetsuo-cpp
Copy link
Contributor

@tetsuo-cpp tetsuo-cpp commented Oct 4, 2022

The main change that might be unexpected here is the removal of the ConvertIntegerToPointerOperations pass.

We have an open issue (#303) to convert that pass to use opaque pointers and remove calls to PointerType::getElementType. With the introduction of LLVM 15, these calls have been removed entirely (they were deprecated in LLVM 14). So this pass no longer compiles.

Instead of fiddling around with the preprocessor to only compile this pass with LLVM 14, I figured it'd be best to just remove it since it's not even being added to the pass manager right now.

@tetsuo-cpp
Copy link
Contributor Author

Ok, the only remaining problem here is that the IR under tests/anvill_passes/data contain typed pointers and are incompatible with LLVM 15. So I'll need to find some way to regenerate these.

@pgoodman Do you know where these IR files came from?

@tetsuo-cpp tetsuo-cpp requested a review from pgoodman October 31, 2022 08:19
@pgoodman
Copy link
Contributor

@tetsuo-cpp I think someone uses anvill to make them in the past, then just uploaded those files raw :-/

@tetsuo-cpp
Copy link
Contributor Author

@tetsuo-cpp I think someone uses anvill to make them in the past, then just uploaded those files raw :-/

Yeah they're definitely generated by Anvill. But I was hoping that the executable sources (that got built with Clang and then lifted back to IR with Anvill) would exist somewhere.

Looks like maybe I'll just have to eyeball the IR to figure out what it's testing and see if I can replace them. I'll probably check in the new sources this time so we don't have the same problem again.

@tetsuo-cpp
Copy link
Contributor Author

tetsuo-cpp commented Nov 18, 2022

@2over12 pointed out that I can regenerate the .ll files with LLVM's opt like so:

$ opt --opaque-pointers ./anvill_passes/data/BaseFunctionPass.ll -S -o Test.ll

So I've gone ahead and done that. Unit tests seem to be passing so I think this is good to go.

@tetsuo-cpp tetsuo-cpp merged commit 1b2b4c4 into master Nov 18, 2022
@pgoodman pgoodman deleted the alex/llvm-15 branch November 18, 2022 05:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants