Re: [patch] Fix PR rtl-optimization/54870

2012-10-16 Thread Richard Biener
On Tue, Oct 16, 2012 at 11:39 AM, Eric Botcazou wrote: >> As I'm not sure how to best do that I suggest we do a more proper RTL >> DSE hack by adding a 'libcall-call-escape'-set which we can add to >> instead of calling mark_addressable this late. We need to add all >> partitions of a decl here,

Re: [patch] Fix PR rtl-optimization/54870

2012-10-16 Thread Eric Botcazou
> As I'm not sure how to best do that I suggest we do a more proper RTL > DSE hack by adding a 'libcall-call-escape'-set which we can add to > instead of calling mark_addressable this late. We need to add all > partitions of a decl here, of course, and we need to query it from > can_escape. That

Re: [patch] Fix PR rtl-optimization/54870

2012-10-15 Thread Richard Biener
On Mon, Oct 15, 2012 at 12:43 PM, Eric Botcazou wrote: >> Where is mark_addressable called? It's wrong (and generally impossible) to >> do that late. > > In expr.c:emit_block_move_hints. It's one of the calls added to support the > enhanced DSE last year, there are others in calls.c for example.

Re: [patch] Fix PR rtl-optimization/54870

2012-10-15 Thread Eric Botcazou
> Where is mark_addressable called? It's wrong (and generally impossible) to > do that late. In expr.c:emit_block_move_hints. It's one of the calls added to support the enhanced DSE last year, there are others in calls.c for example. > If you only have memcpy then escaped will be empty. fixin

Re: [patch] Fix PR rtl-optimization/54870

2012-10-15 Thread Richard Biener
On Mon, Oct 15, 2012 at 12:00 PM, Eric Botcazou wrote: >> Hmm. I think this points to an issue with update_alias_info_with_stack_vars >> instead. That is, this function should have already cared for handling >> this case where two decls have their stack slot shared. > > The problem here is that

Re: [patch] Fix PR rtl-optimization/54870

2012-10-15 Thread Eric Botcazou
> Hmm. I think this points to an issue with update_alias_info_with_stack_vars > instead. That is, this function should have already cared for handling > this case where two decls have their stack slot shared. The problem here is that mark_addressable is called _after_ the function is run. IOW,

Re: [patch] Fix PR rtl-optimization/54870

2012-10-15 Thread Richard Biener
On Sun, Oct 14, 2012 at 10:47 PM, Eric Botcazou wrote: > Hi, > > This is the execution failure of gfortran.dg/array_constructor_4.f90 in 64-bit > mode on SPARC/Solaris at -O3. The dse2 dump for the reduced testcase reads: > > dse: local deletions = 0, global deletions = 1, spill deletions = 0 > s

[patch] Fix PR rtl-optimization/54870

2012-10-14 Thread Eric Botcazou
Hi, This is the execution failure of gfortran.dg/array_constructor_4.f90 in 64-bit mode on SPARC/Solaris at -O3. The dse2 dump for the reduced testcase reads: dse: local deletions = 0, global deletions = 1, spill deletions = 0 starting the processing of deferred insns deleting insn with uid = 25