While doing the memory SSA work, I started wondering about V_MUST_DEFs.
I think we don't need them anymore.

This may be a bit hasty on my part, I have not really thought it
through.  But I cannot think of a single transformation that absolutely
*requires* V_MUST_DEFs to work.

When they were introduced, they would help propagation and DCE in cases
like:

  #   a_5 = V_MUST_DEF <a_4>;
  a = 4;
  #   a_6 = V_MUST_DEF <a_5>;
  a = 1;

where 'a' is a non-escaping addressable local.  However, DSE will/should
also detect this chain, even if we used preserving defs (V_MAY_DEF).

This could also be handled with memory SSA by not chaining these two stores.

The propagators will happily propagate stores into V_MAY_DEFs, they do
not require V_MUST_DEFs to work.


Thoughts?

Reply via email to