summaryrefslogtreecommitdiff
path: root/gcc/df-scan.c
diff options
context:
space:
mode:
authorspark <spark@138bc75d-0d04-0410-961f-82ee72b054a4>2007-07-05 23:44:44 +0000
committerspark <spark@138bc75d-0d04-0410-961f-82ee72b054a4>2007-07-05 23:44:44 +0000
commit37ad331865e3a7d269f5236df4e7c1aea72fedd0 (patch)
tree28228c38feeee42fd8a1f3ffb190fb8e777dcee4 /gcc/df-scan.c
parent2e5b424c063f4421d2589cea2e13a0f0fc25ffff (diff)
downloadgcc-37ad331865e3a7d269f5236df4e7c1aea72fedd0.tar.gz
2007-07-05 Seongbae Park <seongbae.park@gmail.com>
PR rtl-optimization/32475 * df-scan.c (df_def_record_1): Add a use of the stack pointer for every definition of the stack pointer. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126391 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/df-scan.c')
-rw-r--r--gcc/df-scan.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/df-scan.c b/gcc/df-scan.c
index 61147be59fc..4a8a1be00b1 100644
--- a/gcc/df-scan.c
+++ b/gcc/df-scan.c
@@ -2763,6 +2763,12 @@ df_def_record_1 (struct df_collection_rec *collection_rec,
|| (GET_CODE (dst) == SUBREG && REG_P (SUBREG_REG (dst))))
df_ref_record (collection_rec,
dst, loc, bb, insn, DF_REF_REG_DEF, flags);
+
+ /* We want to keep sp alive everywhere - by making all
+ writes to sp also use of sp. */
+ if (REG_P (dst) && REGNO (dst) == STACK_POINTER_REGNUM)
+ df_ref_record (collection_rec,
+ dst, NULL, bb, insn, DF_REF_REG_USE, flags);
}