-
Notifications
You must be signed in to change notification settings - Fork 435
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
Move ExtAPI annotations to the application #1543
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1543 +/- ##
==========================================
- Coverage 62.64% 62.62% -0.02%
==========================================
Files 243 244 +1
Lines 25706 25744 +38
Branches 4525 4526 +1
==========================================
+ Hits 16103 16123 +20
- Misses 9603 9621 +18
|
svf-llvm/lib/LLVMModule.cpp
Outdated
OrderedSet<string> declNames, defNames, intersectNames; | ||
typedef Map<string, const Function*> NameToFunDefMapTy; | ||
typedef Map<string, Set<const Function*>> NameToFunDeclsMapTy; | ||
FunDeclToDefMapTy extFuncs2ClonedFuncs; |
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.
Rename FunDeclToDefMapTy
svf-llvm/lib/LLVMModule.cpp
Outdated
@@ -1038,6 +977,39 @@ void LLVMModuleSet::buildFunToFunMap() | |||
} | |||
} | |||
|
|||
auto cloneAndReplaceFunction = [&](const Function* functionToClone, Function* srcFunction, Module* parentModule, bool cloneBody) -> Function* |
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.
srcFunction => appFunToReplace
functionToClone => extFunToClone
svf-llvm/lib/LLVMModule.cpp
Outdated
// Without annotations, this function is normal function with useful function body | ||
if (it == ExtFun2Annotations.end()) | ||
{ | ||
Function* clonedFunction = cloneAndReplaceFunction(const_cast<Function*>(extfun), const_cast<Function*>(fdecl), nullptr, true); |
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.
extfun => extFun
fdecl => appFun
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 ExtFuncsVec
svf-llvm/lib/LLVMModule.cpp
Outdated
} | ||
return clonedFunction; | ||
}; | ||
|
||
/// App Func decl -> SVF extern Func def | ||
for (const Function* fdecl : funDecls) |
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.
funDeclsInApp
svf-llvm/lib/LLVMModule.cpp
Outdated
{ | ||
Function* clonedFunction = cloneAndReplaceFunction(const_cast<Function*>(owfunc), const_cast<Function*>(appfunc), nullptr, true); | ||
extFuncs2ClonedFuncs[owfunc] = clonedFunction; | ||
ExtFuncsVec.push_back(owfunc); |
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 ExtFuncsVec.
46dce8d
to
f11838c
Compare
No description provided.