diff options
author | Jan Hubicka <jh@suse.cz> | 2010-04-26 15:33:24 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2010-04-26 13:33:24 +0000 |
commit | 5fefcf92fa6b75486291d2a898f9a0e4d541cf6c (patch) | |
tree | 23c770f34cffee8dfe268868d96f062a649cf2fd /gcc/tree-ssa-loop-ivopts.c | |
parent | 21aac88050970dff5e2632aa355caed48eee894c (diff) | |
download | gcc-5fefcf92fa6b75486291d2a898f9a0e4d541cf6c.zip gcc-5fefcf92fa6b75486291d2a898f9a0e4d541cf6c.tar.gz gcc-5fefcf92fa6b75486291d2a898f9a0e4d541cf6c.tar.bz2 |
cgraph.c (cgraph_create_node): Set node frequency to normal.
* cgraph.c (cgraph_create_node): Set node frequency to normal.
(cgraph_clone_node): Copy function frequency.
* cgraph.h (node_frequency): New enum
(struct cgraph_node): Add.
* final.c (rest_of_clean_state): Update.
* lto-cgraph.c (lto_output_node): Output node frequency.
(input_overwrite_node): Input node frequency.
* tre-ssa-loop-ivopts (computation_cost): Update.
* lto-streamer-out.c (output_function): Do not output function frequency.
* predict.c (maybe_hot_frequency_p): Update and handle functions executed once.
(cgraph_maybe_hot_edge_p): Likewise; use cgraph frequency instead of
attribute lookup.
(probably_never_executed_bb_p, optimize_function_for_size_p): Update.
(compute_function_frequency): Set noreturn functions to be executed once.
(choose_function_section): Update.
* lto-streamer-in.c (input_function): Do not input function frequency.
* function.c (allocate_struct_function): Do not initialize function frequency.
* function.h (function_frequency): Remove.
(struct function): Remove function frequency.
* ipa-profile.c (CGRAPH_NODE_FREQUENCY): Remove.
(try_update): Update.
* tree-inline.c (initialize_cfun): Do not update function frequency.
* passes.c (pass_init_dump_file): Update.
* i386.c (ix86_compute_frame_layout): Update.
(ix86_pad_returns): Update.
From-SVN: r158732
Diffstat (limited to 'gcc/tree-ssa-loop-ivopts.c')
-rw-r--r-- | gcc/tree-ssa-loop-ivopts.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c index f6db241..a7a9e25 100644 --- a/gcc/tree-ssa-loop-ivopts.c +++ b/gcc/tree-ssa-loop-ivopts.c @@ -2738,9 +2738,10 @@ computation_cost (tree expr, bool speed) unsigned cost; /* Avoid using hard regs in ways which may be unsupported. */ int regno = LAST_VIRTUAL_REGISTER + 1; - enum function_frequency real_frequency = cfun->function_frequency; + struct cgraph_node *node = cgraph_node (current_function_decl); + enum node_frequency real_frequency = node->frequency; - cfun->function_frequency = FUNCTION_FREQUENCY_NORMAL; + node->frequency = NODE_FREQUENCY_NORMAL; crtl->maybe_hot_insn_p = speed; walk_tree (&expr, prepare_decl_rtl, ®no, NULL); start_sequence (); @@ -2748,7 +2749,7 @@ computation_cost (tree expr, bool speed) seq = get_insns (); end_sequence (); default_rtl_profile (); - cfun->function_frequency = real_frequency; + node->frequency = real_frequency; cost = seq_cost (seq, speed); if (MEM_P (rslt)) |