diff options
author | abel <abel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-02-18 05:41:29 +0000 |
---|---|---|
committer | abel <abel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-02-18 05:41:29 +0000 |
commit | c30894338e7860dd7c88badac3b01c876fccad80 (patch) | |
tree | 1bed52a7e0c474f02696375301f02d1025258742 /gcc/sched-rgn.c | |
parent | b72e89d772db89a8889060f0df8fdd22cd66b4b7 (diff) | |
download | gcc-c30894338e7860dd7c88badac3b01c876fccad80.tar.gz |
PR rtl-optimization/58960
* haifa-sched.c (alloc_global_sched_pressure_data): New,
factored out from ...
(sched_init): ... here.
(free_global_sched_pressure_data): New, factored out from ...
(sched_finish): ... here.
* sched-int.h (free_global_sched_pressure_data): Declare.
* sched-rgn.c (nr_regions_initial): New static global.
(haifa_find_rgns): Initialize it.
(schedule_region): Disable sched-pressure for the newly
generated regions.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@207832 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/sched-rgn.c')
-rw-r--r-- | gcc/sched-rgn.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/sched-rgn.c b/gcc/sched-rgn.c index 406dc1facd6..0573b6a6e8f 100644 --- a/gcc/sched-rgn.c +++ b/gcc/sched-rgn.c @@ -79,6 +79,9 @@ static int is_cfg_nonregular (void); /* Number of regions in the procedure. */ int nr_regions = 0; +/* Same as above before adding any new regions. */ +static int nr_regions_initial = 0; + /* Table of region descriptions. */ region *rgn_table = NULL; @@ -1064,6 +1067,7 @@ haifa_find_rgns (void) BLOCK_TO_BB (bb->index) = 0; } + nr_regions_initial = nr_regions; free (max_hdr); free (degree); free (stack); @@ -2991,6 +2995,15 @@ schedule_region (int rgn) rgn_n_insns = 0; + /* Do not support register pressure sensitive scheduling for the new regions + as we don't update the liveness info for them. */ + if (rgn >= nr_regions_initial) + { + if (sched_pressure != SCHED_PRESSURE_NONE) + free_global_sched_pressure_data (); + sched_pressure = SCHED_PRESSURE_NONE; + } + rgn_setup_region (rgn); /* Don't schedule region that is marked by |