------- Comment #46 from bonzini at gnu dot org 2009-02-13 16:32 ------- Regarding your comment in bug 26854:
> address calculations are no longer optimized as much as they > were before Sometimes, actually, they are optimized better. It depends on the case. In comment #42, also, you talked about -O1, where fwprop is not enabled. So I'm failing to understand if the problem is at the tree or RTL level for this bug. My comment was related to something said in PR39517, i.e. that chains are very expensive and a reason why fwprop should not be enabled at -O1. Following up on my comment, alternatively, fwprop could compute its own dataflow instead of using UD chains, since it only cares by design about uses with a single definition. This looks much better. You would use something like df_chain_create_bb and df_chain_create_bb_process_use, with code like the following (cfr. df_chain_create_bb_process_use): /* Do not want to go through this for an uninitialized var. */ int count = DF_DEFS_COUNT (regno); if (count) { if (top_flag == (DF_REF_FLAGS (use) & DF_REF_AT_TOP)) { unsigned int first_index = DF_DEFS_BEGIN (uregno); unsigned int last_index = first_index + count - 1; /* Uninitialized? Exit. */ bmp_iter_set_init (&bi, local_rd, first_index, &def_index); if (!bmp_iter_set (&bi, &def_index) || def_index > last_index) continue; /* 2 or more defs for this use, exit. */ bmp_iter_next (&(ITER), &(BITNUM))) if (!bmp_iter_set (&bi, &def_index) || def_index > last_index) SET_BIT (can_fwprop, DF_REF_ID (use)); } } With this change there would be no reason not to run fwprop at -O1. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33928