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]

Re: infinite loop in calculate_global_regs_live


> hello,
> i am currently working on a port of gcc to a new platform using the
> latest snapshot of gcc-core (20010205).
> Trying to compile testsuites/gcc.c-torture/compile/920501-4.c ends up in
> an infinite loop in calculate_global_regs_live.
> 
> The produced rtl code looks quite reasonable, the problem seems to be
> that the graph of the basic_blocks contains something like a loop.
> Queuing all predecessors of the actual basic_block (at the end of the
> while loop) causes an infinite analysis of a sequence of 7 basic_blocks.
> 
> Questions: 
> Is there any prerequisite to the form of the graph of basic_blocks?
> Any proposals where i should continue digging for that bug?

Cycles in the graph are nothing special - they represent loops.

The lifeness calculation is supposed to iterate over all basic blocks till
nothing changes from one pass to the next.
The only changes that you should see are pseudo registers being noted as
live that were not noted as live before.  Since there are only a finite
number of basic blocks and a finite number of pseudo registers in a given
calculate_global_regs_live invocaton, calculate_global_regs_live should
terminate eventually.


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