tree-pass.h (TODO_do_not_ggc_collect): New.
2013-04-12 Richard Biener <rguenther@suse.de> * tree-pass.h (TODO_do_not_ggc_collect): New. * passes.c (execute_one_ipa_transform_pass): Honor TODO_do_not_ggc_collect. (execute_one_pass): Likewise. Revert 2013-04-10 Richard Biener <rguenther@suse.de> * passes.c (init_optimization_passes): Remove reload pass. * ira.c (do_reload): Merge into ... (ira): ... this. (rest_of_handle_reload): Remove. (pass_reload): Likewise. * config/i386/i386.c (ix86_option_override): Refer to ira instead of reload for vzeroupper pass placement. * g++.dg/pr55604.C: Use -fdump-rtl-ira. From-SVN: r197865
This commit is contained in:
parent
e1e3b9d335
commit
d3afd9aaca
@ -1,3 +1,21 @@
|
||||
2013-04-12 Richard Biener <rguenther@suse.de>
|
||||
|
||||
* tree-pass.h (TODO_do_not_ggc_collect): New.
|
||||
* passes.c (execute_one_ipa_transform_pass): Honor
|
||||
TODO_do_not_ggc_collect.
|
||||
(execute_one_pass): Likewise.
|
||||
|
||||
Revert
|
||||
2013-04-10 Richard Biener <rguenther@suse.de>
|
||||
|
||||
* passes.c (init_optimization_passes): Remove reload pass.
|
||||
* ira.c (do_reload): Merge into ...
|
||||
(ira): ... this.
|
||||
(rest_of_handle_reload): Remove.
|
||||
(pass_reload): Likewise.
|
||||
* config/i386/i386.c (ix86_option_override): Refer to ira instead
|
||||
of reload for vzeroupper pass placement.
|
||||
|
||||
2013-04-12 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR tree-optimization/56918
|
||||
|
@ -3930,7 +3930,7 @@ static void
|
||||
ix86_option_override (void)
|
||||
{
|
||||
static struct register_pass_info insert_vzeroupper_info
|
||||
= { &pass_insert_vzeroupper.pass, "ira",
|
||||
= { &pass_insert_vzeroupper.pass, "reload",
|
||||
1, PASS_POS_INSERT_AFTER
|
||||
};
|
||||
|
||||
|
42
gcc/ira.c
42
gcc/ira.c
@ -4359,8 +4359,6 @@ ira (FILE *f)
|
||||
int rebuild_p;
|
||||
bool saved_flag_caller_saves = flag_caller_saves;
|
||||
enum ira_region saved_flag_ira_region = flag_ira_region;
|
||||
basic_block bb;
|
||||
bool need_dce;
|
||||
|
||||
ira_conflicts_p = optimize > 0;
|
||||
|
||||
@ -4590,6 +4588,13 @@ ira (FILE *f)
|
||||
flag_caller_saves = saved_flag_caller_saves;
|
||||
flag_ira_region = saved_flag_ira_region;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
do_reload (void)
|
||||
{
|
||||
basic_block bb;
|
||||
bool need_dce;
|
||||
|
||||
if (flag_ira_verbose < 10)
|
||||
ira_dump_file = dump_file;
|
||||
@ -4629,6 +4634,8 @@ ira (FILE *f)
|
||||
|
||||
timevar_pop (TV_RELOAD);
|
||||
|
||||
timevar_push (TV_IRA);
|
||||
|
||||
if (ira_conflicts_p && ! ira_use_lra_p)
|
||||
{
|
||||
ira_free (ira_spilled_reg_stack_slots);
|
||||
@ -4686,6 +4693,8 @@ ira (FILE *f)
|
||||
|
||||
if (need_dce && optimize)
|
||||
run_fast_dce ();
|
||||
|
||||
timevar_pop (TV_IRA);
|
||||
}
|
||||
|
||||
/* Run the integrated register allocator. */
|
||||
@ -4712,6 +4721,33 @@ struct rtl_opt_pass pass_ira =
|
||||
0, /* properties_provided */
|
||||
0, /* properties_destroyed */
|
||||
0, /* todo_flags_start */
|
||||
0 /* todo_flags_finish */
|
||||
TODO_do_not_ggc_collect /* todo_flags_finish */
|
||||
}
|
||||
};
|
||||
|
||||
static unsigned int
|
||||
rest_of_handle_reload (void)
|
||||
{
|
||||
do_reload ();
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct rtl_opt_pass pass_reload =
|
||||
{
|
||||
{
|
||||
RTL_PASS,
|
||||
"reload", /* name */
|
||||
OPTGROUP_NONE, /* optinfo_flags */
|
||||
NULL, /* gate */
|
||||
rest_of_handle_reload, /* execute */
|
||||
NULL, /* sub */
|
||||
NULL, /* next */
|
||||
0, /* static_pass_number */
|
||||
TV_RELOAD, /* tv_id */
|
||||
0, /* properties_required */
|
||||
0, /* properties_provided */
|
||||
0, /* properties_destroyed */
|
||||
0, /* todo_flags_start */
|
||||
0 /* todo_flags_finish */
|
||||
}
|
||||
};
|
||||
|
@ -1620,6 +1620,7 @@ init_optimization_passes (void)
|
||||
NEXT_PASS (pass_sms);
|
||||
NEXT_PASS (pass_sched);
|
||||
NEXT_PASS (pass_ira);
|
||||
NEXT_PASS (pass_reload);
|
||||
NEXT_PASS (pass_postreload);
|
||||
{
|
||||
struct opt_pass **p = &pass_postreload.pass.sub;
|
||||
@ -2186,7 +2187,8 @@ execute_one_ipa_transform_pass (struct cgraph_node *node,
|
||||
current_pass = NULL;
|
||||
|
||||
/* Signal this is a suitable GC collection point. */
|
||||
ggc_collect ();
|
||||
if (!(todo_after & TODO_do_not_ggc_collect))
|
||||
ggc_collect ();
|
||||
}
|
||||
|
||||
/* For the current function, execute all ipa transforms. */
|
||||
@ -2365,7 +2367,8 @@ execute_one_pass (struct opt_pass *pass)
|
||||
current_pass = NULL;
|
||||
|
||||
/* Signal this is a suitable GC collection point. */
|
||||
ggc_collect ();
|
||||
if (!((todo_after | pass->todo_flags_finish) & TODO_do_not_ggc_collect))
|
||||
ggc_collect ();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -1,3 +1,10 @@
|
||||
2013-04-12 Richard Biener <rguenther@suse.de>
|
||||
|
||||
Revert
|
||||
2013-04-10 Richard Biener <rguenther@suse.de>
|
||||
|
||||
* g++.dg/pr55604.C: Use -fdump-rtl-ira.
|
||||
|
||||
2013-04-12 Tobias Burnus <burnus@net-b.de>
|
||||
|
||||
PR fortran/56845
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O -fdump-rtl-ira" } */
|
||||
/* { dg-options "-O -fdump-rtl-reload" } */
|
||||
|
||||
main ()
|
||||
{
|
||||
@ -8,4 +8,4 @@ main ()
|
||||
__builtin_printf ("%d %s\n", t, s);
|
||||
}
|
||||
|
||||
/* { dg-final { cleanup-rtl-dump "ira" } } */
|
||||
/* { dg-final { cleanup-rtl-dump "reload" } } */
|
||||
|
@ -154,6 +154,7 @@ struct simple_ipa_opt_pass
|
||||
(PROP_gimple_any | PROP_gimple_lcf | PROP_gimple_leh | PROP_gimple_lomp)
|
||||
|
||||
/* To-do flags. */
|
||||
#define TODO_do_not_ggc_collect (1 << 1)
|
||||
#define TODO_verify_ssa (1 << 2)
|
||||
#define TODO_verify_flow (1 << 3)
|
||||
#define TODO_verify_stmts (1 << 4)
|
||||
@ -445,6 +446,7 @@ extern struct rtl_opt_pass pass_mode_switching;
|
||||
extern struct rtl_opt_pass pass_sms;
|
||||
extern struct rtl_opt_pass pass_sched;
|
||||
extern struct rtl_opt_pass pass_ira;
|
||||
extern struct rtl_opt_pass pass_reload;
|
||||
extern struct rtl_opt_pass pass_clean_state;
|
||||
extern struct rtl_opt_pass pass_branch_prob;
|
||||
extern struct rtl_opt_pass pass_value_profile_transformations;
|
||||
|
Loading…
Reference in New Issue
Block a user