search for: x86cfioptpass

Displaying 4 results from an estimated 4 matches for "x86cfioptpass".

2010 Oct 20
1
[LLVMdev] MachineBasicBlock insertion
...m here. OK, here is the problem: I tried to insert a MachineBasicBlock into a function. Here is the code snippet: // insert a machine basic block with the error_label into MF and before I // Pred is the predecessor of the block to be inserted // the new basic block is inserted right before I void X86CFIOptPass::insertBasicBlockBefore(MachineFunction &MF, MachineBasicBlock *Pred, MachineFunction::iterator I){ const BasicBlock* LLVM_BB = Pred->getBasicBlock(); MachineBasicBlock * MBB = MF.CreateMachineBasicBlock(LLVM_BB); // create a MBB MBB-...
2015 Jul 09
2
[LLVMdev] insert nop instruction
Dear All, To add to this, you can find examples of inserting NOPs for X86 in the CFI pass originally written at Lehigh University that we ported to 64-bit X86 for SVA: https://github.com/jtcriswell/SVA/blob/master/llvm/lib/Target/X86/X86CFIOptPass.cpp Alternatively, you could use an InlineAsm call at the LLVM IR level (which I think would be easier to implement). Regards, John Criswell On 7/9/15 8:56 AM, Daniel Sanders wrote: > > Hi, > > Given that you are using LLVM-IR, I expect that instruction selection > occurs after...
2010 Oct 20
1
[LLVMdev] MachineBasicBlock insertion and use/def list update
...sicBlock into a function. Here is the code >> snippet: >> >> // insert a machine basic block with the error_label into MF and >> before I >> // Pred is the predecessor of the block to be inserted >> // the new basic block is inserted right before I >> void X86CFIOptPass::insertBasicBlockBefore(MachineFunction&MF, >> MachineBasicBlock *Pred, >> MachineFunction::iterator I){ >> const BasicBlock* LLVM_BB = Pred->getBasicBlock(); >> MachineBasicBlock * MBB = MF.CreateMachineBasicBlock...
2015 Jul 09
2
[LLVMdev] insert nop instruction
My pass runs after optimization passes. On Thu, Jul 9, 2015 at 1:11 PM, David Chisnall <David.Chisnall at cl.cam.ac.uk> wrote: > Hi, > > What are you trying to achieve? Inserting NOPs into LLVM IR is likely to > be pointless, as optimisations (in the IR or SelectionDAG) will remove them > before machine code generation. If you want to insert NOPs into the > generated