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

add LLVM.jl-like context state handling. #17

Merged
merged 4 commits into from
Oct 2, 2023

Conversation

jumerckx
Copy link
Collaborator

re: #11
The conversion to different style of context handling hasn't yet been pulled through completely.

  • functions in Pass.jl have not yet been properly adapted.
  • I might've been a bit too enthousiastic with removing contexts: MModule and PassManager might still need to keep theirs?
  • The way code_mlir in brutus.jl now uses context might need a closer look.

@jumerckx jumerckx mentioned this pull request Aug 13, 2023
@Pangoraw
Copy link
Collaborator

Thanks for the PR!

MModule and PassManager might still need to keep theirs?

I added context as a field to MModule and PassManager so that the context is not GCed when only keeping a reference to the module/pass manager but this does not seem needed with your method.

@jumerckx
Copy link
Collaborator Author

I've found a few places where I'd forgotten to remove the context argument. Since I haven't tested all functions, it's possible I might've overlooked a few additional spots but I think this is about ready for review and merging for now if this context handling is wanted?

@jumerckx jumerckx marked this pull request as ready for review September 29, 2023 13:21
@vchuravy vchuravy deleted the branch JuliaLLVM:main September 29, 2023 13:39
@vchuravy vchuravy closed this Sep 29, 2023
@vchuravy
Copy link
Collaborator

Argh silly github.

@vchuravy vchuravy reopened this Sep 29, 2023
@vchuravy vchuravy changed the base branch from pb/ir_api to main September 29, 2023 13:41
@vchuravy
Copy link
Collaborator

Can you rebase?

jumerckx and others added 3 commits September 29, 2023 16:15
* functions in Pass.jl have not yet been properly adapted.
* I might've been a bit too enthousiastic with removing contexts: MModule and PassManager might still need to keep theirs.
* The way code_mlir in brutus.jl now uses context might need a closer look.
@jumerckx jumerckx force-pushed the jm/llvm_style_context branch from 408ca33 to ffe0454 Compare September 29, 2023 14:16
@jumerckx jumerckx mentioned this pull request Sep 29, 2023
@codecov-commenter
Copy link

Codecov Report

Attention: 87 lines in your changes are missing coverage. Please review.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Files Coverage Δ
src/MLIR.jl 87.50% <100.00%> (+1.78%) ⬆️
src/Dialects.jl 76.92% <72.72%> (ø)
src/IR/state.jl 47.36% <47.36%> (ø)
src/IR/Pass.jl 26.25% <9.09%> (ø)
src/IR/IR.jl 34.28% <38.88%> (-0.51%) ⬇️

📢 Thoughts on this report? Let us know!.

@vchuravy vchuravy merged commit d239921 into JuliaLLVM:main Oct 2, 2023
2 of 3 checks passed
@jumerckx jumerckx deleted the jm/llvm_style_context branch May 20, 2024 09:55
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.

4 participants