Displaying 3 results from an estimated 3 matches for "insertnewinstsbefor".
Did you mean:
insertnewinstsbefore
2007 Mar 06
6
[LLVMdev] alloca & store generation
...ode in my transformation:
-----
BasicBlock* eb = M.getMainFunction()->getEntryBlock();
Function::arg_iterator argc_it = mainfun->arg_begin();
Function::arg_iterator argv_it = argc_it;
++argv_it;
Argument* argc = &*argc_it;
Argument* argv = &*argv_it;
Instruction* insertNewInstsBefore = &eb->front();
AllocaInst* argc_alloca = new AllocaInst(argc->getType(), "",
insertNewInstsBefore);
AllocaInst* argv_alloca = new AllocaInst(argv->getType(), "",
insertNewInstsBefore);
new StoreInst(argc, argc_alloca, false, insertNewInsts...
2007 Mar 06
0
[LLVMdev] alloca & store generation
...t; BasicBlock* eb = M.getMainFunction()->getEntryBlock();
> Function::arg_iterator argc_it = mainfun->arg_begin();
> Function::arg_iterator argv_it = argc_it;
> ++argv_it;
> Argument* argc = &*argc_it;
> Argument* argv = &*argv_it;
> Instruction* insertNewInstsBefore = &eb->front();
> AllocaInst* argc_alloca = new AllocaInst(argc->getType(), "",
> insertNewInstsBefore);
> AllocaInst* argv_alloca = new AllocaInst(argv->getType(), "",
> insertNewInstsBefore);
> new StoreInst(argc, argc_allo...
2007 Mar 06
0
[LLVMdev] alloca & store generation
...uctions?
Because you pass in an empty string for the name in the new AllocaInst
calls below. Replace the empty strings with "argc_addr" or whatever
you want.
> AllocaInst* argc_alloca = new AllocaInst(argc->getType(), "",
> insertNewInstsBefore);
> AllocaInst* argv_alloca = new AllocaInst(argv->getType(), "",
> insertNewInstsBefore);