regno_reg_rtx and related macros

Bernd Schmidt bernds@balti.cygnus.co.uk
Sat Dec 18 11:20:00 GMT 1999


> I think we should rather have a function that is used for every switch,
> I.e. copy the separate global variables into current_function->emit,
> change current_function, copy current_function->emit into the separate
> global variables, and zero out any pointers in current_funtion->emit that
> we copied out (to avoid garbage collection following stale roots).
> 
> To make garbage collection work, every pointer that is made into a global
> variable again has also to be registered as a gc root.

Sounds exactly like the mess we used to have.  IMO small inconveniences in
debugging don't outweigh the benefit of having much simpler code in the
compiler.

I do agree that we should get rid of the macros.  Introducing them was
mainly a way to keep the patches small.  I'll try to come up with patches
to eliminate them soon.  At that point, I'll also change "current_function"
to have a shorter name (I think we agreed on "cfun" last time this was
discussed - right?), so we'll have less to type when debugging.

Bernd



More information about the Gcc mailing list