projects
/
c11llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix up syntax errors
[c11llvm.git]
/
isAtomicCall.hpp
diff --git
a/isAtomicCall.hpp
b/isAtomicCall.hpp
index 11e5e68b77ee25a02d8a84ac4e39f7280d220b2f..99e7532af64c49e670dc009512d2660beee4f02b 100644
(file)
--- a/
isAtomicCall.hpp
+++ b/
isAtomicCall.hpp
@@
-6,12
+6,18
@@
bool isAtomicCall(Instruction *I)
{
if ( auto *CI = dyn_cast<CallInst>(I) ) {
Function *fun = CI->getCalledFunction();
{
if ( auto *CI = dyn_cast<CallInst>(I) ) {
Function *fun = CI->getCalledFunction();
+ if (fun == NULL)
+ return false;
+
StringRef funName = fun->getName();
StringRef funName = fun->getName();
- if ( (CI->isTailCall() && funName.contains("atomic_")) ||
-
funName.contains("atomic_compare_exchange
_") ) {
+ // todo: come up with better rules for function name checking
+
if ( funName.contains("atomic
_") ) {
// printArgs(CI);
return true;
// printArgs(CI);
return true;
+ } else if (funName.contains("atomic") ) {
+ // errs() << "intercepted atomic calls: " << *I << "\n";
+ return true;
}
}
}
}