[llvm-commits] [PATCH] Compare MachineMemOperands when checking if instructions are identical in MachineInstr::isIdenticalTo()

Justin Holewinski justin.holewinski at gmail.com
Wed Dec 12 12:28:00 PST 2012


The attached patch modified MachineInstr::isIdenticalTo to consider
information stored in MachineMemOperand when determining if two machine
instructions are identical.  Specifically, the MachineMemOperands much
agree on the pointer flags, memory size, and the fold-ability of the
address spaces involved.  A new target hook is added which is called to
determine if memory-touching instructions in two different address spaces
are foldable.  The default implementation assumes all address spaces are
foldable to match the current behavior.

This fixes a problem we've been having where post-isel passes are combining
loads that are really to different address spaces.  These instructions
share the same opcode, but the MachineMemOperand is used to specify address
space flags during instruction emission.

-- 

Thanks,

Justin Holewinski
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121212/dd481fb9/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Compare-MachineMemOperands-when-checking-if-instruct.patch
Type: application/octet-stream
Size: 4205 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121212/dd481fb9/attachment.obj>


More information about the llvm-commits mailing list