> +       /* If tem is a VAR_DECL, we need a memory reference.  */
> +       enum expand_modifier tem_modifier = modifier;
> +       if (tem_modifier == EXPAND_SUM)
> +         tem_modifier = EXPAND_NORMAL;
> +       if (TREE_CODE (tem) == VAR_DECL)
> +         tem_modifier = EXPAND_MEMORY;
> 
> that changes EXPAND_WRITE to EXPAND_MEMORY for VAR_DECL
> for example - what's 'modifier' in the problematic case?

My understanding is that it was EXPAND_NORMAL.

> I do not understand how 'VAR_DECL' is special here btw. - it seems to be a
> condition making sure the new optimization doesn't trigger rather than a
> condition that will always require memory?

It may indeed be too big a hammer.

Roger, would it be sufficient to use EXPAND_MEMORY only when must_force_mem 
computed a few lines below if true?

-- 
Eric Botcazou


Reply via email to