[patch] Put some global vars into crtl

Steven Bosscher stevenb.gcc@gmail.com
Sun Jun 24 03:19:00 GMT 2012


Hello,

There are three global variables defined in function.c and exported
via output.h: current_function_is_leaf,
current_function_sp_is_unchanging, and
current_function_uses_only_leaf_regs. All 3 can be added to crtl. The
patch is large but mechanical.  The most interesting part of the
ChangeLog is:

        * output.h: (current_function_is_leaf,
        current_function_sp_is_unchanging,
        current_function_uses_only_leaf_regs): Remove.
        * function.c (current_function_is_leaf,
        current_function_sp_is_unchanging,
        current_function_uses_only_leaf_regs): Remove.
        (rest_of_handle_check_leaf_regs): Set crtl->uses_only_leaf_regs
        instead of current_function_uses_only_leaf_regs.
        * function.h (struct rtl_data): New fields sp_is_unchanging,
        is_leaf, uses_only_leaf_regs.

The rest is just replacing those variables with crtl->thing references.

This brings output.h closer to where I want it to be: Only export
things defined in varasm.c and final.c. Just two more functions to
go...

Bootstapped&tested on powerpc64-unknown-linux-gnu. OK for trunk?

Ciao!
Steven
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cleanup_curfun_vars.diff
Type: application/octet-stream
Size: 55872 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20120624/afb944f3/attachment.obj>


More information about the Gcc-patches mailing list