[PING^4] Fix -fvar-tracking problems on big-endian systems

Richard Sandiford rsandifo@nildram.co.uk
Fri Dec 14 12:42:00 GMT 2007

Eric Botcazou <ebotcazou@libertysurf.fr> writes:
>> http://gcc.gnu.org/ml/gcc-patches/2007-11/msg00835.html
>> Fix various problems with -fvar-tracking on big-endian systems.
>> http://gcc.gnu.org/ml/gcc-patches/2007-11/msg00836.html
>> Follow-on patch to fix problems with pass-by-reference parameters
>> (affects both big- and little-endian).
> I'm not sure we want this for 4.3, these are not trivial patches and the 
> benefit doesn't look very high to me.

I think the benefit could be quite marked for big-endian systems
for -O2 -g (which is after all our library default).  The problem
is that the effect on -O2 -g itself is hard to quantify; there's no
off-the-shelf way of measuring it.  That's why I had to resort to
the two main measures I used:

  - GDB testing with an explicit -fvar-tracking.  This showed what
    I thought were pretty significant (though perhaps not massive)

  - A comparison of assembly language output at -O2 -g, which showed
    many cases where bugs in the var-tracking output (and thus
    incorrect or misleading debug information).

This is also something that might have regressed from 4.2 in some cases,
because my 2007-10-12 patch created lowparts in cases where 4.2 didn't.
(And we needed to do that to avoid a bug which I think would otherwise
still exist after your patch.  I still believe that creating lowparts
in those situations is the right thing to do, but the problem is that
var-tracking generally mishandles lowparts on big-endian systems.)

I would understand your concern if the patch affected code generation,
but the patch only really touches code related to var-tracking on
big-endian systems, which is the problem area.

I wanted to push back a little because I think the benefit is higher
than you made it sound.  If you say no again, I'll accept it.


More information about the Gcc-patches mailing list