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

Ae convert CFBBG to ICFG #1384

Merged
merged 9 commits into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
covert AE from CFBB to ICFGWTO
  • Loading branch information
bjjwwang committed Feb 22, 2024
commit 1f09ca6a0de3983c83a888c87e1d35e5c5f88eea
3 changes: 0 additions & 3 deletions svf-llvm/tools/AE-ICFG/CMakeLists.txt

This file was deleted.

84 changes: 0 additions & 84 deletions svf-llvm/tools/AE-ICFG/ae_icfg.cpp

This file was deleted.

1 change: 0 additions & 1 deletion svf-llvm/tools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ add_subdirectory(MTA)
add_subdirectory(CFL)
add_subdirectory(LLVM2SVF)
add_subdirectory(AE)
add_subdirectory(AE-ICFG)

set_target_properties(
cfl dvf svf-ex llvm2svf mta saber wpa ae
Expand Down
24 changes: 11 additions & 13 deletions svf/include/AE/Svfexe/AbstractExecution.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
#include "AE/Svfexe/SVFIR2ItvExeState.h"
#include "Util/WorkList.h"
#include "MSSA/SVFGBuilder.h"
#include "AE/Core/CFBasicBlockGWTO.h"
#include "AE/Core/ICFGWTO.h"
#include "WPA/Andersen.h"
#include "Util/SVFBugReport.h"

Expand Down Expand Up @@ -122,7 +122,6 @@ class AbstractExecution

virtual void runOnModule(SVFIR* svfModule);


/// Destructor
virtual ~AbstractExecution();

Expand Down Expand Up @@ -152,7 +151,7 @@ class AbstractExecution
* @param block The basic block to analyse
* @return if this block has preceding execution state
*/
bool hasInEdgesES(const CFBasicBlockNode *block);
bool hasInEdgesES(const ICFGNode *block);

/**
* Check if execution state exist at the branch edge
Expand All @@ -167,7 +166,7 @@ class AbstractExecution
*
* @param block basic block that has a series of instructions
*/
void handleBlock(const CFBasicBlockNode *block);
void handleWTONode(const ICFGNode* node);

/**
* handle one instruction in svf basic blocks
Expand All @@ -188,7 +187,7 @@ class AbstractExecution
*
* @param cycle WTOCycle which has weak topo order of basic blocks and nested cycles
*/
virtual void handleCycle(const CFBasicBlockGWTOCycle *cycle);
virtual void handleCycle(const ICFGWTOCycle *cycle);

/**
* handle user defined function, ext function is not included.
Expand Down Expand Up @@ -252,7 +251,7 @@ class AbstractExecution
std::vector<const CallICFGNode*> _callSiteStack;
Map<const ICFGNode *, std::string> _nodeToBugInfo;
AndersenWaveDiff *_ander;
Map<const SVFFunction*, CFBasicBlockGWTO *> _funcToWTO;
Map<const SVFFunction*, ICFGWTO *> _funcToWTO;
Set<const SVFFunction*> _recursiveFuns;

private:
Expand All @@ -267,17 +266,16 @@ class AbstractExecution
virtual void indirectCallFunPass(const CallICFGNode* callNode);

// helper functions in hasInEdgesES
bool isFunEntry(const CFBasicBlockNode* block);
bool isGlobalEntry(const CFBasicBlockNode* block);
bool isFunEntry(const ICFGNode* block);
bool isGlobalEntry(const ICFGNode* block);

// helper functions in handleCycle
bool widenFixpointPass(const CFBasicBlockNode* cycle_head, IntervalExeState& pre_es);
bool narrowFixpointPass(const CFBasicBlockNode* cycle_head, IntervalExeState& pre_es);
bool widenFixpointPass(const ICFGNode* cycle_head, IntervalExeState& pre_es);
bool narrowFixpointPass(const ICFGNode* cycle_head, IntervalExeState& pre_es);

// private data
CFBasicBlockGraph* _CFBlockG;
Map<const CFBasicBlockNode*, IntervalExeState> _preES;
Map<const CFBasicBlockNode*, IntervalExeState> _postES;
Map<const ICFGNode*, IntervalExeState> _preES;
Map<const ICFGNode*, IntervalExeState> _postES;
std::string _moduleName;

};
Expand Down
Loading