diff options
author | Alex Samuel <samuel@gcc.gnu.org> | 2000-04-06 21:22:49 +0000 |
---|---|---|
committer | Alex Samuel <samuel@gcc.gnu.org> | 2000-04-06 21:22:49 +0000 |
commit | 4e872036e8a62e1b7c3dbfa54cc7584fd61831b2 (patch) | |
tree | 03b76aa3f87cb424bd3389a8c22d97e1312c57ac /gcc/toplev.c | |
parent | 2c561874133f1756d49d993d7561a802bd8448eb (diff) | |
download | gcc-4e872036e8a62e1b7c3dbfa54cc7584fd61831b2.zip gcc-4e872036e8a62e1b7c3dbfa54cc7584fd61831b2.tar.gz gcc-4e872036e8a62e1b7c3dbfa54cc7584fd61831b2.tar.bz2 |
rtl.h (INSN_P): New macro.
* rtl.h (INSN_P): New macro.
(successor_phi_fn): New typedef.
(for_each_successor_phi): New prototype.
(in_ssa_form): New variable.
(PHI_NODE_P): Likewise.
* flow.c (calculate_global_regs_live): Add to new_live_at_end from
phi nodes in successors.
(mark_used_regs): Add PHI case.
(set_phi_alternative_reg): New function.
(life_analysis): Assert that dead code elimination is not selected
when in SSA form.
* toplev.c (to_ssa_time): New variable.
(from_ssa_time): Likewise.
(compile_file): Zero to_ssa_time and from_ssa_time.
Print time to convert to and from SSA.
(rest_of_compilation): Time convert_to_ssa and convert_from_ssa.
(print_time): Compute percent fraction as integer.
* ssa.c (PHI_NODE_P): Moved to rtl.h.
(convert_to_ssa): Check if we're already in SSA.
Don't eliminate dead code in life_analysis.
Rerun flow and life analysis at bottom.
(eliminate_phi): Use canonical regnos when adding nodes.
(mark_reg_in_phi): New function.
(mark_phi_and_copy_regs): Likewise.
(convert_from_ssa): Rerun life analysis at top.
Use coalesced partition.
Check for removing a phi node at the end of the block.
(compute_coalesced_reg_partition): New function.
(coalesce_regs_in_copies): Likewise.
(coalesce_reg_in_phi): Likewise.
(coalesce_regs_in_sucessor_phi_nodes): Likewise.
(for_each_successor_phi): Likewise.
(rename_context): New struct.
(rename_block): Use a rename_context with rename_insn_1. When
renaming sets of a subreg, emit a copy of the entire reg first.
(rename_insn_1): Treat data as a rename_context *. Save current
insn in set_data.
(rename_set_data): Add field set_insn.
* Makefile.in (HASHTAB_H): Move up in file.
(OBSTACK_H): New macro.
(collect2.o): Use OBSTACK_H in dependencies.
(sdbout.o): Likewise.
(emit-rtl.o): Likewise.
(simplify-rtx.o): Likewise.
(fix-header.o): Likewise.
(OBJS): Add conflict.o.
(conflict.o): New rule.
* basic-block.h: Include partition.h.
(conflict_graph): New typedef.
(conflict_graph_enum_fn): Likewise.
(conflict_graph_new): New prototype.
(conflict_graph_delete): Likewise.
(conflict_graph_add): Likewise.
(conflict_graph_conflict_p): Likewise.
(conflict_graph_enum): Likewise.
(conflict_graph_merge_regs): Likewise.
(conflict_graph_print): Likewise.
(conflict_graph_compute): Likewise.
* conflict.c: New file.
From-SVN: r32979
Diffstat (limited to 'gcc/toplev.c')
-rw-r--r-- | gcc/toplev.c | 34 |
1 files changed, 30 insertions, 4 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c index 920dba5..df5a764 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -1426,6 +1426,8 @@ int reorder_blocks_time; int rename_registers_time; int shorten_branch_time; int stack_reg_time; +int to_ssa_time; +int from_ssa_time; int final_time; int symout_time; int dump_time; @@ -1510,9 +1512,9 @@ print_time (str, total) int total; { fprintf (stderr, - "time in %s: %d.%06d (%.0f%%)\n", + "time in %s: %d.%06d (%d%%)\n", str, total / 1000000, total % 1000000, - all_time == 0 ? 0.00 : (double) total / (double) all_time * 100.0); + all_time == 0 ? 0 : (100 * total) / all_time); } /* This is the default decl_printable_name function. */ @@ -1890,6 +1892,26 @@ close_dump_file (index, func, insns) }); } +/* Routine to empty a dump file. */ +static void +clean_dump_file (suffix) + const char *suffix; +{ + char * const dumpname = concat (dump_base_name, suffix, NULL); + + rtl_dump_file = fopen (dumpname, "w"); + + if (rtl_dump_file == NULL) + pfatal_with_name (dumpname); + + free (dumpname); + + fclose (rtl_dump_file); + rtl_dump_file = NULL; + + return; +} + /* Do any final processing required for the declarations in VEC, of which there are LEN. We write out inline functions and variables that have been deferred until this point, but which are required. @@ -2176,6 +2198,8 @@ compile_file (name) rename_registers_time = 0; shorten_branch_time = 0; stack_reg_time = 0; + to_ssa_time = 0; + from_ssa_time = 0; final_time = 0; symout_time = 0; dump_time = 0; @@ -2559,6 +2583,8 @@ compile_file (name) print_time ("integration", integration_time); print_time ("jump", jump_time); print_time ("cse", cse_time); + print_time ("to ssa", to_ssa_time); + print_time ("from ssa", from_ssa_time); print_time ("gcse", gcse_time); print_time ("loop", loop_time); print_time ("cse2", cse2_time); @@ -3032,11 +3058,11 @@ rest_of_compilation (decl) if (flag_ssa) { open_dump_file (DFI_ssa, decl); - convert_to_ssa (); + TIMEVAR (to_ssa_time, convert_to_ssa ()); close_dump_file (DFI_ssa, print_rtl_with_bb, insns); open_dump_file (DFI_ussa, decl); - convert_from_ssa (); + TIMEVAR (from_ssa_time, convert_from_ssa ()); /* New registers have been created. Rescan their usage. */ reg_scan (insns, max_reg_num (), 1); close_dump_file (DFI_ussa, print_rtl_with_bb, insns); |