search for: oldmi

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

Did you mean: oldmm
2015 Feb 11
2
[LLVMdev] deleting or replacing a MachineInst
...::new_reg, kill).addImm(i) for (MachineFunction::iterator MFI = MF.begin(), MFE = MF.end(); MFI != MFE; ++MFI) { MachineBasicBlock* MBB = MFI; for (MachineBasicBlock::iterator MBBI = MBB->begin(); MBBI != MBB->end(); ++MBBI) { MachineInstr *NewMI = NULL; OldMI = MBBI; // %EFLAGS<imp-def> is getting copied // %RDX<imp-use,kill> is not getting copied (when it appears) switch (OldMI->getOpcode()) { default: continue; // .... case X86::BT64ri8: case X86::BT32ri8: case X86::BT16...
2015 Feb 11
2
[LLVMdev] deleting or replacing a MachineInst
...and it correctly places the new instruction just before the old instruction in the assembly output. So far so good. Now I have to remove the old instruction. But everything I try crashes LLVM, either immediately or eventually. Various incantations which haven't worked. MBB->remove_instr(OldMI); OldMI->removeFromParent(); MBB.erase(OldMI); I should add that there are flags // %EFLAGS<imp-def> is getting copied automatically // %RDX<imp-use,kill> is not getting copied (when it appears) So, any advice to peephole adding/deleting or just replacing Machine...
2015 Feb 11
2
[LLVMdev] deleting or replacing a MachineInst
There are 11 BuildMI() functions in MachineInstrBuilder.h including four using the iterator and one using an instruction. But I just don't think that's it. The creation of the new instruction works fine (works fine with OldMI as well) and the new instruction is present in the assembly output. The problem is removing the old instruction correctly. > The loop header needs to be modified, because MBBI will be invalidated when you remove the instruction: So if I remove the old instruction with something like: MBB-&...
2015 Feb 11
2
[LLVMdev] deleting or replacing a MachineInst
I made the change to the BuildMI() call. Again, I don't think that matters. #define BUILD_INS(opcode, new_reg, i) \ BuildMI(*MBB, OldMI, MBBI->getDebugLoc(), TII->get(X86::opcode)) \ .addReg(X86::new_reg, kill).addImm(i) I didn't completely understand your other proposed change: ​ for (MachineBasicBlock::iterator MBBI = MBB->begin(); MBBI != MBB->end(); ) { MachineInstr *NewMI = NULL; O...
2009 Mar 06
0
impcat='tree'
...m using the Hmisc and Design libraries and have used the following code (as shown in the example provided in the referenced paper): '%in%' <- function(a,b)match(a,b,nomatch=0)>0 # Define function for easy determination of whether a value is in a list levels(ekg)[levels(ekg)%in%c('oldMI','recentMI')] <- 'MI' # Combines last 2 levels and uses a new name, MI pf.coded <- as.integer(pf) # Save original pf, re-code to 1-4 levels(pf) <- c(levels(pf)[1:3],levels(pf)[3]) # Combine last 2 levels of original This is where I have the problem. I am writing an im...