[MachineLICM] Fix handling of memoperands
authorPhilip Reames <listmail@philipreames.com>
Wed, 23 Dec 2015 17:05:57 +0000 (17:05 +0000)
committerPhilip Reames <listmail@philipreames.com>
Wed, 23 Dec 2015 17:05:57 +0000 (17:05 +0000)
commita79baf560c40745a008bc8a3584efa6b14201ee5
treecbef5f10d781c72a3123997a6f0536f2213de5f9
parent023935c3d9c184928758078a4b510d672981c98c
[MachineLICM] Fix handling of memoperands

As far as I can tell, the correct interpretation of an empty memoperands list is that we didn't have sufficient room to store information about the MachineInstr, NOT that the MachineInstr doesn't access any particular bit of memory. This appears to be fairly consistent in a number of places, but I'm not 100% sure of this interpretation. I'd really appreciate someone more knowledgeable confirming my reading of the code.

This patch fixes two latent bugs in MachineLICM - given the above assumption - and adds comments to document the meaning and required handling. I don't have test cases; these were noticed by inspection.

Differential Revision: http://reviews.llvm.org/D15730

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256335 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/MachineInstr.h
lib/CodeGen/MachineLICM.cpp