Skip to content
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

Provide a way to obtain the incoming stack height of a given ControlFlowNode #109

Open
zsr2531 opened this issue May 22, 2021 · 2 comments
Labels
control-flow Issue related to the control flow analysis modules of Echo. data-flow Issue related to the data flow analysis modules of Echo. enhancement New feature or request

Comments

@zsr2531
Copy link
Collaborator

zsr2531 commented May 22, 2021

Summary:
Currently, Echo just throws away this information during the graph construction. It may be useful in some scenarios.

Suggestion:
A property would be ideal for this, the question is where to put the property. In ControlFlowNode or DataFlowNode?

@zsr2531 zsr2531 added enhancement New feature or request control-flow Issue related to the control flow analysis modules of Echo. data-flow Issue related to the data flow analysis modules of Echo. labels May 22, 2021
@zsr2531 zsr2531 changed the title Provide a way to obtain the incoming stack height of a given node Provide a way to obtain the incoming stack height of a given ControlFlowNode May 22, 2021
@Washi1337
Copy link
Owner

The ControlFlowGraph model does not (and is not meant to) store information about stack heights or other types of data flow analysis. This is the job of a DataFlowGraph instead. A better place therefore to add this would be DataFlowNode. This way, the incoming stack height of a ControlFlowNode could be determined by getting the DataFlowNode associated to the block header instruction of the control flow node, and obtaining the absolute value from there.

@zsr2531
Copy link
Collaborator Author

zsr2531 commented May 23, 2021

Also, while we're at it... maybe adding additional information like the stack delta of a block is maybe information worth adding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
control-flow Issue related to the control flow analysis modules of Echo. data-flow Issue related to the data flow analysis modules of Echo. enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants