Re: [PATCH] Fix debug info handling in prepare_shrink_wrap (PR debug/65779)

2016-01-19 Thread Bernd Schmidt
On 01/19/2016 02:08 PM, Jakub Jelinek wrote: On Tue, Jan 19, 2016 at 01:27:32PM +0100, Bernd Schmidt wrote: Is there a way to merge these two blocks (e.g. by moving this to the start of the loop and testing for insn or BB_HEAD)? Sure, like this? That's ok. I'm assuming you know best how to u

Re: [PATCH] Fix debug info handling in prepare_shrink_wrap (PR debug/65779)

2016-01-19 Thread Jakub Jelinek
On Tue, Jan 19, 2016 at 01:27:32PM +0100, Bernd Schmidt wrote: > Is there a way to merge these two blocks (e.g. by moving this to the start > of the loop and testing for insn or BB_HEAD)? Sure, like this? 2016-01-19 Jakub Jelinek PR debug/65779 * shrink-wrap.c: Include valtrac

Re: [PATCH] Fix debug info handling in prepare_shrink_wrap (PR debug/65779)

2016-01-19 Thread Bernd Schmidt
On 01/19/2016 12:33 AM, Jakub Jelinek wrote: + if (MAY_HAVE_DEBUG_INSNS) +{ + for (dinsn = BB_END (bb); dinsn != insn; dinsn = PREV_INSN (dinsn)) + if (DEBUG_INSN_P (dinsn)) + { + df_ref use; + FOR_EACH_INSN_USE (use, dinsn) + if (refers_to_

[PATCH] Fix debug info handling in prepare_shrink_wrap (PR debug/65779)

2016-01-18 Thread Jakub Jelinek
Hi! On the following testcase with -mrelocatable on ppc32 we get assembly that contains undefined reference to a local .LC* symbol. The problem is that prepare_shrink_wrap attempts to schedule some instructions from the entry block to later basic blocks, if they set a register that is only used in