[PATCH] D144711: [DAGCombiner] don't reuse the pointer info for merged store

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 27 06:35:19 PST 2023


foad added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:729
+    /// store's pointer info if all the stores are from the same object.
+    bool hasSameUnderlyingObj(SmallVectorImpl<MemOpLink> &StoreNodes,
+                              unsigned NumStores);
----------------
This should just take one `ArrayRef<MemOpLink>` argument.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:18988
+
+  SmallPtrSet<const Value *, 8> UnderlyingObjs;
+  for (unsigned i = 0; i < NumStores; ++i) {
----------------
You don't need a set for this. You only need to remember a single `Value *`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144711/new/

https://reviews.llvm.org/D144711



More information about the llvm-commits mailing list