This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: CSE fold_rtx subreg patch
- To: john at feith dot com (John Wehle)
- Subject: Re: CSE fold_rtx subreg patch
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Mon, 13 Jul 1998 01:09:05 -0600
- cc: egcs-patches at cygnus dot com
- Reply-To: law at cygnus dot com
In message <199807102338.TAA14385@jwlab.FEITH.COM>you write:
> > I note that "mode_arg" is used outside the switch statement -- do we
> > need to fix it, or is its value correct?
>
> Good point. We probably need to fix it if the substitution is performed.
Per your later message, I'll presume we're OK on this issue.
> > I'm also a little worried about the < to <= changes, particularly for
> > SUBREGS since they are not optimized as well as REGs in other passes
> > and thus "cost more". Presumably you added it because the cases you
> > tried had equal cost.
> >
> > You might consider changing RTX_COSTS for the x86 to make SUBREGS
> > which narrow an expression cheaper than the inner expression since
> > narrowing may allow byte/half sized instructions to be used.
>
> Are you refering to RTX_COSTS in the context of the < to <= change or in
> general?
Well, I guess what I want to know is exactly why you changed < to <=.
The rest was pure speculation about why you might have changed it and
possibilities for avoiding that change.
> Regarding the < to <= change I don't believe that RTX_COSTS has an effect.
> In the case of a SUBREG the COST macro calls notreg_cost which has a special
> case for handling a SUBREG. It basicly uses the exact same logic for a SUB REG
> as COST uses for a REG thus guarenteeing in the case at hand that the cost of
> the SUBREG will always equal the cost of the REG.
Maybe we should change this -- a SUBREG which narrows an operand may
be a win on machines like the x86, m68k and maybe others when compared
to the wider register.
jeff