diff options
author | Alan Modra <amodra@bigpond.net.au> | 2002-04-23 07:20:55 +0000 |
---|---|---|
committer | Alan Modra <amodra@gcc.gnu.org> | 2002-04-23 16:50:55 +0930 |
commit | f6f315fe1143ddf98f1eb66becabbb10aa92e0a3 (patch) | |
tree | fdb47569e86fdbcfcd516dea2f4adaa666e43043 /gcc/function.c | |
parent | 878a19ebe2b42ac126f62e4f3d3d2d70f0be26c2 (diff) | |
download | gcc-f6f315fe1143ddf98f1eb66becabbb10aa92e0a3.zip gcc-f6f315fe1143ddf98f1eb66becabbb10aa92e0a3.tar.gz gcc-f6f315fe1143ddf98f1eb66becabbb10aa92e0a3.tar.bz2 |
re PR target/6413 (PROFILE_HOOK label_no)
PR target/6413
* function.h: (struct function): Add profile_label_no field.
(current_function_profile_label_no): Define.
* function.c: (profile_label_no): New static var.
(expand_function_start): Increment it, and copy to
current_function_profile_label_no.
* output.h (profile_label_no): Delete.
* final.c (profile_label_no): Delete.
(profile_function): Use current_function_profile_label_no.
(final_end_function): Don't increment profile_label_no here.
* config/i386/i386.c (ix86_osf_output_function_prologue): Replace
profile_label_no with current_function_profile_label_no.
* config/pa/pa.c (current_function_number): Delete.
(pa_output_function_prologue): Don't output profile label here.
(hppa_profile_hook): Use label_no param rather than
current_function_number.
(FUNC_BEGIN_PROLOG_LABEL): Move to ..
* config/pa/pa.h: .. here.
(FUNCTION_PROFILER): Output profile label here.
From-SVN: r52656
Diffstat (limited to 'gcc/function.c')
-rw-r--r-- | gcc/function.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/function.c b/gcc/function.c index 5904919..56e9014 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -124,6 +124,9 @@ int current_function_uses_only_leaf_regs; post-instantiation libcalls. */ int virtuals_instantiated; +/* Assign unique numbers to labels generated for profiling. */ +static int profile_label_no; + /* These variables hold pointers to functions to create and destroy target specific, per-function data structures. */ void (*init_machine_status) PARAMS ((struct function *)); @@ -6684,10 +6687,13 @@ expand_function_start (subr, parms_have_cleanups) Pmode); } -#ifdef PROFILE_HOOK if (current_function_profile) - PROFILE_HOOK (profile_label_no); + { + current_function_profile_label_no = profile_label_no++; +#ifdef PROFILE_HOOK + PROFILE_HOOK (current_function_profile_label_no); #endif + } /* After the display initializations is where the tail-recursion label should go, if we end up needing one. Ensure we have a NOTE here |