blob: 8f5bed52a6f3ddf13426ce2f5e9fb66aecc43e82 [file] [log] [blame]
Brad Bishop26bdd442019-08-16 17:08:17 -04001From a28768eec0a9d5137196bed8e8c6d284cf4c3cbc Mon Sep 17 00:00:00 2001
2From: Mahesh Bodapati <mbodapat@xilinx.com>
3Date: Tue, 17 Jan 2017 17:33:31 +0530
4Subject: [PATCH 23/54] [Patch] OPT: Update heuristics for loop-invariant for
5 address arithme. .tic.
6
7The changes are made in the patch to update the heuristics
8for loop invariant for address arithmetic. The heuristics is
9changed to calculate the estimated register pressure cost when
10ira based register pressure is not enabled. The estimated
11register pressure cost modifies the existing calculation cost
12associated to perform the Loop invariant code motion for address
13arithmetic.
14
15ChangeLog:
162015-06-17 Ajit Agarwal <ajitkum@xilinx.com>
17 Nagaraju Mekala <nmekala@xilinx.com>
18
19 * loop-invariant.c (gain_for_invariant): update the
20 heuristics for estimate_reg_pressure_cost.
21
22Signed-off-by:Ajit Agarwal ajitkum@xilinx.com
23 Nagaraju Mekala nmekala@xilinx.com
24---
25 gcc/loop-invariant.c | 6 ++----
26 1 file changed, 2 insertions(+), 4 deletions(-)
27
28diff --git a/gcc/loop-invariant.c b/gcc/loop-invariant.c
29index bd31a51..8e22ca0 100644
30--- a/gcc/loop-invariant.c
31+++ b/gcc/loop-invariant.c
32@@ -1466,10 +1466,8 @@ gain_for_invariant (struct invariant *inv, unsigned *regs_needed,
33
34 if (! flag_ira_loop_pressure)
35 {
36- size_cost = (estimate_reg_pressure_cost (new_regs[0] + regs_needed[0],
37- regs_used, speed, call_p)
38- - estimate_reg_pressure_cost (new_regs[0],
39- regs_used, speed, call_p));
40+ size_cost = estimate_reg_pressure_cost (regs_needed[0],
41+ regs_used, speed, call_p);
42 }
43 else if (ret < 0)
44 return -1;
45--
462.7.4
47