search for: machineinstrbuilder_8h

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

2016 Sep 04
1
How to insert instructions before each function calls?
...llInst->getParent(); // basic block > location of your call inst > BuildMI(*MBB, MI, DebugLoc(), XII->get(XXX:::INSTRUCTION)......); > > The BuildMI params are going to depend on what you want to do with the > instruction being inserted. > http://llvm.org/docs/doxygen/html/MachineInstrBuilder_8h.html > > -Ryan > > Hi Ryan, I need to add two instructions for each function call. Do you mean I should add this snippet in the Lowercall function? Or I should add a new pass? Thanks! > > > On Sun, Sep 4, 2016 at 1:45 AM, Mehdi Amini <mehdi.amini at apple.com> wro...
2016 Sep 05
2
How to insert instructions before each function calls?
...= YourCallInst->getParent(); // basic block location of your call inst > BuildMI(*MBB, MI, DebugLoc(), XII->get(XXX:::INSTRUCTION)......); > > The BuildMI params are going to depend on what you want to do with the instruction being inserted. > http://llvm.org/docs/doxygen/html/MachineInstrBuilder_8h.html > > -Ryan > > Hi Ryan, > I need to add two instructions for each function call. Do you mean I should add this snippet in the Lowercall function? Or I should add a new pass? > > Thanks! > > > > > On Sun, Sep 4, 2016 at 1:45 AM, Mehdi Amini <me...
2016 Sep 04
2
How to insert instructions before each function calls?
So one way might look like this: IRBuilder<> Builder(&*BB); // BB = Function::iterator OR IRBuilder<> Builder(CallInst->getParent()); Builder.SetInsertPoint(CallInst); InstructionClass *YourNewInstruction = builder.CreateInstructionClass(.....); // InstructionClass = type of instruction you are inserting -Ryan On Sat, Sep 3, 2016 at 6:04 PM, Ryan Taylor <ryta1203 at