aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2019-11-21 15:02:19 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2019-11-21 15:02:19 +0000
commit033bd26e28e8dd83f7c585c404d708226f495ffa (patch)
treecbb00d643acffb81f584986a57d6894be0076663 /gcc
parent7c327e2d4d04966c8c5dc19cee9e242befdff6ef (diff)
downloadgcc-033bd26e28e8dd83f7c585c404d708226f495ffa.zip
gcc-033bd26e28e8dd83f7c585c404d708226f495ffa.tar.gz
gcc-033bd26e28e8dd83f7c585c404d708226f495ffa.tar.bz2
lra.c (lra_insn_recog_data_pool): New.
2019-11-21 Richard Biener <rguenther@suse.de> * lra.c (lra_insn_recog_data_pool): New. (free_insn_recog_data): Adjust. (finish_insn_recog_data): Release lra_insn_recog_data_pool. (lra_set_insn_recog_data): Allocate from lra_insn_recog_data_pool. From-SVN: r278556
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/lra.c9
2 files changed, 14 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 5ffe57d..2683117 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,12 @@
2019-11-21 Richard Biener <rguenther@suse.de>
+ * lra.c (lra_insn_recog_data_pool): New.
+ (free_insn_recog_data): Adjust.
+ (finish_insn_recog_data): Release lra_insn_recog_data_pool.
+ (lra_set_insn_recog_data): Allocate from lra_insn_recog_data_pool.
+
+2019-11-21 Richard Biener <rguenther@suse.de>
+
PR tree-optimization/92596
* tree-vect-slp.c (vect_build_slp_tree): Fix pasto.
diff --git a/gcc/lra.c b/gcc/lra.c
index 2c9a29a..ec20aed 100644
--- a/gcc/lra.c
+++ b/gcc/lra.c
@@ -714,6 +714,10 @@ int lra_insn_recog_data_len;
/* Map INSN_UID -> the insn recog data (NULL if unknown). */
lra_insn_recog_data_t *lra_insn_recog_data;
+/* Alloc pool we allocate entries for lra_insn_recog_data from. */
+static object_allocator<class lra_insn_recog_data>
+ lra_insn_recog_data_pool ("insn recog data pool");
+
/* Initialize LRA data about insns. */
static void
init_insn_recog_data (void)
@@ -759,7 +763,7 @@ free_insn_recog_data (lra_insn_recog_data_t data)
}
free_insn_regs (data->regs);
data->regs = NULL;
- free (data);
+ lra_insn_recog_data_pool.remove (data);
}
/* Pools for copies. */
@@ -778,6 +782,7 @@ finish_insn_recog_data (void)
finish_insn_regs ();
lra_copy_pool.release ();
lra_insn_reg_pool.release ();
+ lra_insn_recog_data_pool.release ();
free (lra_insn_recog_data);
}
@@ -952,7 +957,7 @@ lra_set_insn_recog_data (rtx_insn *insn)
/* It might be a new simple insn which is not recognized yet. */
INSN_CODE (insn) = icode = recog_memoized (insn);
}
- data = XNEW (class lra_insn_recog_data);
+ data = lra_insn_recog_data_pool.allocate ();
lra_insn_recog_data[uid] = data;
data->insn = insn;
data->used_insn_alternative = LRA_UNKNOWN_ALT;