Skip to content

Commit 369d6eb

Browse files
gbaraldiclaude
andcommitted
Fix @dispose macro: revert space around = for older LLVM.jl compat
The @dispose macro on older LLVM.jl requires `pb=expr()` without spaces, not `pb = expr()`. The Runic-suggested formatting breaks precompilation. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent f986368 commit 369d6eb

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/gcn.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ function finish_ir!(
6464
# optimize after address space rewriting: propagate addrspace(4) through
6565
# the addrspacecast chains, then clean up newly-exposed opportunities
6666
tm = llvm_machine(job.config.target)
67-
@dispose pb = NewPMPassBuilder() tm begin
67+
@dispose pb=NewPMPassBuilder() tm begin
6868
add!(pb, NewPMFunctionPassManager()) do fpm
6969
add!(fpm, InferAddressSpacesPass())
7070
add!(fpm, SROAPass())
@@ -135,7 +135,7 @@ function add_kernarg_address_spaces!(
135135
# (which expects flat pointers) continues to work. The AMDGPU backend's
136136
# AMDGPULowerKernelArguments traces these casts and produces s_load.
137137
new_args = LLVM.Value[]
138-
@dispose builder = IRBuilder() begin
138+
@dispose builder=IRBuilder() begin
139139
entry_bb = BasicBlock(new_f, "conversion")
140140
position!(builder, entry_bb)
141141

@@ -181,7 +181,7 @@ function add_kernarg_address_spaces!(
181181
LLVM.name!(new_f, fn)
182182

183183
# clean up the extra conversion block
184-
@dispose pb = NewPMPassBuilder() begin
184+
@dispose pb=NewPMPassBuilder() begin
185185
add!(pb, NewPMFunctionPassManager()) do fpm
186186
add!(fpm, SimplifyCFGPass())
187187
end

0 commit comments

Comments
 (0)