C-API for Julia dialect - #62939
Draft
vchuravy wants to merge 2 commits into
Draft
Conversation
vchuravy
force-pushed
the
vc/llvm-dialects-capi
branch
2 times, most recently
from
August 31, 2026 16:58
15a373e to
840dddc
Compare
vchuravy
force-pushed
the
vc/llvm-dialects-capi
branch
from
August 31, 2026 17:52
840dddc to
7fc9139
Compare
vchuravy
force-pushed
the
vc/llvm-dialects-capi
branch
from
August 31, 2026 18:17
7fc9139 to
8ad2842
Compare
vchuravy
force-pushed
the
vc/llvm-dialects-capi
branch
from
August 31, 2026 18:48
8ad2842 to
742e19d
Compare
Expose the Julia dialect to external IR producers (GPUCompiler.jl, Enzyme.jl, and eventually a Julia port of codegen itself) through a C API in libjulia-codegen: JLDialectsAttachContext/JLDialectsDisposeContext to attach the dialect to an LLVMContext, JLBuild* functions that construct each op with the correct name, type, and attributes at an LLVMBuilderRef's insertion point, and JLDialectsVerifyModule to run the llvm-dialects verifier over a module. Assisted-by: Claude Code (Fable 5)
Follow the LLVMVerifyModule conventions in JLDialectsVerifyModule: return 0 on success, and optionally capture the verifier diagnostics into a caller-disposed message instead of printing them to stderr, so wrappers can surface them in exceptions. Add JLDialectsGCAllocBytesSizeType to query the target-dependent integer type of julia.gc_alloc_bytes' size and type-tag arguments. Assisted-by: Claude Code (Fable 5)
vchuravy
force-pushed
the
vc/llvm-dialects-capi
branch
from
August 31, 2026 19:08
742e19d to
53b2018
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Introducing a C-API to be used by LLVM.jl for our Julia dialect
Assisted-by: Claude
Stack created with GitHub Stacks CLI • Give Feedback 💬