diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-04-20 12:19:51 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-04-20 12:19:51 +0000 |
commit | df3e5a6720533cd7fc68542e730168fc752cc698 (patch) | |
tree | 3f6e41a7f11c3a0430801cc7cdfcbf3fcd38d567 /gcc | |
parent | ebc3ea23a26f9279084d115adcfb7464f4925109 (diff) | |
download | gcc-df3e5a6720533cd7fc68542e730168fc752cc698.tar.gz |
PR bootstrap/53021
* alias.h (UNIQUE_BASE_VALUE_SP, UNIQUE_BASE_VALUE_ARGP,
UNIQUE_BASE_VALUE_FP, UNIQUE_BASE_VALUE_HFP): Define.
* alias.c (init_alias_targets): Use UNIQUE_BASE_VALUE_*
macros instead of constants.
* dse.c (record_store): Check for SP ADDRESS by comparing
XWINT to UNIQUE_BASE_VALUE_SP instead of expecting
XEXP to be stack_pointer_rtx.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@186623 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 11 | ||||
-rw-r--r-- | gcc/alias.c | 14 | ||||
-rw-r--r-- | gcc/alias.h | 10 | ||||
-rw-r--r-- | gcc/dse.c | 4 |
4 files changed, 31 insertions, 8 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 68593c90b8c..ff0cc2c1b1a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,14 @@ +2012-04-20 Jakub Jelinek <jakub@redhat.com> + + PR bootstrap/53021 + * alias.h (UNIQUE_BASE_VALUE_SP, UNIQUE_BASE_VALUE_ARGP, + UNIQUE_BASE_VALUE_FP, UNIQUE_BASE_VALUE_HFP): Define. + * alias.c (init_alias_targets): Use UNIQUE_BASE_VALUE_* + macros instead of constants. + * dse.c (record_store): Check for SP ADDRESS by comparing + XWINT to UNIQUE_BASE_VALUE_SP instead of expecting + XEXP to be stack_pointer_rtx. + 2012-04-20 Richard Guenther <rguenther@suse.de> * tree-ssa-copy.c (propagate_tree_value_into_stmt): Use diff --git a/gcc/alias.c b/gcc/alias.c index 09befd7eced..7b1986c0923 100644 --- a/gcc/alias.c +++ b/gcc/alias.c @@ -1,6 +1,6 @@ /* Alias analysis for GNU C Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, - 2007, 2008, 2009, 2010 Free Software Foundation, Inc. + 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. Contributed by John Carr (jfc@mit.edu). This file is part of GCC. @@ -2734,11 +2734,15 @@ init_alias_target (void) && HARD_REGNO_MODE_OK (i, Pmode)) static_reg_base_value[i] = arg_base_value; - static_reg_base_value[STACK_POINTER_REGNUM] = unique_base_value (-1); - static_reg_base_value[ARG_POINTER_REGNUM] = unique_base_value (-2); - static_reg_base_value[FRAME_POINTER_REGNUM] = unique_base_value (-3); + static_reg_base_value[STACK_POINTER_REGNUM] + = unique_base_value (UNIQUE_BASE_VALUE_SP); + static_reg_base_value[ARG_POINTER_REGNUM] + = unique_base_value (UNIQUE_BASE_VALUE_ARGP); + static_reg_base_value[FRAME_POINTER_REGNUM] + = unique_base_value (UNIQUE_BASE_VALUE_FP); #if !HARD_FRAME_POINTER_IS_FRAME_POINTER - static_reg_base_value[HARD_FRAME_POINTER_REGNUM] = unique_base_value (-4); + static_reg_base_value[HARD_FRAME_POINTER_REGNUM] + = unique_base_value (UNIQUE_BASE_VALUE_HFP); #endif } diff --git a/gcc/alias.h b/gcc/alias.h index 49905b13649..d4dd3038292 100644 --- a/gcc/alias.h +++ b/gcc/alias.h @@ -1,5 +1,6 @@ /* Exported functions from alias.c - Copyright (C) 2004, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 2004, 2007, 2008, 2009, 2010, 2012 + Free Software Foundation, Inc. This file is part of GCC. @@ -50,4 +51,11 @@ extern int nonoverlapping_memrefs_p (const_rtx, const_rtx, bool); memory barriers, including an address of SCRATCH. */ #define ALIAS_SET_MEMORY_BARRIER ((alias_set_type) -1) +/* Values of XWINT (address, 0) of Pmode ADDRESS rtxes for special + registers. */ +#define UNIQUE_BASE_VALUE_SP -1 +#define UNIQUE_BASE_VALUE_ARGP -2 +#define UNIQUE_BASE_VALUE_FP -3 +#define UNIQUE_BASE_VALUE_HFP -4 + #endif /* GCC_ALIAS_H */ diff --git a/gcc/dse.c b/gcc/dse.c index d6c8de7fad8..9f57613d514 100644 --- a/gcc/dse.c +++ b/gcc/dse.c @@ -1,5 +1,5 @@ /* RTL dead store elimination. - Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 + Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. Contributed by Richard Sandiford <rsandifor@codesourcery.com> @@ -1503,7 +1503,7 @@ record_store (rtx body, bb_info_t bb_info) if (!base_term || (GET_CODE (base_term) == ADDRESS && GET_MODE (base_term) == Pmode - && XEXP (base_term, 0) == stack_pointer_rtx)) + && XWINT (base_term, 0) == UNIQUE_BASE_VALUE_SP)) insn_info->stack_pointer_based = true; insn_info->contains_cselib_groups = true; |