[PATCH] D15757: Extract helper function to merge MemoryOperand lists [NFC]

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 5 11:16:36 PST 2016


reames added inline comments.

================
Comment at: lib/CodeGen/MachineInstr.cpp:884
@@ +883,3 @@
+                     MemEnd);
+  assert(MemEnd - MemBegin == CombinedNumMemRefs && "missing memrefs");
+  
----------------
flyingforyou wrote:
> I mean `NumMemRefs` is in MachineInstr.
> 
> If MI1's MMOs count is 1, Other MI's MMOs count is 2, we should update MI1's MMOs count(`NumMemRefs`) 3.
> concatenateMemOperands assume that MI1's MMOs count is zero. But If we want to make interface about merging MMOs, we might update `NumMemRefs`.
I'm really confused by your comment.  My best guess is that you are misreading the code.  This function does not update the memref information on the current instruction.  It produces a new set of memrefs (in the return value) which can be set on an instruction.  


http://reviews.llvm.org/D15757





More information about the llvm-commits mailing list