Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CIR][CIRGen][TBAA][NFC] Skeleton for union, enum and bitint #1250

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

PikachuHyA
Copy link
Collaborator

fix #1246

While following the structure of the original code generation, I overlooked the getTypeInfoHelper function, which resulted in unions not being handled appropriately. see #1220 .
In this patch, I have implemented the getTypeInfoHelper function and marked enum and bitint as NYI.

For further details, please refer to the specific commit: llvm/llvm-project@a5986b9#diff-9964470fc240f2670aab82f768ff846ce19ea37a06a47cd7b4599fa3ef92165cL109.

@bcardosolopes bcardosolopes changed the title [CIR][CIRGen][TBAA] Initial TBAA support for union, enum and bitint [CIR][CIRGen][TBAA][NFC] Skeleton for union, enum and bitint Dec 20, 2024
if (!codeGenOpts.PointerTBAA) {
return cir::TBAAScalarAttr::get(mlirContext, types.ConvertType(qty));
}
llvm_unreachable("NYI");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same problems we discussed about llvm_unreachable before is valid for the whole implementation of TBAA, please move to missing features for here, elsewhere and any future work

@bcardosolopes
Copy link
Member

Please make this only change enough to fix #1246, seems to be adding more than necessary for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CIR][CIRGen][TBAA] Struct with Union crashes during CodeGen
2 participants