-
Notifications
You must be signed in to change notification settings - Fork 439
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 SVFBasicBlock. BasicBlockEdge, Graph #1639
Changes from 9 commits
624fc5f
bb53f4c
e4c7163
879bc0d
342f37a
2dd6775
d97854b
66508f7
3776a6a
7d63f80
82f79c9
8727fd1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -586,8 +586,7 @@ Set<const Value *> &ObjTypeInference::bwfindAllocOfVar(const Value *var) | |
if (!callee->isDeclaration()) | ||
{ | ||
const SVFFunction *svfFunc = LLVMModuleSet::getLLVMModuleSet()->getSVFFunction(callee); | ||
const BasicBlock* exitBB = SVFUtil::cast<BasicBlock>(LLVMModuleSet::getLLVMModuleSet()->getLLVMValue( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. roll back |
||
svfFunc->getExitBB())); | ||
const BasicBlock* exitBB = SVFUtil::dyn_cast<BasicBlock>(LLVMModuleSet::getLLVMModuleSet()->getLLVMValue(svfFunc->getExitBB())); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. use cast here or you need to add an assertion |
||
const Value *pValue = &exitBB->back(); | ||
const auto *retInst = SVFUtil::dyn_cast<ReturnInst>(pValue); | ||
ABORT_IFNOT(retInst && retInst->getReturnValue(), "not return inst?"); | ||
|
@@ -894,8 +893,7 @@ Set<const Value *> &ObjTypeInference::bwFindAllocOrClsNameSources(const Value *s | |
if (!callee->isDeclaration()) | ||
{ | ||
const SVFFunction *svfFunc = LLVMModuleSet::getLLVMModuleSet()->getSVFFunction(callee); | ||
const BasicBlock* exitBB = SVFUtil::cast<BasicBlock>(LLVMModuleSet::getLLVMModuleSet()->getLLVMValue( | ||
svfFunc->getExitBB())); | ||
const BasicBlock* exitBB = SVFUtil::dyn_cast<BasicBlock>(LLVMModuleSet::getLLVMModuleSet()->getLLVMValue(svfFunc->getExitBB())); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. see above There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. const BasicBlock* exitBB = SVFUtil::dyn_cast(LLVMModuleSet::getLLVMModuleSet()->getLLVMValue(svfFunc->getExitBB())); |
||
const Value *pValue = &exitBB->back(); | ||
const auto *retInst = SVFUtil::dyn_cast<ReturnInst>(pValue); | ||
ABORT_IFNOT(retInst && retInst->getReturnValue(), "not return inst?"); | ||
|
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 line "SVFBasicBlock* svfBB = bbGraph->addBasicBlock(bb.getName().str());" into "addBasicBlockMap" and rename addBasicBlockMap to addBasicBlock