-
Notifications
You must be signed in to change notification settings - Fork 175
[CIR][CodeGen] Store the old CIRGenFunction when popping to a new one #1023
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][CodeGen] Store the old CIRGenFunction when popping to a new one #1023
Conversation
Created using spr 1.3.5 [skip ci]
Created using spr 1.3.5
|
Is there any way to write a test case for this, and should it use |
Not yet, I'm trying to hoist out a bunch of code from a 1000 line patch for static local variables that needs heavily refactored... hence all this string of PRs. But this occurs during non-trivial static locals here for something like this: which we'll emit (before LoweringPrepare) as something like
Yes, couldn't remember the name of this mechanism and just did it manually. Thanks! |
Created using spr 1.3.5 [skip ci]
Created using spr 1.3.5
Got it, LGTM then. Not related to this patch, but shouldn't the |
Created using spr 1.3.5 [skip ci]
We diverge from CodeGen here by delaying the function emission that happens for a global variable. However, due to situations where a global can be emitted while building out a function the old CGF might not be invalid. So we need to store it here just in case. Reviewers: bcardosolopes, smeenai Reviewed By: smeenai Pull Request: #1023
We diverge from CodeGen here by delaying the function emission that happens for a global variable. However, due to situations where a global can be emitted while building out a function the old CGF might not be invalid. So we need to store it here just in case. Reviewers: bcardosolopes, smeenai Reviewed By: smeenai Pull Request: #1023
We diverge from CodeGen here by delaying the function emission that happens for a global variable. However, due to situations where a global can be emitted while building out a function the old CGF might not be invalid. So we need to store it here just in case. Reviewers: bcardosolopes, smeenai Reviewed By: smeenai Pull Request: llvm/clangir#1023
We diverge from CodeGen here by delaying the function emission that
happens for a global variable. However, due to situations where a global
can be emitted while building out a function the old CGF might not be
invalid. So we need to store it here just in case.