This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch i386]: Expand sibling-tail-calls via accumulator register
- From: Richard Henderson <rth at redhat dot com>
- To: Jeff Law <law at redhat dot com>, Jakub Jelinek <jakub at redhat dot com>, Kai Tietz <ktietz at redhat dot com>
- Cc: "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 20:57:39 -0700
- Subject: Re: [patch i386]: Expand sibling-tail-calls via accumulator register
- Authentication-results: sourceware.org; auth=none
- References: <356718653 dot 5712706 dot 1400794422397 dot JavaMail dot zimbra at redhat dot com> <20140526183208 dot GG10386 at tucnak dot redhat dot com> <1487116948 dot 8449887 dot 1401132170121 dot JavaMail dot zimbra at redhat dot com> <20140526193543 dot GH10386 at tucnak dot redhat dot com> <625132578 dot 8474723 dot 1401136339171 dot JavaMail dot zimbra at 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>
On 05/28/2014 02:54 PM, Jeff Law wrote:
> On 05/28/14 15:52, Jakub Jelinek wrote:
>> On Wed, May 28, 2014 at 05:28:31PM -0400, Kai Tietz wrote:
>>> Yes, I missed the plus-part.
>>>
>>> I am just running bootstrap with regression testing for altering predicate to:
>>>
>>> (define_predicate "sibcall_memory_operand"
>>> (match_operand 0 "memory_operand")
>>> {
>>> op = XEXP (op, 0);
>>>
>>> if (GET_CODE (op) == CONST)
>>> op = XEXP (op, 0);
>>> if (GET_CODE (op) == PLUS && CONSTANT_P (XEXP (op, 0)))
>>> op = XEXP (op, 1);
>>
>> 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.
Recall that it has just satisfied memory_operand, where all the real checks
should have been done. I think just the CONSTANT_P check is sufficient.
r~