This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: current_function -> cfun
- To: bernds at balti dot cygnus dot co dot uk
- Subject: Re: current_function -> cfun
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- Date: Sun, 19 Dec 99 07:49:10 EST
- Cc: gcc-patches at gcc dot gnu dot org
This is a first step to eliminate the accessor macros.
This is OK.
Since variable names like current_function_outgoing_args_size and the
potential replacement, current_function->outgoing_args_size, are
somewhat unwieldy, this patch renames current_function to something
shorter. I'm still open to suggestions whether a name like curr_func
would make more sense.
My suggestion for the next step is actually now to leave the accessor macros,
but convert them to upper case, so they are obviously macros. Once you do
that, the field names can have the "x_" deleted from them. Since I think
nearly all of the uses of the fields of struct function are inside the
macros, perhaps those names can be shortened even more.
! #define first_label_num (cfun->emit->x_first_label_num)
So this would become
#define FIRST_LABEL_NUM cfun->em->first_label_num
This I think isn't too unwieldly in GDB and we should perhaps write a
function to print out the non-array data in a struct function.