This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Problem with the special live analyzer in global alloc


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-


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]