mirror of git://gcc.gnu.org/git/gcc.git
PR middle-end/PR28690
PR middle-end/PR28690 * rtlanal.c: Update copyright years. (commutative_operand_precedence): Give SYMBOL_REF's the same precedence as REG_POINTER and MEM_POINTER operands. * emit-rtl.c (gen_reg_rtx_and_attrs): New function. (set_reg_attrs_from_value): Call mark_reg_pointer as appropriate. * rtl.h (gen_reg_rtx_and_attrs): Add prototype for new function. * gcse.c: Update copyright years. (pre_delete): Call gen_reg_rtx_and_attrs. (hoist_code): Likewise. (build_store_vectors): Likewise. (delete_store): Likewise. * loop-invariant.c (move_invariant_reg): Likewise. Update copyright years. From-SVN: r133985
This commit is contained in:
parent
64ef8953e3
commit
46b71b0354
|
|
@ -1,3 +1,20 @@
|
||||||
|
2008-04-07 Peter Bergner <bergner@vnet.ibm.com>
|
||||||
|
|
||||||
|
PR middle-end/PR28690
|
||||||
|
* rtlanal.c: Update copyright years.
|
||||||
|
(commutative_operand_precedence): Give SYMBOL_REF's the same precedence
|
||||||
|
as REG_POINTER and MEM_POINTER operands.
|
||||||
|
* emit-rtl.c (gen_reg_rtx_and_attrs): New function.
|
||||||
|
(set_reg_attrs_from_value): Call mark_reg_pointer as appropriate.
|
||||||
|
* rtl.h (gen_reg_rtx_and_attrs): Add prototype for new function.
|
||||||
|
* gcse.c: Update copyright years.
|
||||||
|
(pre_delete): Call gen_reg_rtx_and_attrs.
|
||||||
|
(hoist_code): Likewise.
|
||||||
|
(build_store_vectors): Likewise.
|
||||||
|
(delete_store): Likewise.
|
||||||
|
* loop-invariant.c (move_invariant_reg): Likewise.
|
||||||
|
Update copyright years.
|
||||||
|
|
||||||
2008-04-07 Uros Bizjak <ubizjak@gmail.com>
|
2008-04-07 Uros Bizjak <ubizjak@gmail.com>
|
||||||
|
|
||||||
* config/i386/i386.md ("*sse_prologue_save_insn"): Use braced output
|
* config/i386/i386.md ("*sse_prologue_save_insn"): Use braced output
|
||||||
|
|
|
||||||
|
|
@ -964,11 +964,32 @@ set_reg_attrs_from_value (rtx reg, rtx x)
|
||||||
int offset;
|
int offset;
|
||||||
|
|
||||||
offset = byte_lowpart_offset (GET_MODE (reg), GET_MODE (x));
|
offset = byte_lowpart_offset (GET_MODE (reg), GET_MODE (x));
|
||||||
if (MEM_P (x) && MEM_OFFSET (x) && GET_CODE (MEM_OFFSET (x)) == CONST_INT)
|
if (MEM_P (x))
|
||||||
REG_ATTRS (reg)
|
{
|
||||||
= get_reg_attrs (MEM_EXPR (x), INTVAL (MEM_OFFSET (x)) + offset);
|
if (MEM_OFFSET (x) && GET_CODE (MEM_OFFSET (x)) == CONST_INT)
|
||||||
if (REG_P (x) && REG_ATTRS (x))
|
REG_ATTRS (reg)
|
||||||
update_reg_offset (reg, x, offset);
|
= get_reg_attrs (MEM_EXPR (x), INTVAL (MEM_OFFSET (x)) + offset);
|
||||||
|
if (MEM_POINTER (x))
|
||||||
|
mark_reg_pointer (reg, MEM_ALIGN (x));
|
||||||
|
}
|
||||||
|
else if (REG_P (x))
|
||||||
|
{
|
||||||
|
if (REG_ATTRS (x))
|
||||||
|
update_reg_offset (reg, x, offset);
|
||||||
|
if (REG_POINTER (x))
|
||||||
|
mark_reg_pointer (reg, REGNO_POINTER_ALIGN (REGNO (x)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Generate a REG rtx for a new pseudo register, copying the mode
|
||||||
|
and attributes from X. */
|
||||||
|
|
||||||
|
rtx
|
||||||
|
gen_reg_rtx_and_attrs (rtx x)
|
||||||
|
{
|
||||||
|
rtx reg = gen_reg_rtx (GET_MODE (x));
|
||||||
|
set_reg_attrs_from_value (reg, x);
|
||||||
|
return reg;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set the register attributes for registers contained in PARM_RTX.
|
/* Set the register attributes for registers contained in PARM_RTX.
|
||||||
|
|
|
||||||
11
gcc/gcse.c
11
gcc/gcse.c
|
|
@ -1,7 +1,7 @@
|
||||||
/* Global common subexpression elimination/Partial redundancy elimination
|
/* Global common subexpression elimination/Partial redundancy elimination
|
||||||
and global constant/copy propagation for GNU compiler.
|
and global constant/copy propagation for GNU compiler.
|
||||||
Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
|
Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
|
||||||
2006, 2007 Free Software Foundation, Inc.
|
2006, 2007, 2008 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GCC.
|
This file is part of GCC.
|
||||||
|
|
||||||
|
|
@ -4463,8 +4463,7 @@ pre_delete (void)
|
||||||
expressions into. Get the mode for the new pseudo from
|
expressions into. Get the mode for the new pseudo from
|
||||||
the mode of the original destination pseudo. */
|
the mode of the original destination pseudo. */
|
||||||
if (expr->reaching_reg == NULL)
|
if (expr->reaching_reg == NULL)
|
||||||
expr->reaching_reg
|
expr->reaching_reg = gen_reg_rtx_and_attrs (SET_DEST (set));
|
||||||
= gen_reg_rtx (GET_MODE (SET_DEST (set)));
|
|
||||||
|
|
||||||
gcse_emit_move_after (expr->reaching_reg, SET_DEST (set), insn);
|
gcse_emit_move_after (expr->reaching_reg, SET_DEST (set), insn);
|
||||||
delete_insn (insn);
|
delete_insn (insn);
|
||||||
|
|
@ -4988,7 +4987,7 @@ hoist_code (void)
|
||||||
from the mode of the original destination pseudo. */
|
from the mode of the original destination pseudo. */
|
||||||
if (expr->reaching_reg == NULL)
|
if (expr->reaching_reg == NULL)
|
||||||
expr->reaching_reg
|
expr->reaching_reg
|
||||||
= gen_reg_rtx (GET_MODE (SET_DEST (set)));
|
= gen_reg_rtx_and_attrs (SET_DEST (set));
|
||||||
|
|
||||||
gcse_emit_move_after (expr->reaching_reg, SET_DEST (set), insn);
|
gcse_emit_move_after (expr->reaching_reg, SET_DEST (set), insn);
|
||||||
delete_insn (insn);
|
delete_insn (insn);
|
||||||
|
|
@ -6121,7 +6120,7 @@ build_store_vectors (void)
|
||||||
are any side effects. */
|
are any side effects. */
|
||||||
if (TEST_BIT (ae_gen[bb->index], ptr->index))
|
if (TEST_BIT (ae_gen[bb->index], ptr->index))
|
||||||
{
|
{
|
||||||
rtx r = gen_reg_rtx (GET_MODE (ptr->pattern));
|
rtx r = gen_reg_rtx_and_attrs (ptr->pattern);
|
||||||
if (dump_file)
|
if (dump_file)
|
||||||
fprintf (dump_file, "Removing redundant store:\n");
|
fprintf (dump_file, "Removing redundant store:\n");
|
||||||
replace_store_insn (r, XEXP (st, 0), bb, ptr);
|
replace_store_insn (r, XEXP (st, 0), bb, ptr);
|
||||||
|
|
@ -6444,7 +6443,7 @@ delete_store (struct ls_expr * expr, basic_block bb)
|
||||||
rtx reg, i, del;
|
rtx reg, i, del;
|
||||||
|
|
||||||
if (expr->reaching_reg == NULL_RTX)
|
if (expr->reaching_reg == NULL_RTX)
|
||||||
expr->reaching_reg = gen_reg_rtx (GET_MODE (expr->pattern));
|
expr->reaching_reg = gen_reg_rtx_and_attrs (expr->pattern);
|
||||||
|
|
||||||
reg = expr->reaching_reg;
|
reg = expr->reaching_reg;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/* RTL-level loop invariant motion.
|
/* RTL-level loop invariant motion.
|
||||||
Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
|
Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GCC.
|
This file is part of GCC.
|
||||||
|
|
||||||
|
|
@ -1193,7 +1193,7 @@ move_invariant_reg (struct loop *loop, unsigned invno)
|
||||||
need to create a temporary register. */
|
need to create a temporary register. */
|
||||||
set = single_set (inv->insn);
|
set = single_set (inv->insn);
|
||||||
dest = SET_DEST (set);
|
dest = SET_DEST (set);
|
||||||
reg = gen_reg_rtx (GET_MODE (dest));
|
reg = gen_reg_rtx_and_attrs (dest);
|
||||||
|
|
||||||
/* Try replacing the destination by a new pseudoregister. */
|
/* Try replacing the destination by a new pseudoregister. */
|
||||||
if (!validate_change (inv->insn, &SET_DEST (set), reg, false))
|
if (!validate_change (inv->insn, &SET_DEST (set), reg, false))
|
||||||
|
|
|
||||||
|
|
@ -1502,6 +1502,7 @@ extern rtvec gen_rtvec_v (int, rtx *);
|
||||||
extern rtx gen_reg_rtx (enum machine_mode);
|
extern rtx gen_reg_rtx (enum machine_mode);
|
||||||
extern rtx gen_rtx_REG_offset (rtx, enum machine_mode, unsigned int, int);
|
extern rtx gen_rtx_REG_offset (rtx, enum machine_mode, unsigned int, int);
|
||||||
extern rtx gen_reg_rtx_offset (rtx, enum machine_mode, int);
|
extern rtx gen_reg_rtx_offset (rtx, enum machine_mode, int);
|
||||||
|
extern rtx gen_reg_rtx_and_attrs (rtx);
|
||||||
extern rtx gen_label_rtx (void);
|
extern rtx gen_label_rtx (void);
|
||||||
extern rtx gen_lowpart_common (enum machine_mode, rtx);
|
extern rtx gen_lowpart_common (enum machine_mode, rtx);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
/* Analyze RTL for GNU compiler.
|
/* Analyze RTL for GNU compiler.
|
||||||
Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
|
Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
|
||||||
1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software
|
1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software
|
||||||
Foundation, Inc.
|
Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GCC.
|
This file is part of GCC.
|
||||||
|
|
@ -2898,6 +2898,8 @@ commutative_operand_precedence (rtx op)
|
||||||
switch (GET_RTX_CLASS (code))
|
switch (GET_RTX_CLASS (code))
|
||||||
{
|
{
|
||||||
case RTX_CONST_OBJ:
|
case RTX_CONST_OBJ:
|
||||||
|
if (code == SYMBOL_REF)
|
||||||
|
return -1;
|
||||||
if (code == CONST_INT)
|
if (code == CONST_INT)
|
||||||
return -6;
|
return -6;
|
||||||
if (code == CONST_DOUBLE)
|
if (code == CONST_DOUBLE)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue