Commit f6db1481 by Richard Henderson Committed by Richard Henderson

passes.c: New file.

        * passes.c: New file.
        * Makefile.in (OBJS-common): Add it.
        * diagnostic.c (rtl_dump_and_exit): Move decl ...
        * flags.h (rtl_dump_and_exit): ... here.
        * output.h (size_directive_output, last_assemble_variable_decl):
        Move from toplev.c.
        * rtl.h (reg_alloc): Move from toplev.c.
        * toplev.c (HAVE_conditional_execution, DUMPFILE_FORMAT,
        struct dump_file_info, enum dump_file_index, dump_file_tbl,
        open_dump_file, close_dump_file, rest_of_decl_compilation,
        rest_of_type_compilation, rest_of_handle_final,
        rest_of_handle_delay_slots, rest_of_handle_stack_regs,
        rest_of_handle_variable_tracking, rest_of_handle_machine_reorg,
        rest_of_handle_new_regalloc, rest_of_handle_old_regalloc,
        rest_of_handle_regrename, rest_of_handle_reorder_blocks,
        rest_of_handle_sched, rest_of_handle_sched2, rest_of_handle_regmove,
        rest_of_handle_tracer, rest_of_handle_if_conversion,
        rest_of_handle_if_after_combine, rest_of_handle_web,
        rest_of_handle_branch_prob,
        rest_of_handle_value_profile_transformations, rest_of_handle_cfg,
        rest_of_handle_addressof, rest_of_handle_sibling_calls,
        rest_of_handle_jump_bypass, rest_of_handle_inlining,
        rest_of_handle_null_pointer, rest_of_handle_combine,
        rest_of_handle_life, rest_of_handle_cse, rest_of_handle_cse2,
        rest_of_handle_gcse, rest_of_handle_loop_optimize,
        rest_of_handle_loop2, rest_of_compilation): Move to passes.c.
        (decode_d_option): Use enable_rtl_dump_file.
        (compile_file, finalize, do_compile): Move profile+combine+graph
        cleanup to finish_optimization_passes.
        * toplev.h (init_optimization_passes, finish_optimization_passes,
        enable_rtl_dump_file): Declare.

From-SVN: r78561
parent d0d48b17
2004-02-27 Richard Henderson <rth@redhat.com>
* passes.c: New file.
* Makefile.in (OBJS-common): Add it.
* diagnostic.c (rtl_dump_and_exit): Move decl ...
* flags.h (rtl_dump_and_exit): ... here.
* output.h (size_directive_output, last_assemble_variable_decl):
Move from toplev.c.
* rtl.h (reg_alloc): Move from toplev.c.
* toplev.c (HAVE_conditional_execution, DUMPFILE_FORMAT,
struct dump_file_info, enum dump_file_index, dump_file_tbl,
open_dump_file, close_dump_file, rest_of_decl_compilation,
rest_of_type_compilation, rest_of_handle_final,
rest_of_handle_delay_slots, rest_of_handle_stack_regs,
rest_of_handle_variable_tracking, rest_of_handle_machine_reorg,
rest_of_handle_new_regalloc, rest_of_handle_old_regalloc,
rest_of_handle_regrename, rest_of_handle_reorder_blocks,
rest_of_handle_sched, rest_of_handle_sched2, rest_of_handle_regmove,
rest_of_handle_tracer, rest_of_handle_if_conversion,
rest_of_handle_if_after_combine, rest_of_handle_web,
rest_of_handle_branch_prob,
rest_of_handle_value_profile_transformations, rest_of_handle_cfg,
rest_of_handle_addressof, rest_of_handle_sibling_calls,
rest_of_handle_jump_bypass, rest_of_handle_inlining,
rest_of_handle_null_pointer, rest_of_handle_combine,
rest_of_handle_life, rest_of_handle_cse, rest_of_handle_cse2,
rest_of_handle_gcse, rest_of_handle_loop_optimize,
rest_of_handle_loop2, rest_of_compilation): Move to passes.c.
(decode_d_option): Use enable_rtl_dump_file.
(compile_file, finalize, do_compile): Move profile+combine+graph
cleanup to finish_optimization_passes.
* toplev.h (init_optimization_passes, finish_optimization_passes,
enable_rtl_dump_file): Declare.
2004-02-27 Eric Botcazou <ebotcazou@act-europe.fr>
Roger Sayle <roger@eyesopen.com>
......
......@@ -865,7 +865,7 @@ OBJS-common = \
sibcall.o simplify-rtx.o sreal.o stmt.o stor-layout.o stringpool.o \
targhooks.o timevar.o toplev.o tracer.o tree.o tree-dump.o unroll.o \
varasm.o varray.o version.o vmsdbgout.o xcoffout.o alloc-pool.o \
et-forest.o cfghooks.o bt-load.o pretty-print.o $(GGC) web.o
et-forest.o cfghooks.o bt-load.o pretty-print.o $(GGC) web.o passes.o
OBJS-md = $(out_object_file)
OBJS-archive = $(EXTRA_OBJS) $(host_hook_obj) hashtable.o tree-inline.o \
......@@ -1540,6 +1540,16 @@ toplev.o : toplev.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(RTL_
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
-DTARGET_NAME=\"$(target_noncanonical)\" \
-c $(srcdir)/toplev.c $(OUTPUT_OPTION)
passes.o : passes.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
$(RTL_H) function.h flags.h xcoffout.h input.h $(INSN_ATTR_H) output.h \
$(DIAGNOSTIC_H) debug.h insn-config.h intl.h $(RECOG_H) toplev.h \
dwarf2out.h sdbout.h dbxout.h $(EXPR_H) hard-reg-set.h $(BASIC_BLOCK_H) \
graph.h $(LOOP_H) except.h $(REGS_H) $(TIMEVAR_H) value-prof.h \
$(PARAMS_H) $(TM_P_H) reload.h dwarf2asm.h $(TARGET_H) \
langhooks.h insn-flags.h cfglayout.h real.h cfgloop.h \
hosthooks.h $(LANGHOOKS_DEF_H) cgraph.h $(COVERAGE_H) alloc-pool.h
main.o : main.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) toplev.h
host-default.o : host-default.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
......
......@@ -56,8 +56,6 @@ static void diagnostic_action_after_output (diagnostic_context *,
diagnostic_info *);
static void real_abort (void) ATTRIBUTE_NORETURN;
extern int rtl_dump_and_exit;
/* A diagnostic_context surrogate for stderr. */
static diagnostic_context global_diagnostic_context;
diagnostic_context *global_dc = &global_diagnostic_context;
......
......@@ -400,6 +400,7 @@ extern int flag_really_no_inline;
/* Nonzero if we are only using compiler to check syntax errors. */
extern int flag_syntax_only;
extern int rtl_dump_and_exit;
/* Nonzero means we should save auxiliary info into a .X file. */
......
......@@ -432,6 +432,11 @@ extern rtx current_output_insn;
The precise value is the insn being output, to pass to error_for_asm. */
extern rtx this_is_asm_operands;
/* Carry information from ASM_DECLARE_OBJECT_NAME
to ASM_FINISH_DECLARE_OBJECT. */
extern int size_directive_output;
extern tree last_assemble_variable_decl;
/* Decide whether DECL needs to be in a writable section.
RELOC is the same as for SELECT_SECTION. */
extern bool decl_readonly_section (tree, int);
......
This diff is collapsed. Click to expand it.
......@@ -2369,4 +2369,7 @@ extern rtx compare_and_jump_seq (rtx, rtx, enum rtx_code, rtx, int, rtx);
extern rtx canon_condition (rtx);
extern void simplify_using_condition (rtx, rtx *, struct bitmap_head_def *);
/* In ra.c. */
extern void reg_alloc (void);
#endif /* ! GCC_RTL_H */
......@@ -68,6 +68,9 @@ extern void rest_of_decl_compilation (tree, const char *, int, int);
extern void rest_of_type_compilation (tree, int);
extern void rest_of_compilation (tree);
extern void tree_rest_of_compilation (tree, bool);
extern void init_optimization_passes (void);
extern void finish_optimization_passes (void);
extern bool enable_rtl_dump_file (int);
extern void announce_function (tree);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment