public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* selective scheduler failure
@ 2012-07-17 15:53 Alex Turjan
  0 siblings, 0 replies; 7+ messages in thread
From: Alex Turjan @ 2012-07-17 15:53 UTC (permalink / raw)
  To: gcc, amonakov

Hi,
I get an assert failure during a run of the selective scheduler.
The problem is due to the implementation of maybe_tidy_empty_bb.
Inside of it I see the following piece of code:

/* If it is possible - merge BB with its predecessor. */
if (can_merge_blocks_p (bb->prev_bb, bb))
sel_merge_blocks (bb->prev_bb, bb);


During my compiler run I reach the situation in which bb->prev_bb is not in the
scheduling scope BUT can_merge_blocks_p (bb->prev_bb, bb) returns true.

As a consequence inside sel_remove_empty_bb I hit on the following assert:
gcc_assert (in_current_region_p (merge_bb));

The backtrace from the assert is: 
#0 move_bb_info 
#1 sel_remove_empty_bb
#2 sel_merge_blocks
#3 maybe_tidy_empty_bb 

Perhaps one way to solve the problem is to replace:
if (can_merge_blocks_p (bb->prev_bb, bb))
with
if (can_merge_blocks_p (bb->prev_bb, bb) && in_current_region_p (bb->prev_bb))

I added this description to buggzila under Bug 53999.

regards,
Alex

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: selective scheduler failure
  2012-07-17 22:42         ` Alexander Monakov
@ 2012-07-18  7:10           ` Alex Turjan
  0 siblings, 0 replies; 7+ messages in thread
From: Alex Turjan @ 2012-07-18  7:10 UTC (permalink / raw)
  To: Alexander Monakov; +Cc: Alexander Monakov, gcc

I applied the new patch and it seams fine. 
Thanks!
Alex 


--- On Wed, 7/18/12, Alexander Monakov <amonakov@ispras.ru> wrote:

> From: Alexander Monakov <amonakov@ispras.ru>
> Subject: Re: selective scheduler failure
> To: "Alex Turjan" <aturjan@yahoo.com>
> Cc: "Alexander Monakov" <monoid@ispras.ru>, gcc@gcc.gnu.org
> Date: Wednesday, July 18, 2012, 1:42 AM
> On Wed, Jul 18, 2012 at 1:05 AM, Alex
> Turjan <aturjan@yahoo.com>
> wrote:
> > I found the patch from the following link:
> > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52250
> 
> See comment 9. The patch pasted in the audit trail is not
> what has
> been committed.
> 
> Alexander
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: selective scheduler failure
  2012-07-17 21:05       ` Alex Turjan
@ 2012-07-17 22:42         ` Alexander Monakov
  2012-07-18  7:10           ` Alex Turjan
  0 siblings, 1 reply; 7+ messages in thread
From: Alexander Monakov @ 2012-07-17 22:42 UTC (permalink / raw)
  To: Alex Turjan; +Cc: Alexander Monakov, gcc

On Wed, Jul 18, 2012 at 1:05 AM, Alex Turjan <aturjan@yahoo.com> wrote:
> I found the patch from the following link:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52250

See comment 9. The patch pasted in the audit trail is not what has
been committed.

Alexander

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: selective scheduler failure
  2012-07-17 16:57     ` Alexander Monakov
@ 2012-07-17 21:05       ` Alex Turjan
  2012-07-17 22:42         ` Alexander Monakov
  0 siblings, 1 reply; 7+ messages in thread
From: Alex Turjan @ 2012-07-17 21:05 UTC (permalink / raw)
  To: Alexander Monakov; +Cc: gcc

I found the patch from the following link:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52250
But i dont see the removal of the assert in move_bb_info.
Perhaps you have another patch related to this bug.
thanks
Alex

--- On Tue, 7/17/12, Alexander Monakov <amonakov@ispras.ru> wrote:

> From: Alexander Monakov <amonakov@ispras.ru>
> Subject: Re: selective scheduler failure
> To: "Alex Turjan" <aturjan@yahoo.com>
> Cc: gcc@gcc.gnu.org
> Date: Tuesday, July 17, 2012, 7:57 PM
> On Tue, Jul 17, 2012 at 8:39 PM, Alex
> Turjan <aturjan@yahoo.com>
> wrote:
> >
> > Hi,
> > I tried the patch but it doesnt solve my problem.
> > The patch addresses the problem on the else branch but
> my problem is on the if:
> > if (can_merge_blocks_p (bb->prev_bb, bb))
> >     sel_merge_blocks ...
> 
> I don't understand. You said earlier that the assert in
> move_bb_info
> failed, but the patch removes that assert. So how does the
> failure
> look now? Can you provide a reproducible testcase?
> 
> Alexander
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: selective scheduler failure
  2012-07-17 16:39   ` Alex Turjan
@ 2012-07-17 16:57     ` Alexander Monakov
  2012-07-17 21:05       ` Alex Turjan
  0 siblings, 1 reply; 7+ messages in thread
From: Alexander Monakov @ 2012-07-17 16:57 UTC (permalink / raw)
  To: Alex Turjan; +Cc: gcc

On Tue, Jul 17, 2012 at 8:39 PM, Alex Turjan <aturjan@yahoo.com> wrote:
>
> Hi,
> I tried the patch but it doesnt solve my problem.
> The patch addresses the problem on the else branch but my problem is on the if:
> if (can_merge_blocks_p (bb->prev_bb, bb))
>     sel_merge_blocks ...

I don't understand. You said earlier that the assert in move_bb_info
failed, but the patch removes that assert. So how does the failure
look now? Can you provide a reproducible testcase?

Alexander

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: selective scheduler failure
  2012-07-17 16:07 ` Alexander Monakov
@ 2012-07-17 16:39   ` Alex Turjan
  2012-07-17 16:57     ` Alexander Monakov
  0 siblings, 1 reply; 7+ messages in thread
From: Alex Turjan @ 2012-07-17 16:39 UTC (permalink / raw)
  To: Alexander Monakov; +Cc: gcc

Hi,
I tried the patch but it doesnt solve my problem.
The patch addresses the problem on the else branch but my problem is on the if:
if (can_merge_blocks_p (bb->prev_bb, bb))
    sel_merge_blocks ...

Alex

--- On Tue, 7/17/12, Alexander Monakov <amonakov@ispras.ru> wrote:

> From: Alexander Monakov <amonakov@ispras.ru>
> Subject: Re: selective scheduler failure
> To: "Alex Turjan" <aturjan@yahoo.com>
> Cc: gcc@gcc.gnu.org
> Date: Tuesday, July 17, 2012, 7:07 PM
> > As a consequence inside
> sel_remove_empty_bb I hit on the following assert:
> > gcc_assert (in_current_region_p (merge_bb));
> 
> Sounds like your GCC tree does not have Andrey's fix for PR
> 52250 (SVN
> revision 184975).
> 
> Alexander
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: selective scheduler failure
       [not found] <1342538998.98071.YahooMailClassic@web125505.mail.ne1.yahoo.com>
@ 2012-07-17 16:07 ` Alexander Monakov
  2012-07-17 16:39   ` Alex Turjan
  0 siblings, 1 reply; 7+ messages in thread
From: Alexander Monakov @ 2012-07-17 16:07 UTC (permalink / raw)
  To: Alex Turjan; +Cc: gcc

> As a consequence inside sel_remove_empty_bb I hit on the following assert:
> gcc_assert (in_current_region_p (merge_bb));

Sounds like your GCC tree does not have Andrey's fix for PR 52250 (SVN
revision 184975).

Alexander

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-07-18  7:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-17 15:53 selective scheduler failure Alex Turjan
     [not found] <1342538998.98071.YahooMailClassic@web125505.mail.ne1.yahoo.com>
2012-07-17 16:07 ` Alexander Monakov
2012-07-17 16:39   ` Alex Turjan
2012-07-17 16:57     ` Alexander Monakov
2012-07-17 21:05       ` Alex Turjan
2012-07-17 22:42         ` Alexander Monakov
2012-07-18  7:10           ` Alex Turjan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).