search for: argc_alloca

Displaying 3 results from an estimated 3 matches for "argc_alloca".

2007 Mar 06
6
[LLVMdev] alloca & store generation
...ainFunction()->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, insertNewInstsBefore); new StoreInst(argv, argv_alloca, false,...
2007 Mar 06
0
[LLVMdev] alloca & store generation
...> 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, insertNewInstsBefore); > new StoreInst(...
2007 Mar 06
0
[LLVMdev] alloca & store generation
> Why isn't llvm giving a name to the value returned by the allocas and > using it in the store instructions? 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);