This is the mail archive of the
mailing list for the GCC project.
Re: [patch i386]: Expand sibling-tail-calls via accumulator register
- From: Kai Tietz <ktietz at redhat dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Jeff Law <law at redhat dot com>, Richard Henderson <rth at redhat dot com>, "H.J. Lu" <hjl dot tools at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 28 May 2014 18:14:38 -0400 (EDT)
- Subject: Re: [patch i386]: Expand sibling-tail-calls via accumulator register
- Authentication-results: sourceware.org; auth=none
- References: <20140526183208 dot GG10386 at tucnak dot redhat dot com> <643791243 dot 10265346 dot 1401266636155 dot JavaMail dot zimbra at redhat dot com> <53861B5B dot 2060705 at redhat dot com> <53863559 dot 6080505 at redhat dot com> <1592496514 dot 10979437 dot 1401312511625 dot JavaMail dot zimbra at redhat dot com> <20140528215200 dot GK10386 at tucnak dot redhat dot com> <53865B32 dot 6070307 at redhat dot com> <20140528220320 dot GL10386 at tucnak dot redhat dot com>
----- Original Message -----
> On Wed, May 28, 2014 at 03:54:58PM -0600, Jeff Law wrote:
> > >Why not get rid of all the above 4 lines and just keep:
> > >
> > >> return CONSTANT_P (op);
> > >
> > >? CONST matches CONSTANT_P, and what is inside of CONST should be
> > >fine, and (plus (symbol_ref) (const_int)) not surrounded by CONST
> > >ir invalid.
> > Haven't we recently had problems with being overly accepting of
> > stuff inside CONST when using the CONST for address expressions.
> > ISTM we should only accept what the processor supports here.
> The only recent problem I remember was that we forgot to put CONST
> around (plus (symbol_ref) (const_int)), but I see no problem not
> accepting such invalid RTL.
> The processor shouldn't care, for the instructions a CONST is just
> any kind of immediate, what exactly it is matters solely to the
> assembler/linker and dynamic linker
> (if there are relocations for it, if the expression can be expressed in
> the assembly, etc.). But that is common to all CONST operands, there is
> nothing special particularly about sibcalls.
Well, actually we want to prevent to accept anything plus/mult within memory-addresses, which hasn't a symbol-ref, or a constant-value as arguments. Is it for sure that there are within a CONST-rtx no registers? If so, we could check intitally for CONSTANT_P.