Skip to content

[CIR][CIRGen] Implement CIRGenModule::shouldEmitFunction #984

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

Merged
merged 1 commit into from
Oct 16, 2024

Conversation

smeenai
Copy link
Collaborator

@smeenai smeenai commented Oct 16, 2024

This is the usual copy-paste-modify from CodeGen, though I changed all
the variable names to conform to our new style. All these functions
should be pulled out as common helpers when we're upstream.

This is the usual copy-paste-modify from CodeGen, though I changed all
the variable names to conform to our new style. All these functions
should be pulled out as common helpers when we're upstream.
return true;
namespace {
// TODO(cir): This should be a common helper shared with CodeGen.
struct FunctionIsDirectlyRecursive
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

// decl that, because of the asm attribute or the other decl being a builtin,
// ends up pointing to itself.
// TODO(cir): This should be a common helper shared with CodeGen.
bool CIRGenModule::isTriviallyRecursive(const FunctionDecl *func) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

}

// TODO(cir): This should be a common helper shared with CodeGen.
bool CIRGenModule::shouldEmitFunction(GlobalDecl globalDecl) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

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.

Awesome

@bcardosolopes bcardosolopes merged commit 5438234 into llvm:main Oct 16, 2024
7 checks passed
keryell pushed a commit to keryell/clangir that referenced this pull request Oct 19, 2024
This is the usual copy-paste-modify from CodeGen, though I changed all
the variable names to conform to our new style. All these functions
should be pulled out as common helpers when we're upstream.
lanza pushed a commit that referenced this pull request Nov 5, 2024
This is the usual copy-paste-modify from CodeGen, though I changed all
the variable names to conform to our new style. All these functions
should be pulled out as common helpers when we're upstream.
lanza pushed a commit that referenced this pull request Mar 18, 2025
This is the usual copy-paste-modify from CodeGen, though I changed all
the variable names to conform to our new style. All these functions
should be pulled out as common helpers when we're upstream.
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