aboutsummaryrefslogtreecommitdiffstats
path: root/meta-xilinx-bsp/recipes-microblaze/gcc/gcc-8/0036-Patch-Microblaze-reverting-the-cost-check-before-pro.patch
blob: 54ccd9a0c72a2cb5adc27a5b0d4e4fd3bb2f4354 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
From 7156e379a67fa47a5fb9ede1448c0d528dbda65b Mon Sep 17 00:00:00 2001
From: Mahesh Bodapati <mbodapat@xilinx.com>
Date: Thu, 2 Mar 2017 19:02:31 +0530
Subject: [PATCH 36/54] [Patch,Microblaze]:reverting the cost check before
 propagating constants.

---
 gcc/cprop.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gcc/cprop.c b/gcc/cprop.c
index e4df509..deb706b 100644
--- a/gcc/cprop.c
+++ b/gcc/cprop.c
@@ -733,6 +733,7 @@ try_replace_reg (rtx from, rtx to, rtx_insn *insn)
   int success = 0;
   rtx set = single_set (insn);
 
+#if 0
   bool check_rtx_costs = true;
   bool speed = optimize_bb_for_speed_p (BLOCK_FOR_INSN (insn));
   int old_cost = set ? set_rtx_cost (set, speed) : 0;
@@ -744,6 +745,7 @@ try_replace_reg (rtx from, rtx to, rtx_insn *insn)
 	  && (GET_CODE (XEXP (note, 0)) == CONST
 	      || CONSTANT_P (XEXP (note, 0)))))
     check_rtx_costs = false;
+#endif
 
   /* Usually we substitute easy stuff, so we won't copy everything.
      We however need to take care to not duplicate non-trivial CONST
@@ -752,6 +754,7 @@ try_replace_reg (rtx from, rtx to, rtx_insn *insn)
 
   validate_replace_src_group (from, to, insn);
 
+#if 0
   /* If TO is a constant, check the cost of the set after propagation
      to the cost of the set before the propagation.  If the cost is
      higher, then do not replace FROM with TO.  */
@@ -764,6 +767,7 @@ try_replace_reg (rtx from, rtx to, rtx_insn *insn)
       return false;
     }
 
+#endif
 
   if (num_changes_pending () && apply_change_group ())
     success = 1;
-- 
2.7.4