summaryrefslogtreecommitdiff
path: root/gcc/ira.c
diff options
context:
space:
mode:
authorvmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4>2013-02-13 17:40:22 +0000
committervmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4>2013-02-13 17:40:22 +0000
commitf03b2d9d4d91d30fb32ccf0d3825155c3061c505 (patch)
tree4675ffd74979fa6ab1548e79ea49719d1e657cd1 /gcc/ira.c
parenta756eaf1e6f6eb16df849641a219d5b01d69eb60 (diff)
downloadgcc-f03b2d9d4d91d30fb32ccf0d3825155c3061c505.tar.gz
2013-02-13 Vladimir Makarov <vmakarov@redhat.com>
PR target/56184 * ira.c (max_regno_before_ira): Move from ... (ira): ... here. (fix_reg_equiv_init): Use max_regno_before_ira instead of vec_safe_length. 2013-02-13 Vladimir Makarov <vmakarov@redhat.com> PR target/56184 * gcc.target/arm/pr56184.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@196019 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ira.c')
-rw-r--r--gcc/ira.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/gcc/ira.c b/gcc/ira.c
index d3bd2bae4bf..03b336831fa 100644
--- a/gcc/ira.c
+++ b/gcc/ira.c
@@ -419,6 +419,11 @@ int ira_move_loops_num, ira_additional_jumps_num;
HARD_REG_SET eliminable_regset;
+/* Value of max_reg_num () before IRA work start. This value helps
+ us to recognize a situation when new pseudos were created during
+ IRA work. */
+static int max_regno_before_ira;
+
/* Temporary hard reg set used for a different calculation. */
static HARD_REG_SET temp_hard_regset;
@@ -2264,11 +2269,11 @@ ira_update_equiv_info_by_shuffle_insn (int to_regno, int from_regno, rtx insns)
static void
fix_reg_equiv_init (void)
{
- unsigned int max_regno = max_reg_num ();
+ int max_regno = max_reg_num ();
int i, new_regno, max;
rtx x, prev, next, insn, set;
- if (vec_safe_length (reg_equivs) < max_regno)
+ if (max_regno_before_ira < max_regno)
{
max = vec_safe_length (reg_equivs);
grow_reg_equivs ();
@@ -4350,7 +4355,7 @@ static void
ira (FILE *f)
{
bool loops_p;
- int max_regno_before_ira, ira_max_point_before_emit;
+ int ira_max_point_before_emit;
int rebuild_p;
bool saved_flag_caller_saves = flag_caller_saves;
enum ira_region saved_flag_ira_region = flag_ira_region;