summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authordoko <doko@6ca36cf4-e1d1-0310-8c6f-e303bb2178ca>2014-05-20 16:01:44 +0000
committerdoko <doko@6ca36cf4-e1d1-0310-8c6f-e303bb2178ca>2014-05-20 16:01:44 +0000
commitd0b75d610e218f49acab67c8d7077f33ed785d04 (patch)
tree5aa182c979c1936115db236d953ee5bf81f52adb /debian
parent7e9b1cf6a51b13562c5f3101aab7bb292a5ad3a5 (diff)
downloadgcc-49-d0b75d610e218f49acab67c8d7077f33ed785d04.tar.gz
* Revert the fix for PR rtl-optimization/60969, causing bootstrap failure
on ppc64el. git-svn-id: svn://svn.debian.org/svn/gcccvs/branches/sid/gcc-4.9@7398 6ca36cf4-e1d1-0310-8c6f-e303bb2178ca
Diffstat (limited to 'debian')
-rw-r--r--debian/changelog2
-rw-r--r--debian/patches/pr60969-revert.diff170
-rw-r--r--debian/rules.patch1
3 files changed, 173 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index 40401c0..a149f87 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,8 @@ gcc-4.9 (4.9.0-5) UNRELEASED; urgency=medium
* Build libitm on AArch64, patch taken from the trunk.
* Update the testsuite to allow more testcases to pass with hardening options
turned on (Steve Beattie). LP: #1317307.
+ * Revert the fix for PR rtl-optimization/60969, causing bootstrap failure
+ on ppc64el.
-- Matthias Klose <doko@debian.org> Tue, 20 May 2014 17:32:15 +0200
diff --git a/debian/patches/pr60969-revert.diff b/debian/patches/pr60969-revert.diff
new file mode 100644
index 0000000..b55f3fe
--- /dev/null
+++ b/debian/patches/pr60969-revert.diff
@@ -0,0 +1,170 @@
+# DP: Revert the fix for PR rtl-optimization/60969, causing bootstrap failure on ppc64el.
+
+gcc/
+
+2014-05-16 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR rtl-optimization/60969
+ * ira-costs.c (record_reg_classes): Allow only memory for pseudo.
+ Calculate costs for this case.
+
+--- a/src/gcc/ira-costs.c
++++ b/src/gcc/ira-costs.c
+@@ -762,11 +762,10 @@
+ into that class. */
+ if (REG_P (op) && REGNO (op) >= FIRST_PSEUDO_REGISTER)
+ {
+- if (classes[i] == NO_REGS && ! allows_mem[i])
++ if (classes[i] == NO_REGS)
+ {
+ /* We must always fail if the operand is a REG, but
+- we did not find a suitable class and memory is
+- not allowed.
++ we did not find a suitable class.
+
+ Otherwise we may perform an uninitialized read
+ from this_op_costs after the `continue' statement
+@@ -784,90 +783,50 @@
+ bool out_p = recog_data.operand_type[i] != OP_IN;
+ enum reg_class op_class = classes[i];
+ move_table *move_in_cost, *move_out_cost;
+- short (*mem_cost)[2];
+
+ ira_init_register_move_cost_if_necessary (mode);
+ if (! in_p)
+ {
+ ira_assert (out_p);
+- if (op_class == NO_REGS)
++ move_out_cost = ira_may_move_out_cost[mode];
++ for (k = cost_classes_ptr->num - 1; k >= 0; k--)
+ {
+- mem_cost = ira_memory_move_cost[mode];
+- for (k = cost_classes_ptr->num - 1; k >= 0; k--)
+- {
+- rclass = cost_classes[k];
+- pp_costs[k] = mem_cost[rclass][0] * frequency;
+- }
++ rclass = cost_classes[k];
++ pp_costs[k]
++ = move_out_cost[op_class][rclass] * frequency;
+ }
+- else
+- {
+- move_out_cost = ira_may_move_out_cost[mode];
+- for (k = cost_classes_ptr->num - 1; k >= 0; k--)
+- {
+- rclass = cost_classes[k];
+- pp_costs[k]
+- = move_out_cost[op_class][rclass] * frequency;
+- }
+- }
+ }
+ else if (! out_p)
+ {
+ ira_assert (in_p);
+- if (op_class == NO_REGS)
++ move_in_cost = ira_may_move_in_cost[mode];
++ for (k = cost_classes_ptr->num - 1; k >= 0; k--)
+ {
+- mem_cost = ira_memory_move_cost[mode];
+- for (k = cost_classes_ptr->num - 1; k >= 0; k--)
+- {
+- rclass = cost_classes[k];
+- pp_costs[k] = mem_cost[rclass][1] * frequency;
+- }
++ rclass = cost_classes[k];
++ pp_costs[k]
++ = move_in_cost[rclass][op_class] * frequency;
+ }
+- else
+- {
+- move_in_cost = ira_may_move_in_cost[mode];
+- for (k = cost_classes_ptr->num - 1; k >= 0; k--)
+- {
+- rclass = cost_classes[k];
+- pp_costs[k]
+- = move_in_cost[rclass][op_class] * frequency;
+- }
+- }
+ }
+ else
+ {
+- if (op_class == NO_REGS)
++ move_in_cost = ira_may_move_in_cost[mode];
++ move_out_cost = ira_may_move_out_cost[mode];
++ for (k = cost_classes_ptr->num - 1; k >= 0; k--)
+ {
+- mem_cost = ira_memory_move_cost[mode];
+- for (k = cost_classes_ptr->num - 1; k >= 0; k--)
+- {
+- rclass = cost_classes[k];
+- pp_costs[k] = ((mem_cost[rclass][0]
+- + mem_cost[rclass][1])
+- * frequency);
+- }
++ rclass = cost_classes[k];
++ pp_costs[k] = ((move_in_cost[rclass][op_class]
++ + move_out_cost[op_class][rclass])
++ * frequency);
+ }
+- else
+- {
+- move_in_cost = ira_may_move_in_cost[mode];
+- move_out_cost = ira_may_move_out_cost[mode];
+- for (k = cost_classes_ptr->num - 1; k >= 0; k--)
+- {
+- rclass = cost_classes[k];
+- pp_costs[k] = ((move_in_cost[rclass][op_class]
+- + move_out_cost[op_class][rclass])
+- * frequency);
+- }
+- }
+ }
+
+ /* If the alternative actually allows memory, make
+ things a bit cheaper since we won't need an extra
+ insn to load it. */
+- if (op_class != NO_REGS)
+- pp->mem_cost
+- = ((out_p ? ira_memory_move_cost[mode][op_class][0] : 0)
+- + (in_p ? ira_memory_move_cost[mode][op_class][1] : 0)
+- - allows_mem[i]) * frequency;
++ pp->mem_cost
++ = ((out_p ? ira_memory_move_cost[mode][op_class][0] : 0)
++ + (in_p ? ira_memory_move_cost[mode][op_class][1] : 0)
++ - allows_mem[i]) * frequency;
+ /* If we have assigned a class to this allocno in
+ our first pass, add a cost to this alternative
+ corresponding to what we would add if this
+@@ -877,28 +836,15 @@
+ enum reg_class pref_class = pref[COST_INDEX (REGNO (op))];
+
+ if (pref_class == NO_REGS)
+- {
+- if (op_class != NO_REGS)
+- alt_cost
+- += ((out_p
+- ? ira_memory_move_cost[mode][op_class][0]
+- : 0)
+- + (in_p
+- ? ira_memory_move_cost[mode][op_class][1]
+- : 0));
+- }
+- else if (op_class == NO_REGS)
+ alt_cost
+ += ((out_p
+- ? ira_memory_move_cost[mode][pref_class][1]
+- : 0)
++ ? ira_memory_move_cost[mode][op_class][0] : 0)
+ + (in_p
+- ? ira_memory_move_cost[mode][pref_class][0]
++ ? ira_memory_move_cost[mode][op_class][1]
+ : 0));
+ else if (ira_reg_class_intersect[pref_class][op_class]
+ == NO_REGS)
+- alt_cost += (ira_register_move_cost
+- [mode][pref_class][op_class]);
++ alt_cost += ira_register_move_cost[mode][pref_class][op_class];
+ }
+ }
+ }
diff --git a/debian/rules.patch b/debian/rules.patch
index addc427..347fa61 100644
--- a/debian/rules.patch
+++ b/debian/rules.patch
@@ -80,6 +80,7 @@ debian_patches += \
pr59758 \
pr57653 \
libitm-aarch64 \
+ pr60969-revert \
gdb_depends := $(shell dpkg -s gdb | grep '^Depends:.*libpython3')
ifneq (,$(findstring libpython3,$(gdb_depends)))