[PATCH] D50701: [MI] Change the array of `MachineMemOperand` pointers to be a generically extensible collection of extra info attached to a `MachineInstr`.

Justin Bogner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 15 10:32:42 PDT 2018


bogner added inline comments.


================
Comment at: llvm/lib/CodeGen/MachineInstr.cpp:410-415
+  // We can never merge with an empty list as that must be treated
+  // conservatively.
+  if (MIs[0]->memoperands_empty()) {
+    dropMemRefs(MF);
+    return;
+  }
----------------
This comment is overly vague. Why does this need to be treated conservatively? 

IIUC from the old comments this was because we could hit the case where we ran out of space and dropped memrefs, which meant that empty memrefs may have already hit that case and merging would give a subset. However, if this is still the case I don't see where handle the case of having too many.

Is there another case that this is trying to handle?


Repository:
  rL LLVM

https://reviews.llvm.org/D50701





More information about the llvm-commits mailing list