Closed shenjunjiekoda closed 2 months ago
Attention: Patch coverage is 84.21053%
with 12 lines
in your changes are missing coverage. Please review.
Project coverage is 70.11%. Comparing base (
0ff4b1c
) to head (26e2b35
). Report is 11 commits behind head on develop.:exclamation: Current head 26e2b35 differs from pull request most recent head c40e877. Consider uploading reports for the commit c40e877 to get more accurate results
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Summary
Implement RPO Traversal to Enhance CFG Analysis in Soot
Details
This PR addresses the specific issue raised in the Issue #923 concerning the potential problems due to the lack of Reverse Post-Order (RPO) traversal in the dominance analysis.
The proposed changes introduce an RPO traversal algorithm, which is integrated into the existing
ForwardStmtGraph
andBackwardStmtGraph
via thegetBlocksSorted
interface. Additionally, the changes apply RPO in theDominanceFinder
to enhance the accuracy and performance of dominator calculations.Key changes include:
sootup/core/graph/ReversePostOrderBlockTraversal.java
and create RPO one as a wrapper of PO.ForwardStmtGraph
andBackwardStmtGraph
.DominanceFinder
to ensure the correctness of dominator tree generation.DominanceFinder
(the head node should not have an immediate dominator). This was addressed by removing the@Nonnull
annotation fromgetImmediateDominator
and allowing a return value of null when the input is the head node.DominatorFinder
,PostDominatorFinder
,PostOrderBlockTraversal
,ReversePostOrderBlockTraversal
to verify the fixes.Thank you for reviewing this pull request and considering this update!