public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Problem with the special live analyzer in global alloc
@ 2005-08-16 13:52 Andreas Krebbel
  2005-08-16 14:14 ` Daniel Berlin
  2005-09-23 13:55 ` Andreas Krebbel
  0 siblings, 2 replies; 18+ messages in thread
From: Andreas Krebbel @ 2005-08-16 13:52 UTC (permalink / raw)
  To: gcc; +Cc: vmakarov

Hello,

the 920501-4.c testcase currently fails on s390x with a
"fatal error: internal consistency failure" in reg rename.

The example uses an uninitialized variable. Normal live analysis
consideres this variable to be live over all basic blocks.
But global alloc uses a special liveness checker considering
variables which are read uninitialized to never conflict with others.
In the example an uninitialized variable is assigned to the same hard register
as a pseudo assigned by local alloc. This leads to an ICE when the
normal live analysis is used for consistency checks as it is done in
reg rename.

Consider the locally allocated hard reg to be r1 in basic block 1. bb1
contains an insn setting r1 and another using and clobbering it. 
Live analysis recognizes r1 to be dead at the begin of bb1 and after
the insn clobbering r1.
If r1 is also used for the uninitialized variable, r1 is live at the
end of bb1! Reg rename now renames r1 locally to r2 and re-performs
live analysis in order to check whether the local change has global
impact. Because r1 is not used anymore in bb1 and is live at end it
has to be considered live at start too. Hence the live at start
register set has changed which triggers the ICE.

As already stated I think that the usage of different algorithms for
calculating live info causes the problem. Is there a reason that the
live analysis used by global alloc isn't used everywhere?


Bye,

-Andreas-

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

end of thread, other threads:[~2005-10-14  8:18 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-16 13:52 Problem with the special live analyzer in global alloc Andreas Krebbel
2005-08-16 14:14 ` Daniel Berlin
2005-08-23 14:44   ` Andreas Krebbel
2005-08-23 14:57     ` Bernd Schmidt
2005-08-23 15:08       ` Daniel Berlin
2005-08-23 15:13         ` Bernd Schmidt
2005-08-23 15:40           ` Steven Bosscher
2005-08-23 19:32             ` Bernd Schmidt
2005-08-24  4:10               ` Peter Bergner
2005-08-24  7:47                 ` Daniel Berlin
2005-08-24 13:49                   ` Peter Bergner
2005-08-24 14:31                     ` Daniel Berlin
2005-08-23 15:44           ` Daniel Berlin
2005-08-23 18:15       ` James E Wilson
2005-09-23 13:55 ` Andreas Krebbel
2005-09-23 14:06   ` Daniel Berlin
2005-10-13 11:51     ` [RFC] Don't emit REG_DEAD for clobbers if reg stays live Andreas Krebbel
2005-10-14 11:41       ` [RFC] Flow: Handle CLOBBERs like SETs if the " Andreas Krebbel

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).