Displaying 1 result from an estimated 1 matches for "load_count".
Did you mean:
bad_count
2012 Aug 22
1
[LLVMdev] Insert Self Written Function Call from a FunctionPass?
...cBlock(Function::iterator &BB)
{
for(BasicBlock::iterator BI = BB->begin(), BE = BB->end(); BI
!= BE; ++BI)
{
if(isa<LoadInst>(&(*BI)))
{
LoadInst *CI = dyn_cast<LoadInst>(BI);
/*load count*/
LoadInst* load_count = new LoadInst(count, "", false);
load_count->setAlignment(4);
/*call print(count)*/
CallInst* call_print = CallInst::Create(check, load_count, "");
/*insert the instructions*/
BB->getInstList().insert((Instruction*)CI, load_count);
BB->getInstList().insert((Instruction...