[LLVMdev] changing opcode

Hal Finkel hfinkel at anl.gov
Wed Feb 13 16:06:49 PST 2013


----- Original Message -----
> From: "reed kotler" <rkotler at mips.com>
> To: llvmdev at cs.uiuc.edu
> Sent: Wednesday, February 13, 2013 6:00:45 PM
> Subject: [LLVMdev] changing opcode
> 
> Is there a simple way to just change the opcode of a machine
> instruction.
> 
> I have a lot of long/short pairs where when I know the offset, i can
> replace the long version with the short version.

Are you looking for something like this:
MI.setDesc(TII.get(NewOpcode));

This is in PPCRegisterInfo::eliminateFrameIndex.

 -Hal

> 
> Tia.
> 
> REed
> 
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
> 



More information about the llvm-dev mailing list