aboutsummaryrefslogtreecommitdiff
path: root/gcc/function.c
diff options
context:
space:
mode:
authorJohn Wehle <john@feith.com>1999-04-18 13:09:37 +0000
committerJohn Wehle <wehle@gcc.gnu.org>1999-04-18 13:09:37 +0000
commit54ff41b717adbdea60052aaf1ae686b518acbffb (patch)
tree266e9b6a151a15a5ac1a49e1ec8038fde7907520 /gcc/function.c
parentfbdd0024110fbdc960e21862e5df7bd2e508afc9 (diff)
downloadgcc-54ff41b717adbdea60052aaf1ae686b518acbffb.zip
gcc-54ff41b717adbdea60052aaf1ae686b518acbffb.tar.gz
gcc-54ff41b717adbdea60052aaf1ae686b518acbffb.tar.bz2
output.h (current_function_is_leaf, [...]): Declare.
* output.h (current_function_is_leaf, current_function_uses_only_leaf_regs): Declare. * function.c (current_function_is_leaf, current_function_uses_only_leaf_regs): Define. (init_function_start): Initialize current_function_is_leaf and current_function_uses_only_leaf_regs. * final.c (leaf_function): Don't define. (final_start_function): Replace uses of leaf_function with current_function_uses_only_leaf_regs. * toplev.c (rest_of_compilation): Set current_function_is_leaf prior to invoking local register allocation. (rest_of_compilation): Replace uses of leaf_function with current_function_uses_only_leaf_regs. * dbxout.c (dbxout_symbol, dbxout_parms): Likewise. * dwarf2out.c (add_location_or_const_vaule_attribute): Likewise. * dwarfout.c (add_location_or_const_value_attribute): Likewise. * sdbout.c (sdbout_symbol): Likewise. * sparc.h (FUNCTION_PROLOGUE, FUNCTION_EPILOGUE): Likewise. * sparc.c (eligible_for_epilogue_delay, output_return, sparc_return_peephole_ok): Likewise. * sparc.md (leaf_function attribute, untyped_return): Likewise. * i386.c (ix86_compute_frame_size): Don't align the stack for leaf functions which don't allocate any stack slots. * tm.texi: Update documentation. From-SVN: r26538
Diffstat (limited to 'gcc/function.c')
-rw-r--r--gcc/function.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/function.c b/gcc/function.c
index ac55f3a..3035786 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -140,12 +140,25 @@ int current_function_has_nonlocal_goto;
int current_function_contains_functions;
+/* Nonzero if function being compiled doesn't contain any calls
+ (ignoring the prologue and epilogue). This is set prior to
+ local register allocation and is valid for the remaining
+ compiler passes. */
+
+int current_function_is_leaf;
+
/* Nonzero if function being compiled doesn't modify the stack pointer
(ignoring the prologue and epilogue). This is only valid after
life_analysis has run. */
int current_function_sp_is_unchanging;
+/* Nonzero if the function being compiled is a leaf function which only
+ uses leaf registers. This is valid after reload (specifically after
+ sched2) and is useful only if the port defines LEAF_REGISTERS. */
+
+int current_function_uses_only_leaf_regs;
+
/* Nonzero if the function being compiled issues a computed jump. */
int current_function_has_computed_jump;
@@ -5897,7 +5910,9 @@ init_function_start (subr, filename, line)
current_function_has_nonlocal_label = 0;
current_function_has_nonlocal_goto = 0;
current_function_contains_functions = 0;
+ current_function_is_leaf = 0;
current_function_sp_is_unchanging = 0;
+ current_function_uses_only_leaf_regs = 0;
current_function_has_computed_jump = 0;
current_function_is_thunk = 0;