This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix PR57268
- From: Dinar Temirbulatov <dinar at kugelworks dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: Jeff Law <law at redhat dot com>, Steven Bosscher <stevenb dot gcc at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 1 Jun 2013 08:39:58 +0400
- Subject: Re: Fix PR57268
- References: <CANoaTN01FcHx-OQLujvAwD6N8A0f_7UOzcY1_5DofqABTycCRQ at mail dot gmail dot com> <CABu31nOekB_O_CR0rmMw6ng3sNc2UFhPQipgO-p5gF=RFHBkPw at mail dot gmail dot com> <51A6156F dot 9090001 at redhat dot com> <CANoaTN27M4nNRBB2xxPKzbPs_NznMzFf43y8wWOuqVy=7sFEuA at mail dot gmail dot com> <CAMe9rOqSfwn_aO2jYWyUxxDfsCWuQmYkokdjBDqRTEsP=HfKOA at mail dot gmail dot com>
Hi,
oh, This is my mistake I should have bootstrap the compiler. I am
investigating the problem.
thanks, Dinar.
On Sat, Jun 1, 2013 at 7:50 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Wed, May 29, 2013 at 9:36 AM, Dinar Temirbulatov
> <dinar@kugelworks.com> wrote:
>> Here is the corrected version of change. Also, I think, I need
>> write-after-approval access to commit the change.
>> thanks, Dinar,
>>
>> PR rtl-optimization/57268
>> * sched-deps.c (sched_analyze_2): Flush dependence lists if
>> the sum of the read and write lists exceeds MAX_PENDING_LIST_LENGTH.
>>
>> On Wed, May 29, 2013 at 6:49 PM, Jeff Law <law@redhat.com> wrote:
>>> On 05/29/2013 06:52 AM, Steven Bosscher wrote:
>>>>
>>>> Hello,
>>>>
>>>> On Wed, May 29, 2013 at 2:01 PM, Dinar Temirbulatov wrote:
>>>>>
>>>>> Hi,
>>>>> I noticed that the scheduler created long dependence list about ~9000
>>>>> elements long and slowed compilation time for about an hour. Attached
>>>>> patch flushes the dependence list is case of it is longer than
>>>>> MAX_PENDING_LIST_LENGTH. Tested with gcc testsite on x86_64-linux-gnu
>>>>> with c and c++ enabled. Ok for trunk?
>>>>> thanks, Dinar.
>>>>>
>>>>> 2013-05-28 Dinar Temirbulatov <dinar at kugelworks dot com>
>>>>>
>>>>> PR rtl-optimization/57268
>>>>> * sched-deps.c (sched_analyze_2): Flush dependence list
>>>>> then it is longer than MAX_PENDING_LIST_LENGTH.
>>>>
>>>>
>>>>
>>>> * sched-deps.c (sched_analyze_2): Flush dependence lists if
>>>> the sum of the read and write lists exceeds
>>>> MAX_PENDING_LIST_LENGTH.
>>>>
>>>>
>>>>
>>>>> if (!deps->readonly)
>>>>> - add_insn_mem_dependence (deps, true, insn, x);
>>>>> + {
>>>>> + if ((deps->pending_read_list_length +
>>>>> deps->pending_write_list_length)
>>>>> + > MAX_PENDING_LIST_LENGTH)
>>>>> + flush_pending_lists (deps, insn, true, true);
>>>>> + add_insn_mem_dependence (deps, true, insn, x);
>>>>> + }
>>>>
>>>>
>>>> The "flush_pending_lists", "add_insn_mem_dependence" and "}" lines are
>>>> not indented correctly. The if (...+...) line is too long (max. 80
>>>> characters per line). The GCC style would be
>>>>
>>>> if (!deps->readonly)
>>>> {
>>>> if ((deps->pending_read_list_length
>>>> + deps->pending_write_list_length)
>>>> > MAX_PENDING_LIST_LENGTH)
>>>> flush_pending_lists (deps, insn, true, true);
>>>> add_insn_mem_dependence (deps, true, insn, x);
>>>> }
>>>>
>>>> (The aesthetics of GCC code style is a matter for debate, but not here
>>>> and now ;-)
>>>
>>> And just to be clear, with Steven's suggested changes, this patch is OK.
>>>
>>> jeff
>
> This caused:
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57494
>
> --
> H.J.