re PR c/7344 (performance regression on huge case statements)
* 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. From-SVN: r58063
This commit is contained in:
parent
ca91148bcd
commit
db6556348d
@ -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
|
||||
|
@ -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. */
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
@ -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) ();
|
||||
|
@ -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. */
|
||||
|
Loading…
Reference in New Issue
Block a user