search for: instrcallpre

Displaying 1 result from an estimated 1 matches for "instrcallpre".

2005 Aug 13
1
[LLVMdev] Adding instructions to loop
I am attempting to add instructions before and after all loops. To do this, I've added a simple function as follows: void addToAllLoops(Loop * IL) { addToAllLoops(IL); BasicBlock * PH = IL->getLoopPreheader(); Instruction *InstrCallPre = new CallInst(PrintLoopBegin, "", PH->getPrev()); return; } The function added is trivial: void printloopbegin() { fprintf (stderr,"Loop Beginning\n"); } The function is called from runOnFunction() as follows: PrintLoopBegin = F.getParent()->get...