This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Check rtx_costs in combine.c's try_combine


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]