Displaying 3 results from an estimated 3 matches for "paramarrayref".
2013 Dec 16
3
[LLVMdev] Add call printf instructions problems
...ool runOnFunction(Function &F)
{
int id = 0;
// get a Function
Function *call_print = Get_print();
for(inst_iterator i = inst_begin(F),e = inst_end(F);i != e; i++,id++)
{
errs()<<"@"<<id<<": "<<*i<<"\n";
std::vector<llvm::Value*> paramArrayRef;
Value *a = ConstantInt::get(Type::getInt32Ty(getGlobalContext()),1);
paramArrayRef.push_back(a);
// get an instruction pointer
Instruction* ins_temp = &*i;
//create a call instruction and insert it before every instruction
CallInst *call_print =
CallInst::Create(call_print,paramArrayRef,"...
2013 Dec 16
0
[LLVMdev] Add call printf instructions problems
Hi Jin,
It's difficult to say just from looking at a pass, but one thing looked odd:
> CallInst *call_print = CallInst::Create(call_print,paramArrayRef,"",ins_temp);
This looks very dodgy. The "call_print" being used as an argument is
the (uninitialised) one that's just been declared. This could be the
source of the assertion failure (though a segfault is just as likely).
Other than that I'd suggest hooking up a debug...
2013 Dec 17
2
[LLVMdev] Add call printf instructions problems
...re any method to avoid the rename manipulation ?
Thanks!
2013/12/16 Tim Northover <t.p.northover at gmail.com>
> Hi Jin,
>
> It's difficult to say just from looking at a pass, but one thing looked
> odd:
>
> > CallInst *call_print =
> CallInst::Create(call_print,paramArrayRef,"",ins_temp);
>
> This looks very dodgy. The "call_print" being used as an argument is
> the (uninitialised) one that's just been declared. This could be the
> source of the assertion failure (though a segfault is just as likely).
>
> Other than that I'...