1 Jun 2004 01:06
Re: [PATCH] Fix PR optimization/13653
Jeffrey A Law <law <at> redhat.com>
2004-05-31 23:06:53 GMT
2004-05-31 23:06:53 GMT
On Thu, 2004-05-27 at 02:33, Eric Botcazou wrote: > > It seems to me that if the object is being set inside a loop, then > > it should never have had the unchanging bit set in the first place. > > Can you track down how that is happening? > > It's maybe_set_unchanging: > > /* We can set RTX_UNCHANGING_P from TREE_READONLY for decls whose > initialization is only executed once, or whose initializer always > has the same value. Currently we simplify this to PARM_DECLs in the > first case, and decls with TREE_CONSTANT initializers in the second. > */ > > if ((TREE_READONLY (t) && DECL_P (t) > && (TREE_STATIC (t) || ! AGGREGATE_TYPE_P (TREE_TYPE (t))) > && (TREE_CODE (t) == PARM_DECL > || DECL_INITIAL (t) == NULL_TREE > || TREE_CONSTANT (DECL_INITIAL (t)))) > || TREE_CODE_CLASS (TREE_CODE (t)) == 'c') > RTX_UNCHANGING_P (ref) = 1; > > DECL_INITIAL is 0 here so the /u flag is set. It might help me to see the RTL for the loop in question as well. Presumably the object we care about has TREE_READONLY set? But it's value varies from one iteration to the next (seems to me that if the value does not vary, then it could not have been a GIV). > Note this note in loop_invariant_p: > > case REG:(Continue reading)
RSS Feed