On 02/22/2016 02:22 AM, Bin.Cheng wrote:

My only question is why didn't you use FOR_EACH_SUBRTX_VRA from rtl-iter.h
to walk the RTX expressions in collect_address_parts and
canonicalize_address_mult?
Hi Jeff,
Nothing special, just I haven't used this before, also
canonicalize_address_mult is alphabetically copied from fwprop.c.  One
question is when rewriting SHIFT to MULT, we need to modify rtl
expression in place, does FOR_EACH_SUBRTX iterator support this?  If
yes, what is the behavior for modified sub-expression?
Hmm. The question of semantics when we change the underlying sub-expressions is an interesting one.

While I think we're OK in practice using the iterators, I think that's more of an accident than by design -- if MULT/ASHIFT had a different underlying RTL structure then I'm much less sure using the iterators would be safe.

Let's go with your original patch that didn't use the iterators. Sorry for making you do the additional work/testing to build the iterator version. But after pondering the issue you raised, I think your original patch is safer.


jeff

Reply via email to