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/final.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/final.c')
-rw-r--r-- | gcc/final.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/gcc/final.c b/gcc/final.c index c76f654..a0adcbe 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -170,10 +170,6 @@ char regs_ever_live[FIRST_PSEUDO_REGISTER]; int frame_pointer_needed; -/* Assign unique numbers to labels generated for profiling. */ - -int profile_label_no; - /* Number of unmatched NOTE_INSN_BLOCK_BEG notes we have seen. */ static int block_depth; @@ -1595,7 +1591,7 @@ profile_function (file) #ifndef NO_PROFILE_COUNTERS data_section (); ASM_OUTPUT_ALIGN (file, floor_log2 (align / BITS_PER_UNIT)); - ASM_OUTPUT_INTERNAL_LABEL (file, "LP", profile_label_no); + ASM_OUTPUT_INTERNAL_LABEL (file, "LP", current_function_profile_label_no); assemble_integer (const0_rtx, LONG_TYPE_SIZE / BITS_PER_UNIT, align, 1); #endif @@ -1625,7 +1621,7 @@ profile_function (file) #endif #endif - FUNCTION_PROFILER (file, profile_label_no); + FUNCTION_PROFILER (file, current_function_profile_label_no); #if defined(STATIC_CHAIN_INCOMING_REGNUM) && defined(ASM_OUTPUT_REG_PUSH) if (cxt) @@ -1675,8 +1671,6 @@ final_end_function () && dwarf2out_do_frame ()) dwarf2out_end_epilogue (); #endif - - profile_label_no++; } /* Output assembler code for some insns: all or part of a function. |