This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Check rtx_costs in combine.c's try_combine
- From: Geoffrey Keating <geoffk at geoffk dot org>
- To: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- Cc: gcc-patches at gcc dot gnu dot org
- Date: 29 Jun 2004 15:41:55 -0700
- Subject: Re: [PATCH] Check rtx_costs in combine.c's try_combine
- References: <10406281120.AA27613@vlsi1.ultra.nyu.edu>
kenner@vlsi1.ultra.nyu.edu (Richard Kenner) writes:
> The following patch adds an additional test to combine.c's try_combine
> to only allow instructions to be merged/combined if the backend's
> TARGET_RTX_COST macro indictates that the replacement is atleast as
> cheap as the original. Historically, GCC's "combine" pass has used
> a greedy algorithm that always attempts to build complex composite
> instructions that are recognized by the back-end independent of any
> cost metric. Increasingly with modern processors, the more complex
> instructions supported are an ISA are not automatically better than
> their component parts.
>
> Yes, but in such a case, those complex instructions should not in the MD
> file as there is no situation in which they should be used.
A simple counterexample is -Os.