Skip to content

[LLVMAllocOpt] Preserve metadata lowering an alloca#60695

Merged
wsmoses merged 1 commit intomasterfrom
wm/pmd
Jan 15, 2026
Merged

[LLVMAllocOpt] Preserve metadata lowering an alloca#60695
wsmoses merged 1 commit intomasterfrom
wm/pmd

Conversation

@wsmoses
Copy link
Copy Markdown
Member

@wsmoses wsmoses commented Jan 15, 2026

No description provided.

@wsmoses wsmoses added backport 1.10 Change should be backported to the 1.10 release backport 1.11 Change should be backported to release-1.11 backport 1.12 Change should be backported to release-1.12 labels Jan 15, 2026
@oscardssmith oscardssmith added the compiler:codegen Generation of LLVM IR and native code label Jan 15, 2026
@oscardssmith
Copy link
Copy Markdown
Member

This isn't really a bugfix, right? I can see the argument for backporting to 1.12 (since that's the current release and when Array became alloc-opt eligible), but it's unclear to me why we would backport further.

Is this expected to yield a performance improvement?

@wsmoses
Copy link
Copy Markdown
Member Author

wsmoses commented Jan 15, 2026

so this is a bugfix since dropping metadata can cause issues (both performance and otherwise). Julia, for example already uses tbaa extensively to describe loads being invariant within a module. Admittedly this is less important for alloca than load/store's, but still an issue.

@oscardssmith oscardssmith added the bugfix This change fixes an existing bug label Jan 15, 2026
@gbaraldi
Copy link
Copy Markdown
Member

gbaraldi commented Jan 15, 2026

This is probably not legal. The metadata says it's a heap object when at this point it no longer is one. Also it's an alloca it's probably quite easy to see that it doesn't alias other things most of the time
This doesn't actually copy any of the metadata I thought it would (turns out gc alloc doesn't really have much metadata)
LGTM

@wsmoses wsmoses merged commit d875df4 into master Jan 15, 2026
12 of 14 checks passed
@wsmoses wsmoses deleted the wm/pmd branch January 15, 2026 14:27
DilumAluthge pushed a commit that referenced this pull request Jan 21, 2026
wsmoses added a commit that referenced this pull request Jan 23, 2026
wsmoses added a commit that referenced this pull request Jan 23, 2026
Backport of #60695 particularly
Specifically cherry-picking d875df4
DilumAluthge pushed a commit that referenced this pull request Jan 23, 2026
DilumAluthge pushed a commit that referenced this pull request Jan 29, 2026
This was referenced Feb 20, 2026
christiangnrd added a commit to JuliaGPU/GPUCompiler.jl that referenced this pull request Feb 25, 2026
christiangnrd added a commit to JuliaGPU/GPUCompiler.jl that referenced this pull request Feb 26, 2026
* Fix SPIRV tests after 1.12.5

Potentially related to JuliaLang/julia#60695

* Fix precompile tests

* Formatting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport 1.10 Change should be backported to the 1.10 release backport 1.11 Change should be backported to release-1.11 backport 1.12 Change should be backported to release-1.12 bugfix This change fixes an existing bug compiler:codegen Generation of LLVM IR and native code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants