From: Richard Henderson Date: Fri, 5 Apr 2002 03:20:17 +0000 (-0800) Subject: re PR rtl-optimization/6165 ([i686] stack frame freed too early) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=638738b4440de464b5dfcc892d636f9bb0cce9f9;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: r51894 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1a7d5d09e332..91d20ccae867 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 David S. Miller * calls.c (store_one_arg): If ECF_SIBCALL, use tail_call_reg. diff --git a/gcc/alias.c b/gcc/alias.c index 060d1a5e076d..2725bd1bd8ed 100644 --- a/gcc/alias.c +++ b/gcc/alias.c @@ -1734,6 +1734,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; @@ -1805,6 +1812,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; diff --git a/gcc/flow.c b/gcc/flow.c index 71a685e7b829..520303b839d4 100644 --- a/gcc/flow.c +++ b/gcc/flow.c @@ -3948,7 +3948,7 @@ init_propagate_block_info (bb, live, local_set, cond_local_set, flags) used later in the block are dead. So make a pass over the block recording any such that are made and show them dead at the end. We do a very conservative and simple job here. */ - if (optimize + if (0 && optimize && ! (TREE_CODE (TREE_TYPE (current_function_decl)) == FUNCTION_TYPE && (TYPE_RETURNS_STACK_DEPRESSED (TREE_TYPE (current_function_decl))))