search for: call_to_other_func_inst

Displaying 2 results from an estimated 2 matches for "call_to_other_func_inst".

2016 Jun 20
3
function call replacement
...lowing: %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 ReplaceInstWithInst function as follows: CallInst *call_to_other_func_inst = IRBuilder.CreateCall(ptr_to_other_func, args); ReplaceInstWithInst(call_to_func_inst, newI); LLVM builds correctly but the instrumentation crashes at optimization time. I know this isn't the correct way to do it because IRBuilder generates IR and I just want to have an instance of a CallInst...
2016 Jun 21
3
function call replacement
...nc(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 ReplaceInstWithInst function as follows: > > CallInst *call_to_other_func_inst = > IRBuilder.CreateCall(ptr_to_other_func, args); > ReplaceInstWithInst(call_to_func_inst, newI); > > LLVM builds correctly but the instrumentation crashes at optimization > time. I know this isn't the correct way to do it because IRBuilder > generates IR and I just want to h...