[PATCH] D50680: [SDAG] Remove the reliance on MI's allocation strategy for `MachineMemOperand` pointers attached to `MachineSDNodes` and instead have the `SelectionDAG` fully manage the memory for this array.

Chandler Carruth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 13 17:36:05 PDT 2018


chandlerc marked an inline comment as done.
chandlerc added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:7100
+  N->NumMemRefs = (int)NewMemRefs.size();
+  for (int i : llvm::seq(0, N->NumMemRefs))
+    N->MemRefs[i] = NewMemRefs[i];
----------------
hfinkel wrote:
> Use std::copy?
Yep, made exactly this change when getting the right implementation here for the optimized form.


Repository:
  rL LLVM

https://reviews.llvm.org/D50680





More information about the llvm-commits mailing list