Live range splitting in new allocator
Joe Buck
jbuck@racerx.synopsys.com
Tue Jan 30 14:03:00 GMT 2001
I wrote:
> > For floating point on IEEE platforms, it's easy enough: use a NaN.
> > However, for variables that are used as boolean values (whether a C++ bool
> > or a C int used as a flag), you'll make things more deterministic than
> > before: an uninitialized Boolean auto variable used to be random, under your
> > proposal it will always be true.
Alexandre writes:
> How about using some bit in the return value of random() instead? :-)
How about using whatever bit happens to be in the uninitialized variable
instead? :-)
Seriously, though, Robert does have a point; the perfect can be the enemy
of the good. And I've even used the technique back when I did embedded
systems stuff, initializing "uninitialized memory" to 0xdeadbeef because
it looked cool on the screen of our emulator:
001000 DEAD BEEF DEAD BEEF ....
...
But it's important not to expect too much from it other than for floats
where the NaN concept exists.
More information about the Gcc
mailing list