[LLVMdev] Bug in MachineInstr::isIdenticalTo

Villmow, Micah Micah.Villmow at amd.com
Tue Jan 4 12:13:25 PST 2011



> -----Original Message-----
> From: Jakob Stoklund Olesen [mailto:stoklund at 2pi.dk]
> Sent: Tuesday, January 04, 2011 11:55 AM
> To: Villmow, Micah
> Cc: llvmdev at cs.uiuc.edu
> Subject: Re: [LLVMdev] Bug in MachineInstr::isIdenticalTo
> 
> 
> On Jan 4, 2011, at 11:08 AM, Villmow, Micah wrote:
> 
> > So, my question is,  should isIdenticalTo take the memoperands into
> account? Is my patch correct? I almost feel like isIdenticalTo needs to
> be added to MachineMemOperand class.
> 
> The MachineMemOperands are supposed to be used for optimizations only,
> your code should still be correct when stripping all memory operands.
> 
[Villmow, Micah] I disagree with this as nothing in the documentation for the class states that it should be used for optimizations only. From the header file, " A description of a memory reference used in the backend ... This allows it to describe lowered loads and stores. " That is exactly what I am using it for. 
> I think you would be better off encoding the store size in the opcode.
> 
[Villmow, Micah] While it might be nice, this would cause massive instruction opcode bloat. I already have over 500 load/store opcodes and storing the size in the instruction would probably triple or quadruple this amount. So not encoding it in the opcode is a decision to lower the amount of opcodes required.
> /jakob
> 






More information about the llvm-dev mailing list