From: Richard Henderson Date: Thu, 4 Apr 2002 22:48:16 +0000 (-0800) Subject: re PR rtl-optimization/6165 ([i686] stack frame freed too early) X-Git-Tag: releases/gcc-3.3.0~5886 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c4484b8fe055db414048860502d480c63e7ee6b1;p=thirdparty%2Fgcc.git re PR rtl-optimization/6165 ([i686] stack frame freed too early) PR opt/6165 * alias.c (true_dependence): Force (mem:blk (scratch)) to conflict. (write_dependence_p): Likewise. From-SVN: r51882 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 23e407a49dec..d14b04c413f7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2002-04-04 Richard Henderson + + PR opt/6165 + * alias.c (true_dependence): Force (mem:blk (scratch)) to conflict. + (write_dependence_p): Likewise. + 2002-04-04 Richard Henderson * predict.c (estimate_bb_frequencies): Do frequency calculation diff --git a/gcc/alias.c b/gcc/alias.c index 42d8e18210df..29da8ffafb3f 100644 --- a/gcc/alias.c +++ b/gcc/alias.c @@ -2039,6 +2039,13 @@ true_dependence (mem, mem_mode, x, varies) if (MEM_VOLATILE_P (x) && MEM_VOLATILE_P (mem)) return 1; + /* (mem:BLK (scratch)) is a special mechanism to conflict with everything. + This is used in epilogue deallocation functions. */ + if (GET_MODE (x) == BLKmode && GET_CODE (XEXP (x, 0)) == SCRATCH) + return 1; + if (GET_MODE (mem) == BLKmode && GET_CODE (XEXP (mem, 0)) == SCRATCH) + return 1; + if (DIFFERENT_ALIAS_SETS_P (x, mem)) return 0; @@ -2173,6 +2180,13 @@ write_dependence_p (mem, x, writep) if (MEM_VOLATILE_P (x) && MEM_VOLATILE_P (mem)) return 1; + /* (mem:BLK (scratch)) is a special mechanism to conflict with everything. + This is used in epilogue deallocation functions. */ + if (GET_MODE (x) == BLKmode && GET_CODE (XEXP (x, 0)) == SCRATCH) + return 1; + if (GET_MODE (mem) == BLKmode && GET_CODE (XEXP (mem, 0)) == SCRATCH) + return 1; + if (DIFFERENT_ALIAS_SETS_P (x, mem)) return 0;