-
Notifications
You must be signed in to change notification settings - Fork 809
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
[spirv] opphi generation #65
Comments
Generally eliminating a bunch of load/stores ("mem -> reg") is future work. It does make an OpPhi for a do-while loop to handle continue, though that very special case might go away with an upcoming control-flow change to SPIR-V. |
SPIR-V Control flow will significantly change? That's a big thing.
I guess that change is to allow naive and simple transformation software
implementations, without denying ultra complex optimizing transformation
software implementations.
|
No, not significantly. Still the same CFG with the same concept of annotating nested structure on top of it. I shouldn't have made a future-looking statement. The minor point is the current OpPhi generated is pretty special case and might change, and the major point is how/when/should glslang generally generate "in register" form of data flow, which would involve OpPhi in general when control flow is present. I don't have answers right now. |
Update: The recent change (7c1aa10) to handle && and || short circuiting was done using OpPhi, so it is now pretty easy to get OpPhi to show up (use a non-trivial right operand to && or ||). Example pseudo code:
|
Is there a way to make glslang generate some basic spirv using intermediate
object ids which would be used in an opphi instruction (which can use only intermediate object id).
It seems the variable/opstore/opload work around is always used.
The text was updated successfully, but these errors were encountered: