On Fri, 27 Jan 2012, Eric Botcazou wrote:

> > So I am testing the following - please tell me whether you are working
> > on a different fix.
> 
> I was, but I realized that this would somewhat conflict with your latest 
> patch 
> to expand_assignment, where all MEM_REFs will go through get_inner_reference 
> instead of the regular expander.
>
> Can't we avoid doing this if they have BLKmode?  Because you cannot get a 
> BLKmode RTX out of this if the base hasn't BLKmode.  We would need to spill, 
> like in the regular expander, so we might as well use it.

I was simply trying to save some code-duplication here.  I will
re-work the patch to avoid this as you suggest.  Btw, the original
reason why we handle MEM_REF at all via the get_inner_reference
path is that if we have MEM_REF[&decl, CST] and decl was not
committed to memory then the MEM_REF really acts like a
bitfield insert to a non-MEM (similar to the rvalue case we
handle in expand_expr_real_1).

I suppose I should split out some predicates that can be shared
amongst the various TARGET_[MEM_REF] handlers during expansion
and tighten this one up as well.

> Otherwise, you're the resident expert in aliasing so, if you think that your 
> patchlet is sufficient, fine with me.

Yes, I think it is sufficient for this case.

Now, let me rework that expand_assignment patch a bit.

Richard.

Reply via email to