Skip to content

Remove unnecessary calls to Crystal::CodeGenVisitor#union_type_and_value_pointer#15491

Merged
straight-shoota merged 1 commit intocrystal-lang:masterfrom
HertzDevil:refactor/union_type_and_value_pointer
Feb 21, 2025
Merged

Remove unnecessary calls to Crystal::CodeGenVisitor#union_type_and_value_pointer#15491
straight-shoota merged 1 commit intocrystal-lang:masterfrom
HertzDevil:refactor/union_type_and_value_pointer

Conversation

@HertzDevil
Copy link
Contributor

#union_type_and_value_pointer always emits a pair of getelementptr LLVM instructions, even when the caller is not interested in the pointer to a mixed union value's type ID or data. This PR eliminates those redundant getelementptrs.

@straight-shoota straight-shoota added this to the 1.16.0 milestone Feb 20, 2025
@straight-shoota straight-shoota merged commit debc74a into crystal-lang:master Feb 21, 2025
34 checks passed
@HertzDevil HertzDevil deleted the refactor/union_type_and_value_pointer branch February 23, 2025 05:10
kojix2 pushed a commit to kojix2/crystal that referenced this pull request Feb 23, 2025
…alue_pointer` (crystal-lang#15491)

`#union_type_and_value_pointer` always emits a pair of `getelementptr` LLVM instructions, even when the caller is not interested in the pointer to a mixed union value's type ID or data. This PR eliminates those redundant `getelementptr`s.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants