On 12/16/2016 06:57 AM, Richard Biener wrote:
On Fri, Dec 16, 2016 at 2:54 AM, Jeff Law <l...@redhat.com> wrote:
+       {
+         /* STMT might be partially dead and we may be able to reduce
+            how many memory locations it stores into.  */
+         if (live_bytes
+             && !bitmap_equal_p (live_bytes, orig_live_bytes)
+             && !gimple_clobber_p (stmt))
+           trim_partially_dead_store (orig_live_bytes, live_bytes, stmt);

The actual transform in dse_possible_dead_store_p looks a bit misplaced.
I see it's somehow convenient but then maybe returning a enum from this
function might be cleaner.  Well, I'm not too torn about this, so maybe
just rename the function a bit (no good suggestion either).
So the problem with returning a tri-state is that we'd also need to return the bitmaps or trimming data so that our caller would know how to trim in the partially dead case. Certainly possible, though marginally more awkward from an implementation standpoint. Renaming seems appropriate since dse_possible_dead_store_p does more than just detect a dead store with these changes.

Jeff

Reply via email to