aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorSegher Boessenkool <segher@kernel.crashing.org>2017-05-24 16:33:11 +0200
committerSegher Boessenkool <segher@gcc.gnu.org>2017-05-24 16:33:11 +0200
commit6938e7f1d803d3e56eb0004f826c302c2bc39584 (patch)
tree601debca22be27d6bf72e09b8a29c15009aa906e /gcc
parente1b67495863fe07724aa71bf1ef5fd3d2557451c (diff)
downloadgcc-6938e7f1d803d3e56eb0004f826c302c2bc39584.zip
gcc-6938e7f1d803d3e56eb0004f826c302c2bc39584.tar.gz
gcc-6938e7f1d803d3e56eb0004f826c302c2bc39584.tar.bz2
rs6000: Fix for separate shrink-wrapping for fp (PR80860, PR80843)
After my r248256, rs6000_components_for_bb allocates an sbitmap of size only 32 while it can use up to 64. This patch fixes it. It moves the n_components variable into the machine_function struct so that other hooks can use it. PR bootstrap/80860 PR bootstrap/80843 * config/rs6000/rs6000.c (struct machine_function): Add new field n_components. (rs6000_get_separate_components): Init that field, use it. (rs6000_components_for_bb): Use the field. From-SVN: r248421
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog9
-rw-r--r--gcc/config/rs6000/rs6000.c8
2 files changed, 14 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index c641aa0..ef4dbb7 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,12 @@
+2017-05-24 Segher Boessenkool <segher@kernel.crashing.org>
+
+ PR bootstrap/80860
+ PR bootstrap/80843
+ * config/rs6000/rs6000.c (struct machine_function): Add new field
+ n_components.
+ (rs6000_get_separate_components): Init that field, use it.
+ (rs6000_components_for_bb): Use the field.
+
2017-05-24 Thomas Preud'homme <thomas.preudhomme@arm.com>
* config/arm/arm.c (arm_expand_prologue): Fix typo in comment.
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index d4906cc..b0d1dd9 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -156,6 +156,8 @@ typedef struct GTY(()) machine_function
bool split_stack_argp_used;
/* Flag if r2 setup is needed with ELFv2 ABI. */
bool r2_setup_needed;
+ /* The number of components we use for separate shrink-wrapping. */
+ int n_components;
/* The components already handled by separate shrink-wrapping, which should
not be considered by the prologue and epilogue. */
bool gpr_is_wrapped_separately[32];
@@ -29229,9 +29231,9 @@ rs6000_get_separate_components (void)
Components 13..31 are the save/restore of GPR13..GPR31.
Components 46..63 are the save/restore of FPR14..FPR31. */
- int n_components = 64;
+ cfun->machine->n_components = 64;
- sbitmap components = sbitmap_alloc (n_components);
+ sbitmap components = sbitmap_alloc (cfun->machine->n_components);
bitmap_clear (components);
int reg_size = TARGET_32BIT ? 4 : 8;
@@ -29313,7 +29315,7 @@ rs6000_components_for_bb (basic_block bb)
bitmap gen = &DF_LIVE_BB_INFO (bb)->gen;
bitmap kill = &DF_LIVE_BB_INFO (bb)->kill;
- sbitmap components = sbitmap_alloc (32);
+ sbitmap components = sbitmap_alloc (cfun->machine->n_components);
bitmap_clear (components);
/* A register is used in a bb if it is in the IN, GEN, or KILL sets. */