re PR rtl-optimization/47525 (DCE fails to eliminate a dead call to a pure function when compiled with -maltivec)
PR rtl-optimization/47525 * df-scan.c: Update copyright years. (df_get_call_refs): Do not mark global registers as DF_REF_REG_USE and non-clobber DF_REF_REG_DEF for calls to const and pure functions. From-SVN: r169768
This commit is contained in:
parent
8e2bc95be5
commit
9cd4f22a45
@ -1,3 +1,10 @@
|
||||
2011-02-02 Peter Bergner <bergner@vnet.ibm.com>
|
||||
|
||||
PR rtl-optimization/47525
|
||||
* df-scan.c: Update copyright years.
|
||||
(df_get_call_refs): Do not mark global registers as DF_REF_REG_USE
|
||||
and non-clobber DF_REF_REG_DEF for calls to const and pure functions.
|
||||
|
||||
2011-02-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
|
||||
|
||||
* config/i386/sysv4.h (TARGET_VERSION): Remove.
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* Scanning of rtl for dataflow analysis.
|
||||
Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
|
||||
2008, 2009, 2010 Free Software Foundation, Inc.
|
||||
2008, 2009, 2010, 2011 Free Software Foundation, Inc.
|
||||
Originally contributed by Michael P. Hayes
|
||||
(m.hayes@elec.canterbury.ac.nz, mhayes@redhat.com)
|
||||
Major rewrite contributed by Danny Berlin (dberlin@dberlin.org)
|
||||
@ -3360,13 +3360,16 @@ df_get_call_refs (struct df_collection_rec * collection_rec,
|
||||
NULL, bb, insn_info, DF_REF_REG_USE,
|
||||
DF_REF_CALL_STACK_USAGE | flags);
|
||||
|
||||
/* Calls may also reference any of the global registers,
|
||||
so they are recorded as used. */
|
||||
/* Calls to const functions cannot access any global registers and calls to
|
||||
pure functions cannot set them. All other calls may reference any of the
|
||||
global registers, so they are recorded as used. */
|
||||
if (!RTL_CONST_CALL_P (insn_info->insn))
|
||||
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
|
||||
if (global_regs[i])
|
||||
{
|
||||
df_ref_record (DF_REF_BASE, collection_rec, regno_reg_rtx[i],
|
||||
NULL, bb, insn_info, DF_REF_REG_USE, flags);
|
||||
if (!RTL_PURE_CALL_P (insn_info->insn))
|
||||
df_ref_record (DF_REF_BASE, collection_rec, regno_reg_rtx[i],
|
||||
NULL, bb, insn_info, DF_REF_REG_DEF, flags);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user