aboutsummaryrefslogtreecommitdiff
path: root/gcc/alias.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2012-10-16 11:21:20 +0000
committerJakub Jelinek <jakub@redhat.com>2012-10-16 11:21:20 +0000
commitafaa9bbac29e1b0c4f1924f07aaa646574e97d5c (patch)
tree9ba40d70d5d1df4a70c9881287bb8ea4ea5c49b6 /gcc/alias.c
parent838b71d9b20619b26062de4110b415b78dd95cab (diff)
PR debug/54796
* rtl.h: Document jump flag on VALUE. * cselib.h (cselib_set_value_sp_based, cselib_sp_based_value_p): New prototypes. * alias.c (find_base_term): For cselib_sp_based_value_p return static_reg_base_value[STACK_POINTER_REGNUM]. * cselib.c (SP_BASED_VALUE_P): Define. (cselib_set_value_sp_based, cselib_sp_based_value_p): New functions. * var-tracking.c (add_stores): Call cselib_set_value_sp_based for not yet preserved VALUEs of sp on sp assignments if hard_frame_pointer_adjustment != -1. (vt_initialize): When setting hard_frame_pointer_adjustment, disassociate sp from its previous value and call cselib_set_value_sp_based on a new VALUE created for sp. * gcc.dg/guality/pr54796.c: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@192494 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/alias.c')
-rw-r--r--gcc/alias.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/alias.c b/gcc/alias.c
index 09aef1137ef..244ca520c92 100644
--- a/gcc/alias.c
+++ b/gcc/alias.c
@@ -1640,6 +1640,9 @@ find_base_term (rtx x)
if (!val)
return ret;
+ if (cselib_sp_based_value_p (val))
+ return static_reg_base_value[STACK_POINTER_REGNUM];
+
f = val->locs;
/* Temporarily reset val->locs to avoid infinite recursion. */
val->locs = NULL;