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

Refactor pta #1552

Merged
merged 8 commits into from
Sep 20, 2024
Merged

Refactor pta #1552

merged 8 commits into from
Sep 20, 2024

Conversation

JoelYYoung
Copy link
Contributor

Move updateCallGraph etc. to AndersenBase

Copy link

codecov bot commented Sep 19, 2024

Codecov Report

Attention: Patch coverage is 90.59829% with 11 lines in your changes missing coverage. Please review.

Project coverage is 62.88%. Comparing base (03c9c37) to head (ee956ea).
Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
svf/include/WPA/Steensgaard.h 0.00% 6 Missing ⚠️
svf/lib/WPA/Andersen.cpp 96.29% 3 Missing ⚠️
svf/include/WPA/TypeAnalysis.h 0.00% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1552      +/-   ##
==========================================
+ Coverage   62.67%   62.88%   +0.21%     
==========================================
  Files         245      245              
  Lines       25707    25687      -20     
  Branches     4502     4491      -11     
==========================================
+ Hits        16111    16153      +42     
+ Misses       9596     9534      -62     
Files with missing lines Coverage Δ
svf-llvm/lib/SVFIRExtAPI.cpp 84.74% <100.00%> (ø)
svf/include/Graphs/ThreadCallGraph.h 52.00% <ø> (ø)
svf/include/MemoryModel/PointerAnalysis.h 78.43% <ø> (ø)
svf/include/MemoryModel/PointerAnalysisImpl.h 58.99% <ø> (ø)
svf/include/Util/SVFUtil.h 90.56% <ø> (ø)
svf/include/Util/ThreadAPI.h 100.00% <ø> (ø)
svf/include/WPA/Andersen.h 92.59% <ø> (+3.30%) ⬆️
svf/lib/Graphs/ThreadCallGraph.cpp 67.21% <100.00%> (+1.11%) ⬆️
svf/lib/MemoryModel/PointerAnalysisImpl.cpp 78.66% <100.00%> (+1.12%) ⬆️
svf/lib/Util/ThreadAPI.cpp 21.96% <100.00%> (+4.36%) ⬆️
... and 4 more

* callsites is candidate indirect callsites need to be analyzed based on points-to results
* newEdges is the new indirect call edges discovered
*/
void AndersenBase::onTheFlyThreadCallGraphSolve(const CallSiteToFunPtrMap& callsites,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we move this to PointerAnalysis?

@@ -407,6 +416,8 @@ class ThreadCallGraph: public CallGraph
CallInstToForkEdgesMap callinstToThreadForkEdgesMap; ///< Map a call instruction to its corresponding fork edges
CallInstToJoinEdgesMap callinstToThreadJoinEdgesMap; ///< Map a call instruction to its corresponding join edges
CallInstToParForEdgesMap callinstToHareParForEdgesMap; ///< Map a call instruction to its corresponding hare_parallel_for edges

CallEdgeMap indirectForkMap; ///< Indirect call map
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need this? or we could use existing maps?

@@ -250,6 +251,14 @@ class ThreadCallGraph: public CallGraph
}
//@}

/// Get callees from an indirect callsite
///@{
inline CallEdgeMap& getIndForkMap()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this map.

@yuleisui yuleisui merged commit 1f3c40d into SVF-tools:master Sep 20, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants