summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog13
-rw-r--r--gcc/calls.c3
-rw-r--r--gcc/cfgbuild.c2
-rw-r--r--gcc/cfgcleanup.c5
-rw-r--r--gcc/function.c2
-rw-r--r--gcc/function.h4
6 files changed, 24 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index da1b3f54a5f..6a8f85a7012 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,16 @@
+Fri Oct 11 22:22:38 CEST 2002 Jan Hubicka <jh@suse.cz>
+
+ * calls.c (expand_call): Simplify noreturn call.
+
+ PR c/7344
+ * cfgbuild.c (make_edges): Create edge cache when we do have
+ large jumptable.
+ (do_tablejump): Note size of maximal jumptable.
+ * function.c (prepare_function_start): Zero out size.
+ * function.h (function): Add max_jumptable_ents.
+
+ * cfgcleanup.c (insn_match_p): Verify sibcall flag for calls to.
+
Fri Oct 11 12:34:33 2002 J"orn Rennecke <joern.rennecke@superh.com>
* sh.md (movv8qi_i+2): For V8QI destinations, generate V4HI
diff --git a/gcc/calls.c b/gcc/calls.c
index d706751c162..903ddc17fe9 100644
--- a/gcc/calls.c
+++ b/gcc/calls.c
@@ -2459,8 +2459,7 @@ expand_call (exp, target, ignore)
reload insns generated to fix things up would appear
before the sibcall_epilogue. */
|| fndecl == NULL_TREE
- || (flags & (ECF_RETURNS_TWICE | ECF_LONGJMP))
- || TREE_THIS_VOLATILE (fndecl)
+ || (flags & (ECF_RETURNS_TWICE | ECF_LONGJMP | ECF_NORETURN))
|| !FUNCTION_OK_FOR_SIBCALL (fndecl)
/* If this function requires more stack slots than the current
function, we cannot change it into a sibling call. */
diff --git a/gcc/cfgbuild.c b/gcc/cfgbuild.c
index 97552f9afd9..9ac758b2809 100644
--- a/gcc/cfgbuild.c
+++ b/gcc/cfgbuild.c
@@ -292,7 +292,7 @@ make_edges (label_value_list, min, max, update_p)
/* Heavy use of computed goto in machine-generated code can lead to
nearly fully-connected CFGs. In that case we spend a significant
amount of time searching the edge lists for duplicates. */
- if (forced_labels || label_value_list)
+ if (forced_labels || label_value_list || cfun->max_jumptable_ents > 100)
{
edge_cache = sbitmap_vector_alloc (last_basic_block, last_basic_block);
sbitmap_vector_zero (edge_cache, last_basic_block);
diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c
index c706ed774e4..594eb5cebd7 100644
--- a/gcc/cfgcleanup.c
+++ b/gcc/cfgcleanup.c
@@ -911,8 +911,9 @@ insns_match_p (mode, i1, i2)
equal, they were constructed identically. */
if (GET_CODE (i1) == CALL_INSN
- && !rtx_equal_p (CALL_INSN_FUNCTION_USAGE (i1),
- CALL_INSN_FUNCTION_USAGE (i2)))
+ && (!rtx_equal_p (CALL_INSN_FUNCTION_USAGE (i1),
+ CALL_INSN_FUNCTION_USAGE (i2))
+ || SIBLING_CALL_P (i1) != SIBLING_CALL_P (i2)))
return false;
#ifdef STACK_REGS
diff --git a/gcc/function.c b/gcc/function.c
index d39fca3b4f9..479ecef4141 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -6295,6 +6295,8 @@ prepare_function_start ()
cfun->function_frequency = FUNCTION_FREQUENCY_NORMAL;
+ cfun->max_jumptable_ents = 0;
+
(*lang_hooks.function.init) (cfun);
if (init_machine_status)
cfun->machine = (*init_machine_status) ();
diff --git a/gcc/function.h b/gcc/function.h
index c7a5e5e7e3b..89319ebf2e3 100644
--- a/gcc/function.h
+++ b/gcc/function.h
@@ -500,6 +500,10 @@ struct function GTY(())
(set only when profile feedback is available). */
FUNCTION_FREQUENCY_HOT
} function_frequency;
+
+ /* Maximal number of entities in the single jumptable. Used to estimate
+ final flowgraph size. */
+ int max_jumptable_ents;
};
/* The function currently being compiled. */