summaryrefslogtreecommitdiff
path: root/gcc/lra-assigns.c
diff options
context:
space:
mode:
authorvmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4>2014-02-25 20:34:44 +0000
committervmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4>2014-02-25 20:34:44 +0000
commiteb3db740832740f555ea956e276904e247c819fa (patch)
tree71b4ad742f98532f60c9692fb44c11d65b6b35f1 /gcc/lra-assigns.c
parent196adb3b4682b0da031def91be9865db49dc7603 (diff)
downloadgcc-eb3db740832740f555ea956e276904e247c819fa.tar.gz
2014-02-25 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/60317 * params.def (PARAM_LRA_MAX_CONSIDERED_RELOAD_PSEUDOS): New. * params.h (LRA_MAX_CONSIDERED_RELOAD_PSEUDOS): New. * lra-assigns.c: Include params.h. (spill_for): Use LRA_MAX_CONSIDERED_RELOAD_PSEUDOS as guard for other reload pseudos considerations. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208155 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lra-assigns.c')
-rw-r--r--gcc/lra-assigns.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/gcc/lra-assigns.c b/gcc/lra-assigns.c
index 268edccd606..f94ebe62e89 100644
--- a/gcc/lra-assigns.c
+++ b/gcc/lra-assigns.c
@@ -94,6 +94,7 @@ along with GCC; see the file COPYING3. If not see
#include "df.h"
#include "ira.h"
#include "sparseset.h"
+#include "params.h"
#include "lra-int.h"
/* Array containing corresponding values of function
@@ -896,14 +897,16 @@ spill_for (int regno, bitmap spilled_pseudo_bitmap)
}
}
n = 0;
- EXECUTE_IF_SET_IN_SPARSESET (live_range_reload_inheritance_pseudos,
- reload_regno)
- if ((int) reload_regno != regno
- && (ira_reg_classes_intersect_p
- [rclass][regno_allocno_class_array[reload_regno]])
- && live_pseudos_reg_renumber[reload_regno] < 0
- && find_hard_regno_for (reload_regno, &cost, -1) < 0)
- sorted_reload_pseudos[n++] = reload_regno;
+ if (sparseset_cardinality (live_range_reload_inheritance_pseudos)
+ <= LRA_MAX_CONSIDERED_RELOAD_PSEUDOS)
+ EXECUTE_IF_SET_IN_SPARSESET (live_range_reload_inheritance_pseudos,
+ reload_regno)
+ if ((int) reload_regno != regno
+ && (ira_reg_classes_intersect_p
+ [rclass][regno_allocno_class_array[reload_regno]])
+ && live_pseudos_reg_renumber[reload_regno] < 0
+ && find_hard_regno_for (reload_regno, &cost, -1) < 0)
+ sorted_reload_pseudos[n++] = reload_regno;
EXECUTE_IF_SET_IN_BITMAP (&spill_pseudos_bitmap, 0, spill_regno, bi)
{
update_lives (spill_regno, true);