regno_reg_rtx and related macros

Joern Rennecke amylaar@cygnus.co.uk
Sat Dec 18 09:49:00 GMT 1999


> I think these are *very bad* ideas.  For one thing, the convention is that
> macros be upper case.  But much more importantly, it means that you can't
> simply print the expression in GDB: you need to know the full name.

Seconded.
FWIW I think cur_insn_uid is even more important than regno_reg_rtx.

> Why was this done in the first place?  It seems a major step backward to me.
> If we do want to do this rename, I think we have to do it that way: not as
> a macro.

AFAIK it was supposed to make switching between functions easier and more
bullet-proof, and garbage collection a bit easier.
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.



More information about the Gcc mailing list