This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFC: Combine of compare & and oddity
- From: Segher Boessenkool <segher at kernel dot crashing dot org>
- To: Jeff Law <law at redhat dot com>
- Cc: Wilco Dijkstra <wdijkstr at arm dot com>, "'GCC Patches'" <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 3 Sep 2015 11:36:34 -0500
- Subject: Re: RFC: Combine of compare & and oddity
- Authentication-results: sourceware.org; auth=none
- References: <000e01d0e5a2$1e2f66b0$5a8e3410$ at com> <20150902184747 dot GA7676 at gate dot crashing dot org> <000f01d0e63d$c40686e0$4c1394a0$ at com> <20150903131809 dot GA27819 at gate dot crashing dot org> <001001d0e659$1120bb60$33623220$ at com> <55E870C0 dot 7080606 at redhat dot com>
On Thu, Sep 03, 2015 at 10:09:36AM -0600, Jeff Law wrote:
> >>You will end up with a *lot* of target hooks like this. It will also
> >>make testing harder (less coverage). I am not sure that is a good idea.
> >
> >We certainly need a lot more target hooks in general so GCC can do the
> >right thing
> >(rather than using costs inconsistently all over the place). But that's a
> >different
> >discussion...
> Let's be very careful here, target hooks aren't always the solution.
> I'd rather see the costing models fixed and use those across the board.
> But frankly, I don't know how to fix the costing models.
Combine doesn't currently use costs to decide how to simplify and
canonicalise things. Simplifications are what is simpler RTL; combine's
job is to make fewer RTL instructions (which is not the same thing as
fewer machine instructions, or cheaper instructions). Changing what is
canonical based on target hooks would be, uh, interesting.
Segher