-
Notifications
You must be signed in to change notification settings - Fork 108
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
Emit LLVM lifetime intrinsics #1129
Comments
Yes, I'm not sure we have issues tracking this already, but we need to emit lifetime intrinsics, good thing is that we can do that as we unwrap scopes. |
I'm interested in taking a crack at this one, I will likely need some help getting started. I'll keep my updates on this issue. |
Current plan is to create an op ( |
@Sir-NoChill sounds good, keep in mind we need one for |
Should these instructions also be associated in some way with the temporary they refer to? Or is it implicit that they are associated with the next instruction? |
As you add the tentative |
For
Compile it with
-fclangir -O3 -emit-cir
, we got:This is good. We explicitly marked the scope for the temporary. However, when we lower it to LLVM, we lost the lifetime informations:
In the contrary, the emitted LLVM without clangir is:
where we can see the lifetime markers pretty clearly. The lifetime markers are pretty important for optimizations in the middle end.
We need to do this especially we've already marked the scope clearly.
The text was updated successfully, but these errors were encountered: