This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix PR57268
- From: Steven Bosscher <stevenb dot gcc at gmail dot com>
- To: Dinar Temirbulatov <dinar at kugelworks dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 29 May 2013 14:52:45 +0200
- Subject: Re: Fix PR57268
- References: <CANoaTN01FcHx-OQLujvAwD6N8A0f_7UOzcY1_5DofqABTycCRQ at mail dot gmail dot com>
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 ;-)
Ciao!
Steven