Commit c6741572 by Paolo Bonzini Committed by Paolo Bonzini

re PR tree-optimization/26854 (Inordinate compile times on large routines)

2009-06-07  Paolo Bonzini  <bonzini@gnu.org>

	PR rtl-optimization/26854
        * timevar.def: Remove TV_DF_RU, add TV_DF_MD.
        * df-problems.c (df_rd_add_problem): Fix comment.
        (df_md_set_bb_info, df_md_free_bb_info, df_md_alloc,
        df_md_simulate_artificial_defs_at_top,
        df_md_simulate_one_insn, df_md_bb_local_compute_process_def,
        df_md_bb_local_compute, df_md_local_compute, df_md_reset,
        df_md_transfer_function, df_md_init, df_md_confluence_0,
        df_md_confluence_n, df_md_free, df_md_top_dump, df_md_bottom_dump,
        problem_MD, df_md_add_problem): New.
        * df.h (DF_MD, DF_MD_BB_INFO, struct df_md_bb_info, df_md,
        df_md_get_bb_info): New.
        DF_LAST_PROBLEM_PLUS1): Adjust.

        * Makefile.in (fwprop.o): Include domwalk.h.
        * fwprop.c: Include domwalk.h.
        (reg_defs, reg_defs_stack): New.
        (bitmap_only_bit_between): Remove.
        (process_defs): New.
        (process_uses): Use reg_defs and local_md instead of
        bitmap_only_bit_between and local_rd.
        (single_def_use_enter_block): New, from build_single_def_use_links.
        (single_def_use_leave_block): New.
        (build_single_def_use_links): Remove code moved to
        single_def_use_enter_block, invoke domwalk.
        (use_killed_between): Adjust comment.

From-SVN: r149010
parent 7ff23740
2009-06-07 Paolo Bonzini <bonzini@gnu.org>
PR rtl-optimization/26854
* timevar.def: Remove TV_DF_RU, add TV_DF_MD.
* df-problems.c (df_rd_add_problem): Fix comment.
(df_md_set_bb_info, df_md_free_bb_info, df_md_alloc,
df_md_simulate_artificial_defs_at_top,
df_md_simulate_one_insn, df_md_bb_local_compute_process_def,
df_md_bb_local_compute, df_md_local_compute, df_md_reset,
df_md_transfer_function, df_md_init, df_md_confluence_0,
df_md_confluence_n, df_md_free, df_md_top_dump, df_md_bottom_dump,
problem_MD, df_md_add_problem): New.
* df.h (DF_MD, DF_MD_BB_INFO, struct df_md_bb_info, df_md,
df_md_get_bb_info): New.
DF_LAST_PROBLEM_PLUS1): Adjust.
* Makefile.in (fwprop.o): Include domwalk.h.
* fwprop.c: Include domwalk.h.
(reg_defs, reg_defs_stack): New.
(bitmap_only_bit_between): Remove.
(process_defs): New.
(process_uses): Use reg_defs and local_md instead of
bitmap_only_bit_between and local_rd.
(single_def_use_enter_block): New, from build_single_def_use_links.
(single_def_use_leave_block): New.
(build_single_def_use_links): Remove code moved to
single_def_use_enter_block, invoke domwalk.
(use_killed_between): Adjust comment.
2009-06-27 Paolo Bonzini <bonzini@gnu.org> 2009-06-27 Paolo Bonzini <bonzini@gnu.org>
* bitmap.h (bitmap_ior_and_into): New. * bitmap.h (bitmap_ior_and_into): New.
......
...@@ -2761,7 +2761,7 @@ dse.o : dse.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ ...@@ -2761,7 +2761,7 @@ dse.o : dse.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
fwprop.o : fwprop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ fwprop.o : fwprop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
$(TOPLEV_H) insn-config.h $(RECOG_H) $(FLAGS_H) $(OBSTACK_H) $(BASIC_BLOCK_H) \ $(TOPLEV_H) insn-config.h $(RECOG_H) $(FLAGS_H) $(OBSTACK_H) $(BASIC_BLOCK_H) \
output.h $(DF_H) alloc-pool.h $(TIMEVAR_H) $(TREE_PASS_H) $(TARGET_H) \ output.h $(DF_H) alloc-pool.h $(TIMEVAR_H) $(TREE_PASS_H) $(TARGET_H) \
$(TM_P_H) $(CFGLOOP_H) $(EMIT_RTL_H) $(TM_P_H) $(CFGLOOP_H) $(EMIT_RTL_H) domwalk.h
web.o : web.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \ web.o : web.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
hard-reg-set.h $(FLAGS_H) $(BASIC_BLOCK_H) $(FUNCTION_H) output.h $(TOPLEV_H) \ hard-reg-set.h $(FLAGS_H) $(BASIC_BLOCK_H) $(FUNCTION_H) output.h $(TOPLEV_H) \
$(DF_H) $(OBSTACK_H) $(TIMEVAR_H) $(TREE_PASS_H) $(DF_H) $(OBSTACK_H) $(TIMEVAR_H) $(TREE_PASS_H)
......
...@@ -52,8 +52,9 @@ union df_ref_d; ...@@ -52,8 +52,9 @@ union df_ref_d;
#define DF_CHAIN 4 /* Def-Use and/or Use-Def Chains. */ #define DF_CHAIN 4 /* Def-Use and/or Use-Def Chains. */
#define DF_BYTE_LR 5 /* Subreg tracking lr. */ #define DF_BYTE_LR 5 /* Subreg tracking lr. */
#define DF_NOTE 6 /* REG_DEF and REG_UNUSED notes. */ #define DF_NOTE 6 /* REG_DEF and REG_UNUSED notes. */
#define DF_MD 7 /* Multiple Definitions. */
#define DF_LAST_PROBLEM_PLUS1 (DF_NOTE + 1) #define DF_LAST_PROBLEM_PLUS1 (DF_MD + 1)
/* Dataflow direction. */ /* Dataflow direction. */
enum df_flow_dir enum df_flow_dir
...@@ -619,6 +620,7 @@ struct df ...@@ -619,6 +620,7 @@ struct df
#define DF_LR_BB_INFO(BB) (df_lr_get_bb_info((BB)->index)) #define DF_LR_BB_INFO(BB) (df_lr_get_bb_info((BB)->index))
#define DF_LIVE_BB_INFO(BB) (df_live_get_bb_info((BB)->index)) #define DF_LIVE_BB_INFO(BB) (df_live_get_bb_info((BB)->index))
#define DF_BYTE_LR_BB_INFO(BB) (df_byte_lr_get_bb_info((BB)->index)) #define DF_BYTE_LR_BB_INFO(BB) (df_byte_lr_get_bb_info((BB)->index))
#define DF_MD_BB_INFO(BB) (df_md_get_bb_info((BB)->index))
/* Most transformations that wish to use live register analysis will /* Most transformations that wish to use live register analysis will
use these macros. This info is the and of the lr and live sets. */ use these macros. This info is the and of the lr and live sets. */
...@@ -802,6 +804,22 @@ struct df_rd_bb_info ...@@ -802,6 +804,22 @@ struct df_rd_bb_info
}; };
/* Multiple reaching definitions. All bitmaps are referenced by the
register number. */
struct df_md_bb_info
{
/* Local sets to describe the basic blocks. */
bitmap gen; /* Partial/conditional definitions live at BB out. */
bitmap kill; /* Other definitions that are live at BB out. */
bitmap init; /* Definitions coming from dominance frontier edges. */
/* The results of the dataflow problem. */
bitmap in; /* Just before the block itself. */
bitmap out; /* At the bottom of the block. */
};
/* Live registers, a backwards dataflow problem. All bitmaps are /* Live registers, a backwards dataflow problem. All bitmaps are
referenced by the register number. */ referenced by the register number. */
...@@ -862,6 +880,7 @@ extern struct df *df; ...@@ -862,6 +880,7 @@ extern struct df *df;
#define df_chain (df->problems_by_index[DF_CHAIN]) #define df_chain (df->problems_by_index[DF_CHAIN])
#define df_byte_lr (df->problems_by_index[DF_BYTE_LR]) #define df_byte_lr (df->problems_by_index[DF_BYTE_LR])
#define df_note (df->problems_by_index[DF_NOTE]) #define df_note (df->problems_by_index[DF_NOTE])
#define df_md (df->problems_by_index[DF_MD])
/* This symbol turns on checking that each modification of the cfg has /* This symbol turns on checking that each modification of the cfg has
been identified to the appropriate df routines. It is not part of been identified to the appropriate df routines. It is not part of
...@@ -955,6 +974,9 @@ extern void df_byte_lr_simulate_uses (rtx, bitmap); ...@@ -955,6 +974,9 @@ extern void df_byte_lr_simulate_uses (rtx, bitmap);
extern void df_byte_lr_simulate_artificial_refs_at_top (basic_block, bitmap); extern void df_byte_lr_simulate_artificial_refs_at_top (basic_block, bitmap);
extern void df_byte_lr_simulate_artificial_refs_at_end (basic_block, bitmap); extern void df_byte_lr_simulate_artificial_refs_at_end (basic_block, bitmap);
extern void df_note_add_problem (void); extern void df_note_add_problem (void);
extern void df_md_add_problem (void);
extern void df_md_simulate_artificial_defs_at_top (basic_block, bitmap);
extern void df_md_simulate_one_insn (basic_block, rtx, bitmap);
extern void df_simulate_find_defs (rtx, bitmap); extern void df_simulate_find_defs (rtx, bitmap);
extern void df_simulate_defs (rtx, bitmap); extern void df_simulate_defs (rtx, bitmap);
extern void df_simulate_uses (rtx, bitmap); extern void df_simulate_uses (rtx, bitmap);
...@@ -1034,6 +1056,15 @@ df_lr_get_bb_info (unsigned int index) ...@@ -1034,6 +1056,15 @@ df_lr_get_bb_info (unsigned int index)
return NULL; return NULL;
} }
static inline struct df_md_bb_info *
df_md_get_bb_info (unsigned int index)
{
if (index < df_md->block_info_size)
return (struct df_md_bb_info *) df_md->block_info[index];
else
return NULL;
}
static inline struct df_live_bb_info * static inline struct df_live_bb_info *
df_live_get_bb_info (unsigned int index) df_live_get_bb_info (unsigned int index)
{ {
......
...@@ -58,7 +58,7 @@ DEFTIMEVAR (TV_LIFE_UPDATE , "life info update") ...@@ -58,7 +58,7 @@ DEFTIMEVAR (TV_LIFE_UPDATE , "life info update")
/* Time spent in dataflow problems. */ /* Time spent in dataflow problems. */
DEFTIMEVAR (TV_DF_SCAN , "df scan insns") DEFTIMEVAR (TV_DF_SCAN , "df scan insns")
DEFTIMEVAR (TV_DF_RU , "df reaching uses") DEFTIMEVAR (TV_DF_MD , "df multiple defs")
DEFTIMEVAR (TV_DF_RD , "df reaching defs") DEFTIMEVAR (TV_DF_RD , "df reaching defs")
DEFTIMEVAR (TV_DF_LR , "df live regs") DEFTIMEVAR (TV_DF_LR , "df live regs")
DEFTIMEVAR (TV_DF_LIVE , "df live&initialized regs") DEFTIMEVAR (TV_DF_LIVE , "df live&initialized regs")
......
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