-
Notifications
You must be signed in to change notification settings - Fork 962
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
Remove more than half the stack usage of CFG traversal #492
Conversation
Sorry, missed staging a hunk on the reverse one, one minute |
e63c341
to
4dd9bea
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are completely right -- the functions do not need to be recursive. I have included just a minor suggestion to update the descriptions of the two modified functions. Otherwise, LGTM 👍
Sorry, i'll fix. |
4dd9bea
to
c959955
Compare
I updated the comment. Note that they are still recursive, as traverseNodeSuccessors will recurse back into calling us. The traversal of CFG nodes as implemented is quite weird in actual practice. I rewrote it in a followup, i'll include more details there. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! 👍
That AppVeyor build failure is due to a timeout and has nothing to do with this PR. We will have to figure what to do with it. |
A lot of recursive stack space is used walking the statements in order, which is not necessary.