[LLVMdev] Reference to recently created move

Fernando Magno Quintao Pereira fernando at CS.UCLA.EDU
Wed Feb 21 23:17:53 PST 2007

Hey, guys, I am creating some move instructions with 
MRegisterInfo::copyRegToReg. How do I get a pointer to the instruction 
that I just created? Is there a way to do something like:

// mbb is MachineBasicBlock, reg_info is MRegisterInfo

MachineBasicBlock::iterator iter = mbb.getFirstTerminator();

reg_info->copyRegToReg(mbb, iter, dst, src, rc);

iter--; (???)

MachineInstr * new_move_instruction = iter; (???)

This does not work though.

Thank you,


More information about the llvm-dev mailing list