dcompute: Prepare pointer ABI rewrite for Vulkan support - #5282
Merged
thewilsonator merged 1 commit intoSep 7, 2026
Conversation
gnavdev28
marked this pull request as draft
September 7, 2026 10:53
gnavdev28
force-pushed
the
dcompute-abi-refactor
branch
from
September 7, 2026 10:55
8b2c90e to
c1332be
Compare
gnavdev28
marked this pull request as ready for review
September 7, 2026 10:56
There was a problem hiding this comment.
🟡 Changes recommended
The new wasm-ld direct-linking condition applies to Emscripten as well, which likely breaks expected .js outputs and toolchain behavior, and should be corrected before approval.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Prepares the dcompute/Vulkan path and updates LLVM-compatibility shims (notably for LLVM 24), while extending compute-target identification and ABI-rewrite behavior to support upcoming SPIR-V/Vulkan pointer ABI changes.
Changes:
- Add Vulkan as a dcompute reflection/codegen target (kept in sync between druntime and LDC).
- Add/adjust LLVM version conditionals for LLVM 24 API changes (passes, debug info, alignment, assembler option plumbing, float ABI queries).
- Extend dcompute pointer ABI rewrite to emit SPIR-V pointer-type assignment metadata for Vulkan.
File summaries
| File | Description |
|---|---|
| runtime/druntime/src/ldc/dcompute.d | Adds ReflectTarget.Vulkan to match compiler-side target IDs. |
| gen/passes/Passes.h | Adds LLVM 24 PassInfoMixin compatibility aliasing. |
| gen/irstate.cpp | Adjusts alignment API usage for LLVM 24 (getAlign() vs legacy). |
| gen/dibuilder.cpp | Switches dbg.value emission APIs for LLVM 24 and refactors version-conditional handling. |
| gen/dcompute/target.h | Adds DComputeTarget::ID::Vulkan. |
| gen/dcompute/abi-rewrites.h | Adds Vulkan-specific SPIR-V pointer-type assignment intrinsic call + argument attr adjustments. |
| gen/abi/arm.cpp | Updates hard-float ABI detection for LLVM 24. |
| driver/toobj.cpp | Updates integrated assembler disable query namespace for LLVM 24 (llvm::mc vs llvm::codegen). |
| driver/targetmachine.cpp | Extends compute-target detection to SPIR-V triples; adjusts FloatABI option setting for LLVM 24. |
| driver/linker-gcc.cpp | Updates float-ABI arch naming for LLVM 24 and adds wasm direct-linking path; alters user linker-switch forwarding. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+35
to
+37
| auto ptr = toDcomputePointer(static_cast<TypeStruct *>(dty)->sym); | ||
| llvm::Type *elemTy = DtoType(ptr->type); | ||
| int realAS = gIR->dcomputetarget->mapping[ptr->addrspace]; |
kinke
reviewed
Sep 7, 2026
gnavdev28
force-pushed
the
dcompute-abi-refactor
branch
from
September 7, 2026 11:11
7be1e28 to
d11b841
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.
No description provided.