On Sat, May 16, 2015 at 09:55:08PM -0400, Hans-Peter Nilsson wrote:
> > With a plus or minus combine would always write it as a mult.
> > I don't think any other pass would create this combination.  I
> > haven't tested it though.
> 
> Ports probably also generate that internally at various RTL
> passes, something that takes a bit more than an at-a-glance code
> inspection.

Yeah, true.  Hopefully port maintainers will know about what the
port does, or at least notice the ICEs.

> > > I've been trying to come up with valid reasons there'd be ever
> > > be canonicalization by multiplication, but failed so I guess
> > > I'll rip it out.
> >
> > The "unreachable" thing should quickly tell you if that guess is wrong.
> > Not something you want to leave in a production compiler, of course.
> 
> I think you misunderstood; I mean that I pondered
> "philosophical" reasons to change the canonical representation;
> if there was some reasoning, current or looking forward, where
> we'd "add back" mult as non-address-canonical RTL.

Ah.  Yes, same here -- I don't see any situation where having
mult instead of shift outside of a mem would be more convenient.

> Actually, there are two things you could help with:
> 
> - (pointer-to) step-by-step instructions to recreate the Linux
> (kernel :) build, as those you did before for a multiple of
> targets.  I'd like to know I fixed your observations.

I used <http://git.infradead.org/users/segher/buildall.git>; it has
a README.  I see that doc is a little out of date, I'll update.

> - add a preferred canonicalization function to do conversion
> to/from memory-address-canonical RTL.  Like
> fwprop.c:canonicalize_address (just not static :) and maybe also
> a canonicalize_nonaddress.  At the moment, ports call
> replace_equiv_address (family of functions) when changing
> address RTL, but that code-path (at a glance) doesn't
> canonicalize whatever non-address-canonical RTL you throw at it.
> Maybe it should?

Maybe validize_mem is nicer?  It depends much what you really
want to change.

Does simplify_rtx not do what you want for "nonaddress"?


Segher

Reply via email to