[fpc-devel] crash with -gt -O2 (regvar) in trunk

Jonas Maebe jonas.maebe at elis.ugent.be
Mon Jun 7 18:44:13 CEST 2010


On 07 Jun 2010, at 18:40, Martin wrote:

> In this case the result should be the same, and since both cases are using both registers, the 2 registers should in both cases be avail for usage.
> 
> I wonder if in other cases, eax may drop in for edx (or vice versa) where it may cause a proble (data replaced?)
> 
> The question is, should -gt have caused this change?

The register allocator uses a graph colouring algorithm. It can easily produce slightly different but equivalent register allocations when the graphs change (i.e., when more virtual registers are used, e.g. because of extra initialisation code). So yes, it is entirely expected that such changes occur with -gt.


Jonas


More information about the fpc-devel mailing list