-
Notifications
You must be signed in to change notification settings - Fork 64
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
How does loops work? How does Gigahorse translate loops? #137
Comments
Hi, have you been able to analyze this program using gigahorse? You can find our loop related logic in clientlib/loops.dl and clientlib/loops_semantics.dl. Our main relation is this one, denoting that a basic block
Hope I was able to help, let me know if you have more questions. |
Thanks, I was going over those files and the one on dominance as well. The doubt I have is that in case of loops, in the loop header block, there will be two sets of variables that come in (i.e. two stacks of registers I guess), one from the previous block and other via a back edge. How does the tool merge them (definitions)? I can see PHI instructions in the IR, but is it guaranteed that the number of variables in both the stacks will remain the same? |
Hi, I'm not exactly sure what the question is but I think I got it. File
Essentially because of PHIs in our IR are introduced at every block that accesses them (instead of placing them at dominance frontier), so we identify well formed induction variables by the |
I am not able to understand the translation of a loop function to the IR generated by Gigahorse.
I have a solidity function that looks like the example shown below.
Example:
a
, the loop variable, stored in the register or in memory using MSTORE/MLOAD constructs?Any clarification in this direction will be really helpful.
The text was updated successfully, but these errors were encountered: