This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: [5 Regression] r219037 caused FAIL: gcc.dg/pr44194-1.c
- From: John David Anglin <dave dot anglin at bell dot net>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Jeffrey Law <law at redhat dot com>
- Date: Sat, 3 Jan 2015 15:10:25 -0500
- Subject: Re: PATCH: [5 Regression] r219037 caused FAIL: gcc.dg/pr44194-1.c
- Authentication-results: sourceware.org; auth=none
- References: <20141231141317 dot GA575 at gmail dot com> <20150103173548 dot GA22839 at hiauly1 dot hia dot nrc dot ca> <CAMe9rOptBJUhxRDnVTfou=XmKRM0vTCX6HUyot9bCaSuoPkGgQ at mail dot gmail dot com>
On 2015-01-03, at 2:48 PM, H.J. Lu wrote:
> On Sat, Jan 3, 2015 at 9:35 AM, John David Anglin
> <dave@hiauly1.hia.nrc.ca> wrote:
>> On Wed, 31 Dec 2014, H.J. Lu wrote:
>>
>>> - /* Arguments for a sibling call that are pushed to memory are passed
>>> - using the incoming argument pointer of the current function. These
>>> - may or may not be frame related depending on the target. Since
>>> - argument pointer related stores are not currently tracked, we treat
>>> - a sibling call as though it does a wild read. */
>>> - if (SIBLING_CALL_P (insn))
>>> + if (targetm.sibcall_wild_read_p (insn))
>>> {
>>> add_wild_read (bb_info);
>>> return;
>>
>> Instead of falling through to code designed to handle normal calls, it
>> would be better to treat them separately. Potentially, there are other
>> optimizations that may be applicable. If a sibcall doesn't read from
>> the frame, add_non_frame_wild_read() can be called. This would restore
>> the x86 optimization.
>>
>
> That will a new optimization. I am trying to restore the old behavior on
> x86 with minimum impact in stage 3.
Not really. In gcc.dg/pr44194-1.c, the sibcall was not a const function and this case
was covered by this hunk of code:
else
/* Every other call, including pure functions, may read any memory
that is not relative to the frame. */
add_non_frame_wild_read (bb_info);
Dave
--
John David Anglin dave.anglin@bell.net