Encode type-/layout- vs. region-based alias info separately in LLVM IR #54395
Labels
compiler:codegen
Generation of LLVM IR and native code
compiler:llvm
For issues that relate to LLVM
status:help wanted
Indicates that a maintainer wants help on an issue or pull request
Currently we redundantly encode region information in both
!tbaa
and!alias.scope
metadata for LLVM.We'd like to separate these so that TBAA is only used to encode the layout-/type-based non-aliasing information, and
!alias.scope
is used just for the region-based information.For reference, here's the existing TBAA hierarchy:
julia/src/codegen.cpp
Lines 351 to 375 in 5f7bfc0
The first step is probably to (1) re-factor the code to stop using
::fromTBAA
. Instead, the region information should be passed around as a separate piece of aliasing-related information. Most likely that means creating ajl_aliasinfo_t
much earlier, and updatingjl_cgval_t
to carry it instead of just TBAA metadata. Then, (2) removetbaa_gcframe
,tbaa_stack
,tbaa_const
, andtbaa_data
from the TBAA hierarchy.Afterwards, an excellent follow-up will be to expand the TBAA hierarchy to encode a much broader set of types into it, including ideally user-defined structs.
The text was updated successfully, but these errors were encountered: