[LLVMdev] MRegisterInfo::eliminateFrameIndex

Vladimir Prus ghost at cs.msu.su
Thu Jul 1 03:50:01 PDT 2004


The docs for the above-mentioned function say:

   This method may modify or replace the specified instruction, as long as it   
   keeps the iterator pointing the the finished product.

What does it mean to "keep an interator". Was "invalidates the iterator" 
intended, so something else. 

Another question, is how do I really replace the instruction. The operator= is 
private and erase/insert might well invalidate the iterator.

As it stands, I need to manually change all the operands and opcode of the 
instruction, which is not convenient.

Also, why RemoveOperand and SetMachineOperand methods in MachineInstr are the 
only methods in that class which start with uppercase letter?

- Volodya




More information about the llvm-dev mailing list