[PATCH] D29845: [SelectionDAG] Remove redundant stores more aggressively.

Nirav Dave via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 15 07:37:51 PDT 2017


niravd accepted this revision.
niravd added a comment.
This revision is now accepted and ready to land.

I suspect this is triggering slightly less often because of you're using the more conservative than necessary hasOneUse() restriction which has become slightly less common with AA on by default. Turning it to true reveals at least one more case that we could catch if we did a deeper analysis to make sure we are

In any case, modulo my minor inline comment adding this shallow check is an obvious win and this LGTM.



================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAG.cpp:7309
+      // node.
+      return Dest.hasOneUse();
+    }
----------------
IIUC the shallow search's true set is not a subset of the deeper one and we should have the union. 
so this should probably be:

  if (Dest.hasOneUse())
    return true;


Repository:
  rL LLVM

https://reviews.llvm.org/D29845





More information about the llvm-commits mailing list