Displaying 2 results from an estimated 2 matches for "ismyfunctioncall".
2016 Jun 21
3
function call replacement
...es = false;
TLI = &getAnalysis<TargetLibraryInfoWrapperPass>().getTLI();
for (inst_iterator i = inst_begin(F), e = inst_end(F); i != e; ++i) {
Instruction *I = &*i;
if (!I) {
errs() << "error: null pointer instruction\n";
break;
} else if (isMyFunctionCall(I, TLI)) {
errs() << "found a call to the function to replace\n";
res = true;
replacement_function(I);
} else {
errs() << "default: trash instruction\n";
}
}
return res;
}
The problem is that after the first replacement, the iter...
2016 Jun 20
3
function call replacement
Hi everyone,
I am trying to replace the call of a certain function with a call to
another function. It would for example replace the following:
%call = tail call noalias i8* @func(i64 10)
by
%call = tail call noalias i8* @other_func(i64 10)
I managed to declare other_func correctly but I am having troubles to
understand how I should proceed to do the replacement.
I tried to use