update implementation for BackwardsStmtGraph and add PostDominanceFinder utility#921
Merged
swissiety merged 1 commit intosoot-oss:developfrom Apr 15, 2024
Merged
Conversation
05c6e67 to
841c653
Compare
BackwardsStmtGraph and add PostDominanceFinder utility
swissiety
reviewed
Apr 15, 2024
Collaborator
swissiety
left a comment
There was a problem hiding this comment.
Thanks for your contribution!
We are trying to introduce only what is really necessary to the API to not run into Soot problems with SootUp - I think adding all those successor/predecessor methods pollutes the API a bit. How about adding a method inside the Post- and DominanceFinder to initialize the predecessors they way they are needed by the respective *DominanceFinder - i think that would be a simpler & cleaner approach :)
sootup.core/src/main/java/sootup/core/graph/BackwardsStmtGraph.java
Outdated
Show resolved
Hide resolved
sootup.core/src/main/java/sootup/core/graph/BackwardsStmtGraph.java
Outdated
Show resolved
Hide resolved
a10d2c8 to
abeafe1
Compare
swissiety
reviewed
Apr 15, 2024
sootup.core/src/main/java/sootup/core/graph/BackwardsStmtGraph.java
Outdated
Show resolved
Hide resolved
sootup.core/src/main/java/sootup/core/graph/DominanceFinder.java
Outdated
Show resolved
Hide resolved
abeafe1 to
3d3ea05
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
update the implementation for
BackwardsStmtGraphinsootup.core.graphbefore in
DominanceFinder.java:after in
DominanceFinder.java:Apply this change , we can create
PostDominaceFinderas a wrapper ofDominanceFinderdirectly through usebackwardStmtGraphas internalbackingGraph. To implement this, I addsuccessors/predecessorsapi inStmtGraphand its subclasses which use block as param instead of dependending on theBasicBlockapi:getPredecessors/getSuccessors.Thank you for considering this update!