[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.

Hal Finkel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 13 17:30:33 PDT 2018


hfinkel added a comment.

This code certainly looks cleaner.



================
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];
----------------
Use std::copy?


Repository:
  rL LLVM

https://reviews.llvm.org/D50680





More information about the llvm-commits mailing list