search for: terminitor

Displaying 5 results from an estimated 5 matches for "terminitor".

Did you mean: terminator
2011 Apr 25
2
[LLVMdev] inserting a fucntion call at the end of basic bloc
...re the terminator. > Yes, i mean before the termininator, My problem is how to call a method suppose this fucntion void A(int x) { x=x+1; } should i define this function and declare it at the beginig of the module and create for it a basic bloc? and then how to call it before each basic bloc terminitor ... > > > i tried to see an example with the demo, i saw that it instead of calling > the > > function, it repeats all the instruction that are existing in the > function > > Any help? > > Turn off optimization in the demo (optimization level "None"). &gt...
2011 Apr 25
0
[LLVMdev] inserting a fucntion call at the end of basic bloc
...a basic bloc? you can just declare the function (i.e. no need to give it a body), and call it. You can then link with an object file that defines it. This is simpler than injecting the function into each module (though that is easy to do too). > and then how to call it before each basic bloc terminitor Use an IRBuilder. Pass the basic block terminator to SetInsertPoint. Use one of the CreateCall IRBuilder methods to insert a call instruction. Ciao, Duncan. > > ... > > > i tried to see an example with the demo, i saw that it instead of calling the > > functi...
2011 Apr 25
2
[LLVMdev] inserting a fucntion call at the end of basic bloc
hi all, i would like insert a fucntion call at the end of each basic bloc the fucntion i have defined and declared at the begining of the module ie i have written a pass derived from a module pass virtual bool runOnModule(Module & M){ // i declared the fucntion and defined it for (Module::iterator a = M.begin(), b = M.end(); a != b; for (Function::iterator i = a->begin(), e =
2011 Apr 25
0
[LLVMdev] inserting a fucntion call at the end of basic bloc
Hi Nabila, > i would like insert a fucntion call at the end of each basic bloc you can't, because only terminators are allowed at the end of a basic block. However you can try to insert the call before the terminator. ... > i tried to see an example with the demo, i saw that it instead of calling the > function, it repeats all the instruction that are existing in the function >
2011 Apr 26
2
[LLVMdev] inserting a fucntion call at the end of basic bloc
...eclare the function (i.e. no need to give it a body), and > call it. > You can then link with an object file that defines it. This is simpler > than > injecting the function into each module (though that is easy to do too). > > > and then how to call it before each basic bloc terminitor >> > > Use an IRBuilder. Pass the basic block terminator to SetInsertPoint. Use > one > of the CreateCall IRBuilder methods to insert a call instruction. > > Ciao, Duncan. > > >> ... >> >> > i tried to see an example with the demo, i saw t...