diff options
author | Richard Biener <rguenther@suse.de> | 2013-02-08 09:09:38 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2013-02-08 09:09:38 +0000 |
commit | 661bc682bcb87f5faa709f9bcd1679874f6652f6 (patch) | |
tree | 7376a6bbad1b83a2ca1875f856aea775280d8bbd /gcc/ira.c | |
parent | 0d5049b238172839e3cddbe4d8befe62d701dc07 (diff) | |
download | gcc-661bc682bcb87f5faa709f9bcd1679874f6652f6.zip gcc-661bc682bcb87f5faa709f9bcd1679874f6652f6.tar.gz gcc-661bc682bcb87f5faa709f9bcd1679874f6652f6.tar.bz2 |
cfgloop.c (verify_loop_structure): Properly handle a loop exiting to another loop header.
2013-02-08 Richard Biener <rguenther@suse.de>
* cfgloop.c (verify_loop_structure): Properly handle
a loop exiting to another loop header.
* ira-int.h (ira_loops): Remove.
* ira.c (ira_loops): Remove.
(ira): Use loop_optimizer_init and loop_optimizer_finalize.
(do_reload): Use loop_optimizer_finalize.
* ira-build.c (create_loop_tree_nodes): Use get_loops and
number_of_loops to access the loop tree.
(more_one_region_p): Likewise.
(finish_loop_tree_nodes): Likewise.
(rebuild_regno_allocno_maps): Likewise.
(mark_loops_for_removal): Likewise.
(mark_all_loops_for_removal): Likewise.
(remove_unnecessary_regions): Likewise.
(ira_build): Likewise.
* ira-emit.c (setup_entered_from_non_parent_p): Likewise.
From-SVN: r195877
Diffstat (limited to 'gcc/ira.c')
-rw-r--r-- | gcc/ira.c | 23 |
1 files changed, 6 insertions, 17 deletions
@@ -4338,9 +4338,6 @@ allocate_initial_values (void) function. */ bool ira_use_lra_p; -/* All natural loops. */ -struct loops ira_loops; - /* True if we have allocno conflicts. It is false for non-optimized mode or when the conflict table is too big. */ bool ira_conflicts_p; @@ -4464,11 +4461,7 @@ ira (FILE *f) ira_assert (current_loops == NULL); if (flag_ira_region == IRA_REGION_ALL || flag_ira_region == IRA_REGION_MIXED) - { - flow_loops_find (&ira_loops); - current_loops = &ira_loops; - record_loop_exits (); - } + loop_optimizer_init (AVOID_CFG_MODIFICATIONS | LOOPS_HAVE_RECORDED_EXITS); if (internal_flag_ira_verbose > 0 && ira_dump_file != NULL) fprintf (ira_dump_file, "Building IRA IR\n"); @@ -4526,11 +4519,9 @@ ira (FILE *f) /* ??? Rebuild the loop tree, but why? Does the loop tree change if new insns were generated? Can that be handled by updating the loop tree incrementally? */ - release_recorded_exits (); - flow_loops_free (&ira_loops); - flow_loops_find (&ira_loops); - current_loops = &ira_loops; - record_loop_exits (); + loop_optimizer_finalize (); + loop_optimizer_init (AVOID_CFG_MODIFICATIONS + | LOOPS_HAVE_RECORDED_EXITS); if (! ira_use_lra_p) { @@ -4607,8 +4598,7 @@ do_reload (void) { if (current_loops != NULL) { - release_recorded_exits (); - flow_loops_free (&ira_loops); + loop_optimizer_finalize (); free_dominance_info (CDI_DOMINATORS); } FOR_ALL_BB (bb) @@ -4657,8 +4647,7 @@ do_reload (void) ira_destroy (); if (current_loops != NULL) { - release_recorded_exits (); - flow_loops_free (&ira_loops); + loop_optimizer_finalize (); free_dominance_info (CDI_DOMINATORS); } FOR_ALL_BB (bb) |