From 048f927a758755c84193759081d4283575280ed1 Mon Sep 17 00:00:00 2001 From: Wilco Dijkstra Date: Tue, 2 Dec 2014 11:55:08 +0000 Subject: [PATCH] [PATCH] Improve spillcost of literal pool loads 2014-12-02 Wilco Dijkstra gcc/ ira-costs.c (scan_one_insn): Improve spill cost adjustment. gcc/testsuite gcc.target/aarch64/remat1.c: New testcase. From-SVN: r218266 --- gcc/ChangeLog | 4 ++++ gcc/ira-costs.c | 5 ++--- gcc/testsuite/ChangeLog | 4 ++++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 91bde4ffa61..09a541660c5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2014-12-02 Wilco Dijkstra + + * ira-costs.c (scan_one_insn): Improve spill cost adjustment. + 2014-12-02 Martin Jambor PR ipa/63814 diff --git a/gcc/ira-costs.c b/gcc/ira-costs.c index 2dabead6269..72c00cccdd2 100644 --- a/gcc/ira-costs.c +++ b/gcc/ira-costs.c @@ -1462,12 +1462,11 @@ scan_one_insn (rtx_insn *insn) && ((MEM_P (XEXP (note, 0)) && !side_effects_p (SET_SRC (set))) || (CONSTANT_P (XEXP (note, 0)) - && targetm.legitimate_constant_p (GET_MODE (SET_DEST (set)), - XEXP (note, 0)) + && (! flag_pic || LEGITIMATE_PIC_OPERAND_P (XEXP (note, 0))) && REG_N_SETS (REGNO (SET_DEST (set))) == 1)) && general_operand (SET_SRC (set), GET_MODE (SET_SRC (set)))) { - enum reg_class cl = GENERAL_REGS; + enum reg_class cl = ALL_REGS; rtx reg = SET_DEST (set); int num = COST_INDEX (REGNO (reg)); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index dff9d0211bd..a17cc6c298e 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2014-12-02 Wilco Dijkstra + + * gcc.target/aarch64/remat1.c: New testcase. + 2014-12-01 Oleg Endo PR rtl-optimization/59278 -- 2.30.2