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] Add initial support for array cookies #1297

Merged
merged 1 commit into from
Jan 29, 2025

Conversation

andykaylor
Copy link
Collaborator

This patch adds the minimal support for array cookies needed to enable ClangIR generation for an array new expression that requires cookies but does not require an explicit initializer.

This only provides the cookie support for the base Itanium CXXABI. Different cookie calculations are required for AppleARM64, which will be added in a subsequent patch.

@bcardosolopes
Copy link
Member

We just went over a rebase against upstream, apologies for the churn but please update your branch for this PR and force-push!

@andykaylor
Copy link
Collaborator Author

The CI is failing because of the recently deprecated interfaces, so I guess this is blocked by #1299.

This patch adds the minimal support for array cookies needed to enable ClangIR
generation for an array new expression that requires cookies but does not
require an explicit initializer.
@andykaylor
Copy link
Collaborator Author

CI is now failing in AArch64 codegen tests, still unrelated to this change.

@bcardosolopes
Copy link
Member

CI is now failing in AArch64 codegen tests, still unrelated to this change.

Rebase churn, will fix that soon!

// (2) The operator new call is missing "noalias noundef nonnull" on
// the call and "noundef" on the argument, (3) The getelementptr is
// missing "inbounds"
Copy link
Member

Choose a reason for hiding this comment

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

Nice, thanks for this! We already have issues tracking each of those, great to see no new ones!

Copy link
Member

@bcardosolopes bcardosolopes left a comment

Choose a reason for hiding this comment

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

LGTM

@bcardosolopes bcardosolopes merged commit 1b45e8c into llvm:main Jan 29, 2025
3 of 6 checks passed
AmrDeveloper pushed a commit to AmrDeveloper/clangir that referenced this pull request Jan 29, 2025
This patch adds the minimal support for array cookies needed to enable
ClangIR generation for an array new expression that requires cookies but
does not require an explicit initializer.

This only provides the cookie support for the base Itanium CXXABI.
Different cookie calculations are required for AppleARM64, which will be
added in a subsequent patch.
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.

2 participants