[PATCH] D15757: Extract helper function to merge MemoryOperand lists [NFC]
Junmo Park via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 5 16:19:02 PST 2016
flyingforyou added inline comments.
================
Comment at: lib/CodeGen/MachineInstr.cpp:884
@@ +883,3 @@
+ MemEnd);
+ assert(MemEnd - MemBegin == CombinedNumMemRefs && "missing memrefs");
+
----------------
reames wrote:
> 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.
Thanks for explain.
I expect that this function can merge own and other's memref information.
Is this better way for the function?
http://reviews.llvm.org/D15757
More information about the llvm-commits
mailing list