-
Notifications
You must be signed in to change notification settings - Fork 440
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
add simplify ICFG #1386
add simplify ICFG #1386
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1386 +/- ##
==========================================
+ Coverage 67.74% 67.83% +0.08%
==========================================
Files 249 250 +1
Lines 27561 27632 +71
==========================================
+ Hits 18672 18743 +71
Misses 8889 8889
|
svf/include/AE/Svfexe/ICFGSimplify.h
Outdated
@@ -251,6 +258,7 @@ static void simplify(ICFG* _icfg) | |||
edge->getSrcNode()->removeOutgoingEdge(edge); | |||
} | |||
} | |||
_icfg->dump("cICFG"); |
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.
put this under option "-dump-icfg" and change "cICFG" => "ICFG.simplified"
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.
why using static method for void simplify(ICFG* _icfg)?
#include <exception> | ||
#include <string> | ||
#include "AE/Core/ICFGWTO.h" | ||
#include "AE/Svfexe/ICFGSimplification.h" |
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.
remove this header?
@@ -27,15 +27,13 @@ | |||
// | |||
// Created by Jiawei Wang on 2024/1/10. | |||
// | |||
#include <exception> | |||
#include <string> | |||
#include "AE/Core/ICFGWTO.h" |
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.
could we put this header and these two #include "Util/WorkList.h" #include "WPA/Andersen.h" into cpp if their methods are not explicitly used in this header?
svf-llvm/tools/AE/ae.cpp
Outdated
pag->getICFG()->updateCallGraph(callgraph); | ||
if (Options::SimplifyICFG()) { | ||
ICFGSimplification::simplify(pag->getICFG()); | ||
if (Options::DumpSimplifiedICFG()) |
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.
we can remove this option and use -dump-icfg as the name of the output icfg.simplify.dot is different from original icfg.dot
svf/include/Graphs/ICFG.h
Outdated
} | ||
|
||
virtual void addRepNode(const ICFGNode* key, const ICFGNode* value) { | ||
_repNode[key] = value; | ||
void addRepNode(const ICFGNode* rep, const ICFGNode* sub) { |
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.
addRepNode =>updateRepNode
|
||
virtual ~ICFGSimplification() = default; | ||
|
||
static void mergeAdjacentNodes(ICFG* icfg) |
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.
move this implementation to cpp
svf/include/Graphs/ICFG.h
Outdated
@@ -148,27 +152,27 @@ class ICFG : public GenericICFGTy | |||
} | |||
|
|||
protected: | |||
/// Remove a SVFG edge | |||
/// Add control-flow edges for top level pointers |
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.
Change this comment to:
Add intraprocedural and interprocedural control-flow edges.
No description provided.