Andrew Geissler | 84ad7c5 | 2020-06-27 00:00:16 -0500 | [diff] [blame^] | 1 | From ac30efb4a5f5b6d289fdd27b268c2095d60dcb42 Mon Sep 17 00:00:00 2001 |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 2 | From: Mahesh Bodapati <mbodapat@xilinx.com> |
| 3 | Date: Thu, 2 Mar 2017 19:02:31 +0530 |
Andrew Geissler | 84ad7c5 | 2020-06-27 00:00:16 -0500 | [diff] [blame^] | 4 | Subject: [PATCH 36/63] [Patch,Microblaze]:reverting the cost check before |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 5 | propagating constants. |
| 6 | |
| 7 | --- |
| 8 | gcc/cprop.c | 4 ++++ |
| 9 | 1 file changed, 4 insertions(+) |
| 10 | |
| 11 | diff --git a/gcc/cprop.c b/gcc/cprop.c |
Andrew Geissler | 84ad7c5 | 2020-06-27 00:00:16 -0500 | [diff] [blame^] | 12 | index 65c0130..42bcc81 100644 |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 13 | --- a/gcc/cprop.c |
| 14 | +++ b/gcc/cprop.c |
| 15 | @@ -733,6 +733,7 @@ try_replace_reg (rtx from, rtx to, rtx_insn *insn) |
| 16 | int success = 0; |
| 17 | rtx set = single_set (insn); |
| 18 | |
| 19 | +#if 0 |
| 20 | bool check_rtx_costs = true; |
| 21 | bool speed = optimize_bb_for_speed_p (BLOCK_FOR_INSN (insn)); |
| 22 | int old_cost = set ? set_rtx_cost (set, speed) : 0; |
| 23 | @@ -744,6 +745,7 @@ try_replace_reg (rtx from, rtx to, rtx_insn *insn) |
| 24 | && (GET_CODE (XEXP (note, 0)) == CONST |
| 25 | || CONSTANT_P (XEXP (note, 0))))) |
| 26 | check_rtx_costs = false; |
| 27 | +#endif |
| 28 | |
| 29 | /* Usually we substitute easy stuff, so we won't copy everything. |
| 30 | We however need to take care to not duplicate non-trivial CONST |
| 31 | @@ -752,6 +754,7 @@ try_replace_reg (rtx from, rtx to, rtx_insn *insn) |
| 32 | |
| 33 | validate_replace_src_group (from, to, insn); |
| 34 | |
| 35 | +#if 0 |
| 36 | /* If TO is a constant, check the cost of the set after propagation |
| 37 | to the cost of the set before the propagation. If the cost is |
| 38 | higher, then do not replace FROM with TO. */ |
| 39 | @@ -764,6 +767,7 @@ try_replace_reg (rtx from, rtx to, rtx_insn *insn) |
| 40 | return false; |
| 41 | } |
| 42 | |
| 43 | +#endif |
| 44 | |
| 45 | if (num_changes_pending () && apply_change_group ()) |
| 46 | success = 1; |
| 47 | -- |
| 48 | 2.7.4 |
| 49 | |