From 1e7e62b1145656ae1002c040023eb7c8a342e697 Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Mon, 20 Apr 2015 21:24:57 +0200 Subject: [PATCH] i386.c (set_pic_reg_ever_live): Remove. * config/i386/i386.c (set_pic_reg_ever_live): Remove. (legitimize_pic_address): Do not call set_pic_reg_ever_live. (legitimize_tls_address): Ditto. (ix86_expand_move): Ditto. (ix86_expand_binary_operator): Remove reload_in_progress checks. (ix86_expand_unary_operator): Ditto. * config/i386/predicates.md (index_register_operand): Ditto. From-SVN: r222246 --- gcc/ChangeLog | 10 ++++++++ gcc/config/i386/i386.c | 44 +++++++---------------------------- gcc/config/i386/predicates.md | 2 +- 3 files changed, 20 insertions(+), 36 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a46036f43cf..a4c10765dfa 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2015-04-19 Uros Bizjak + + * config/i386/i386.c (set_pic_reg_ever_live): Remove. + (legitimize_pic_address): Do not call set_pic_reg_ever_live. + (legitimize_tls_address): Ditto. + (ix86_expand_move): Ditto. + (ix86_expand_binary_operator): Remove reload_in_progress checks. + (ix86_expand_unary_operator): Ditto. + * config/i386/predicates.md (index_register_operand): Ditto. + 2015-04-20 Selim Belbachir * reorg.c (try_merge_delay_insns): Improve correctness checking diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index d870ab81525..74332f3bef0 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -13576,15 +13576,6 @@ ix86_GOT_alias_set (void) return set; } -/* Set regs_ever_live for PIC base address register - to true if required. */ -static void -set_pic_reg_ever_live () -{ - if (reload_in_progress) - df_set_regs_ever_live (REGNO (pic_offset_table_rtx), true); -} - /* Return a legitimate reference for ORIG (an address) using the register REG. If REG is 0, a new pseudo is generated. @@ -13635,7 +13626,6 @@ legitimize_pic_address (rtx orig, rtx reg) /* This symbol may be referenced via a displacement from the PIC base address (@GOTOFF). */ - set_pic_reg_ever_live (); if (GET_CODE (addr) == CONST) addr = XEXP (addr, 0); if (GET_CODE (addr) == PLUS) @@ -13667,7 +13657,6 @@ legitimize_pic_address (rtx orig, rtx reg) /* This symbol may be referenced via a displacement from the PIC base address (@GOTOFF). */ - set_pic_reg_ever_live (); if (GET_CODE (addr) == CONST) addr = XEXP (addr, 0); if (GET_CODE (addr) == PLUS) @@ -13728,7 +13717,6 @@ legitimize_pic_address (rtx orig, rtx reg) /* This symbol must be referenced via a load from the Global Offset Table (@GOT). */ - set_pic_reg_ever_live (); new_rtx = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr), UNSPEC_GOT); new_rtx = gen_rtx_CONST (Pmode, new_rtx); if (TARGET_64BIT) @@ -13780,7 +13768,6 @@ legitimize_pic_address (rtx orig, rtx reg) { if (!TARGET_64BIT) { - set_pic_reg_ever_live (); new_rtx = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, op0), UNSPEC_GOTOFF); new_rtx = gen_rtx_PLUS (Pmode, new_rtx, op1); @@ -14082,7 +14069,6 @@ legitimize_tls_address (rtx x, enum tls_model model, bool for_mov) } else if (flag_pic) { - set_pic_reg_ever_live (); pic = pic_offset_table_rtx; type = TARGET_ANY_GNU_TLS ? UNSPEC_GOTNTPOFF : UNSPEC_GOTTPOFF; } @@ -17306,10 +17292,8 @@ ix86_expand_move (machine_mode mode, rtx operands[]) /* dynamic-no-pic */ if (MACHOPIC_INDIRECT) { - rtx temp = ((reload_in_progress - || ((op0 && REG_P (op0)) - && mode == Pmode)) - ? op0 : gen_reg_rtx (Pmode)); + rtx temp = (op0 && REG_P (op0) && mode == Pmode) + ? op0 : gen_reg_rtx (Pmode); op1 = machopic_indirect_data_reference (op1, temp); if (MACHOPIC_PURE) op1 = machopic_legitimize_pic_address (op1, mode, @@ -17957,16 +17941,10 @@ ix86_expand_binary_operator (enum rtx_code code, machine_mode mode, /* Emit the instruction. */ op = gen_rtx_SET (VOIDmode, dst, gen_rtx_fmt_ee (code, mode, src1, src2)); - if (reload_in_progress) - { - /* Reload doesn't know about the flags register, and doesn't know that - it doesn't want to clobber it. We can only do this with PLUS. */ - gcc_assert (code == PLUS); - emit_insn (op); - } - else if (reload_completed - && code == PLUS - && !rtx_equal_p (dst, src1)) + + if (reload_completed + && code == PLUS + && !rtx_equal_p (dst, src1)) { /* This is going to be an LEA; avoid splitting it later. */ emit_insn (op); @@ -18130,13 +18108,9 @@ ix86_expand_unary_operator (enum rtx_code code, machine_mode mode, /* Emit the instruction. */ op = gen_rtx_SET (VOIDmode, dst, gen_rtx_fmt_e (code, mode, src)); - if (reload_in_progress || code == NOT) - { - /* Reload doesn't know about the flags register, and doesn't know that - it doesn't want to clobber it. */ - gcc_assert (code == NOT); - emit_insn (op); - } + + if (code == NOT) + emit_insn (op); else { clob = gen_rtx_CLOBBER (VOIDmode, gen_rtx_REG (CCmode, FLAGS_REG)); diff --git a/gcc/config/i386/predicates.md b/gcc/config/i386/predicates.md index 278d3cc6ef0..92533b553a4 100644 --- a/gcc/config/i386/predicates.md +++ b/gcc/config/i386/predicates.md @@ -577,7 +577,7 @@ { if (GET_CODE (op) == SUBREG) op = SUBREG_REG (op); - if (reload_in_progress || reload_completed) + if (reload_completed) return REG_OK_FOR_INDEX_STRICT_P (op); else return REG_OK_FOR_INDEX_NONSTRICT_P (op); -- 2.30.2