diff options
author | Kenneth Zadeck <zadeck@naturalbridge.com> | 2007-04-26 22:35:46 +0000 |
---|---|---|
committer | Kenneth Zadeck <zadeck@naturalbridge.com> | 2007-04-26 22:35:46 +0000 |
commit | daa02733bdc4236d9ef4c9bcff18938c0336fc82 (patch) | |
tree | 24c2fc7f86b10a94b829e602ac2316305a2cf1ad | |
parent | fb3333aa0dd80155589de371190fc8b17295cfaa (diff) |
2007-04-26 Kenneth Zadeck <zadeck@naturalbridge.com>
* df-core.c (df_remove_problem): Allow df_ur and df_live
problems to be removed.
* global.c (compute_regsets): Remove df_ur and df_live when
adding df_urec.
(rest_of_handle_global_alloc): Add back df_ur and df_live when
removing df_urec.
* timevar.def (TV_DF_UD): Renamed to TV_DF_UR.
* function.c (thread_prologue_and_epilogue_insns): Removed
call to df_analyze.
* df-problems.c (problem_UR): Added remove function and renamed TV.
(problem_LIVE): Added remove function.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/dataflow-branch@124202 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog.dataflow | 15 | ||||
-rw-r--r-- | gcc/df-core.c | 11 | ||||
-rw-r--r-- | gcc/df-problems.c | 6 | ||||
-rw-r--r-- | gcc/function.c | 12 | ||||
-rw-r--r-- | gcc/global.c | 14 | ||||
-rw-r--r-- | gcc/timevar.def | 2 |
6 files changed, 41 insertions, 19 deletions
diff --git a/gcc/ChangeLog.dataflow b/gcc/ChangeLog.dataflow index 192f37576ab..1248f0a69e6 100644 --- a/gcc/ChangeLog.dataflow +++ b/gcc/ChangeLog.dataflow @@ -1,3 +1,18 @@ +2007-04-26 Kenneth Zadeck <zadeck@naturalbridge.com> + + * df-core.c (df_remove_problem): Allow df_ur and df_live + problems to be removed. + * global.c (compute_regsets): Remove df_ur and df_live when + adding df_urec. + (rest_of_handle_global_alloc): Add back df_ur and df_live when + removing df_urec. + * timevar.def (TV_DF_UD): Renamed to TV_DF_UR. + * function.c (thread_prologue_and_epilogue_insns): Removed + call to df_analyze. + * df-problems.c (problem_UR): Added remove function and renamed TV. + (problem_LIVE): Added remove function. + + 2007-04-26 Seongbae Park <seongbae.park@gmail.com> * tree-pass.h: Declaration for new pass. diff --git a/gcc/df-core.c b/gcc/df-core.c index d1ff4736167..d7c970bd330 100644 --- a/gcc/df-core.c +++ b/gcc/df-core.c @@ -599,19 +599,26 @@ df_remove_problem (struct dataflow *dflow) { struct df_problem *problem; int i; + int start = 0; if (!dflow) return; + problem = dflow->problem; gcc_assert (problem->remove_problem_fun); + /* Normally only optional problems are removed, but during global, + we remove ur and live and replace it with urec. */ + if (problem->id >= DF_FIRST_OPTIONAL_PROBLEM) + start = DF_FIRST_OPTIONAL_PROBLEM; + /* Delete any problems that depended on this problem first. */ - for (i = DF_FIRST_OPTIONAL_PROBLEM; i < df->num_problems_defined; i++) + for (i = start; i < df->num_problems_defined; i++) if (df->problems_in_order[i]->problem->dependent_problem == problem) df_remove_problem (df->problems_in_order[i]); /* Now remove this problem. */ - for (i = DF_FIRST_OPTIONAL_PROBLEM; i < df->num_problems_defined; i++) + for (i = start; i < df->num_problems_defined; i++) if (df->problems_in_order[i] == dflow) { int j; diff --git a/gcc/df-problems.c b/gcc/df-problems.c index 11048da07a9..9736a52b551 100644 --- a/gcc/df-problems.c +++ b/gcc/df-problems.c @@ -2439,14 +2439,14 @@ static struct df_problem problem_UR = df_ur_transfer_function, /* Transfer function. */ df_ur_local_finalize, /* Finalize function. */ df_ur_free, /* Free all of the problem information. */ - NULL, /* Remove this problem from the stack of dataflow problems. */ + df_ur_free, /* Remove this problem from the stack of dataflow problems. */ NULL, /* Debugging. */ df_ur_top_dump, /* Debugging start block. */ df_ur_bottom_dump, /* Debugging end block. */ df_ur_verify_solution_start,/* Incremental solution verify start. */ df_ur_verify_solution_end, /* Incremental solution verify end. */ &problem_LR, /* Dependent problem. */ - TV_DF_UD /* Timing variable. */ + TV_DF_UR /* Timing variable. */ }; @@ -2694,7 +2694,7 @@ static struct df_problem problem_LIVE = NULL, /* Transfer function. */ df_live_local_finalize, /* Finalize function. */ df_live_free, /* Free all of the problem information. */ - NULL, /* Remove this problem from the stack of dataflow problems. */ + df_live_free, /* Remove this problem from the stack of dataflow problems. */ NULL, /* Debugging. */ df_live_top_dump, /* Debugging start block. */ df_live_bottom_dump, /* Debugging end block. */ diff --git a/gcc/function.c b/gcc/function.c index 5d183eaee42..df7f27d5ad0 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -5047,18 +5047,6 @@ thread_prologue_and_epilogue_insns (void) #endif edge_iterator ei; - /* Do not even think about running dce here!!!! All life, as we - know it will cease!!! There is dead code created by the previous - call to split_all_insns that is resurrected by the prologue and - epilogue. This does not appear to be a bug in dce. On the - x86-64 this shows up as failues in g++ excepion handling and is - extremely difficult to debug because the problem is with the way - that that the g++ library is compiled and this library was not - designed for modular testing. All of the test cases that fail - because of running dce here fail in the g++ library, not in the - test case. */ - df_analyze (); - #ifdef HAVE_prologue if (HAVE_prologue) { diff --git a/gcc/global.c b/gcc/global.c index a67cc99f6e1..ecf9c15ea1b 100644 --- a/gcc/global.c +++ b/gcc/global.c @@ -403,7 +403,11 @@ compute_regsets (HARD_REG_SET *elim_set, /* Create a new version of df that has the special version of UR if we are doing optimization. */ if (optimize) - df_urec_add_problem (); + { + df_remove_problem (df_live); + df_remove_problem (df_ur); + df_urec_add_problem (); + } df_analyze (); df_set_flags (DF_NO_INSN_RESCAN); @@ -2130,8 +2134,16 @@ rest_of_handle_global_alloc (void) going to help here because it does not touch the artificial uses and defs. */ df_finish_pass (); + if (optimize) + { + df_ur_add_problem (); + df_live_add_problem (); + } df_scan_alloc (NULL); df_scan_blocks (); + + if (optimize) + df_analyze (); return 0; } diff --git a/gcc/timevar.def b/gcc/timevar.def index eb67342850f..f74f3483ee5 100644 --- a/gcc/timevar.def +++ b/gcc/timevar.def @@ -62,7 +62,7 @@ DEFTIMEVAR (TV_DF_SCAN , "df scan insns") DEFTIMEVAR (TV_DF_RU , "df reaching uses") DEFTIMEVAR (TV_DF_RD , "df reaching defs") DEFTIMEVAR (TV_DF_LR , "df live regs") -DEFTIMEVAR (TV_DF_UD , "df uninitialized regs") +DEFTIMEVAR (TV_DF_UR , "df uninitialized regs") DEFTIMEVAR (TV_DF_LIVE , "df live&initialized regs") DEFTIMEVAR (TV_DF_UREC , "df uninitialized regs 2") DEFTIMEVAR (TV_DF_CHAIN , "df use-def / def-use chains") |