aboutsummaryrefslogtreecommitdiff
path: root/gcc/rtl.h
diff options
context:
space:
mode:
authorJeffrey A Law <law@cygnus.com>2000-03-17 14:40:45 -0800
committerRichard Henderson <rth@gcc.gnu.org>2000-03-17 14:40:45 -0800
commit0a1c58a25ab5df1a3e4596024774641ebae8be2a (patch)
tree720b4c50b7ea074422601de35cfc7e48ed679e49 /gcc/rtl.h
parentf1fd8077fd1260362aa134deefc197948da270f8 (diff)
downloadgcc-0a1c58a25ab5df1a3e4596024774641ebae8be2a.zip
gcc-0a1c58a25ab5df1a3e4596024774641ebae8be2a.tar.gz
gcc-0a1c58a25ab5df1a3e4596024774641ebae8be2a.tar.bz2
Sibling call optimizations.
Co-Authored-By: Richard Henderson <rth@cygnus.com> From-SVN: r32612
Diffstat (limited to 'gcc/rtl.h')
-rw-r--r--gcc/rtl.h22
1 files changed, 20 insertions, 2 deletions
diff --git a/gcc/rtl.h b/gcc/rtl.h
index 158ea7e..46750ac 100644
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -119,9 +119,12 @@ typedef struct rtx_def
#else
enum machine_mode mode : 8;
#endif
- /* LINK_COST_ZERO in an INSN_LIST. */
+ /* 1 in an INSN if it can alter flow of control
+ within this function.
+ LINK_COST_ZERO in an INSN_LIST. */
unsigned int jump : 1;
- /* LINK_COST_FREE in an INSN_LIST. */
+ /* 1 in an INSN if it can call another function.
+ LINK_COST_FREE in an INSN_LIST. */
unsigned int call : 1;
/* 1 in a MEM or REG if value of this expression will never change
during the current function, even though it is not
@@ -380,6 +383,9 @@ extern void rtvec_check_failed_bounds PARAMS ((rtvec, int,
/* 1 if insn is a call to a const function. */
#define CONST_CALL_P(INSN) ((INSN)->unchanging)
+/* 1 if insn (assumed to be a CALL_INSN) is a sibling call. */
+#define SIBLING_CALL_P(INSN) ((INSN)->jump)
+
/* 1 if insn is a branch that should not unconditionally execute its
delay slots, i.e., it is an annulled branch. */
#define INSN_ANNULLED_BRANCH_P(INSN) ((INSN)->unchanging)
@@ -1416,6 +1422,7 @@ extern int rtx_renumbered_equal_p PARAMS ((rtx, rtx));
extern int true_regnum PARAMS ((rtx));
extern int redirect_jump PARAMS ((rtx, rtx));
extern void jump_optimize PARAMS ((rtx, int, int, int));
+extern void jump_optimize_minimal PARAMS ((rtx));
extern void rebuild_jump_labels PARAMS ((rtx));
extern void thread_jumps PARAMS ((rtx, int, int));
extern int redirect_exp PARAMS ((rtx *, rtx, rtx, rtx));
@@ -1513,6 +1520,7 @@ extern void record_excess_regs PARAMS ((rtx, rtx, rtx *));
extern void reposition_prologue_and_epilogue_notes PARAMS ((rtx));
extern void thread_prologue_and_epilogue_insns PARAMS ((rtx));
extern int prologue_epilogue_contains PARAMS ((rtx));
+extern int sibcall_epilogue_contains PARAMS ((rtx));
extern HOST_WIDE_INT get_frame_size PARAMS ((void));
extern void preserve_rtl_expr_result PARAMS ((rtx));
extern void mark_temp_addr_taken PARAMS ((rtx));
@@ -1713,6 +1721,16 @@ extern void record_base_value PARAMS ((int, rtx, int));
extern void record_alias_subset PARAMS ((int, int));
extern rtx addr_side_effect_eval PARAMS ((rtx, int, int));
+/* In sibcall.c */
+typedef enum {
+ sibcall_use_normal = 1,
+ sibcall_use_tail_recursion,
+ sibcall_use_sibcall
+} sibcall_use_t;
+
+extern void optimize_sibling_and_tail_recursive_calls PARAMS ((void));
+extern void replace_call_placeholder PARAMS ((rtx, sibcall_use_t));
+
#ifdef STACK_REGS
extern int stack_regs_mentioned PARAMS ((rtx insn));
#endif