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][Builtin] Support __builtin_launder except in the case of -fstrict-vtable-pointers #1138

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

Conversation

ghehg
Copy link
Collaborator

@ghehg ghehg commented Nov 18, 2024

Without using flag -fstrict-vtable-pointers, __builtin_launder is a noop. This PR implements that, and leave implementation for the case of -fstrict-vtable-pointers to future where there is a need.

This PR also adapted most of test cases from OG test case.
I didn't use test cases in the namespace pessimizing_cases, as they have no difference even when -fstrict-vtable-pointers is on.

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 with minor nit

@@ -230,6 +230,7 @@ struct MissingFeatures {
static bool emitEmptyRecordCheck() { return false; }
static bool isPPC_FP128Ty() { return false; }
static bool emitBinaryAtomicPostHasInvert() { return false; }
static bool createLaunderInvariantGroup() { return false; }
Copy link
Member

Choose a reason for hiding this comment

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

We already have createInvariantGroup, should we use that?

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