Re: Find more shrink-wrapping opportunities

2012-01-09 Thread Bernd Schmidt
On 12/04/2011 01:27 PM, Richard Sandiford wrote: OK, here it is. As well as switching to the backward scan and incremental liveness updates, I added a test for another case that I stumbled over: /* Reject targets of abnormal edges. This is needed for correctness on ports like Alpha

Re: Find more shrink-wrapping opportunities

2011-12-04 Thread Richard Sandiford
Richard Sandiford rdsandif...@googlemail.com writes: Richard Sandiford rdsandif...@googlemail.com writes: Bernd Schmidt ber...@codesourcery.com writes: The reason I'm suddenly reviewing the code now is that it doesn't prevent shrink-wrapping, because nothing adds register 2 to the liveness

Re: Find more shrink-wrapping opportunities

2011-12-01 Thread Andrew Pinski
On Wed, Oct 5, 2011 at 1:48 PM, Bernd Schmidt ber...@codesourcery.com wrote: This adds a little mini-pass to shrink-wrapping, to eliminate a common case that often makes shrink-wrapping unavailable. If a move insn copies an argument registers to a call-saved register, the prologue must be

Re: Find more shrink-wrapping opportunities

2011-11-30 Thread Richard Sandiford
Bernd Schmidt ber...@codesourcery.com writes: On 11/29/11 20:02, Richard Sandiford wrote: Bernd Schmidt ber...@codesourcery.com writes: The reason I'm suddenly reviewing the code now is that it doesn't prevent shrink-wrapping, because nothing adds register 2 to the liveness info of the

Re: Find more shrink-wrapping opportunities

2011-11-29 Thread Bernd Schmidt
On 11/26/11 12:50, Richard Sandiford wrote: Could we use DF_REF_USES/DEFS here instead? I suppose we could, but I can't really get excited about it... Also: +/* Look for sets of call-saved registers in the first block of the + function, and move them down into successor blocks if the

Re: Find more shrink-wrapping opportunities

2011-11-29 Thread Richard Sandiford
Bernd Schmidt ber...@codesourcery.com writes: The reason I'm suddenly reviewing the code now is that it doesn't prevent shrink-wrapping, because nothing adds register 2 to the liveness info of the affected blocks. The temporary prologue value of register 2 is then moved into register 15.

Re: Find more shrink-wrapping opportunities

2011-11-29 Thread Richard Sandiford
Richard Sandiford rdsandif...@googlemail.com writes: Bernd Schmidt ber...@codesourcery.com writes: The reason I'm suddenly reviewing the code now is that it doesn't prevent shrink-wrapping, because nothing adds register 2 to the liveness info of the affected blocks. The temporary prologue

Re: Find more shrink-wrapping opportunities

2011-11-29 Thread Bernd Schmidt
On 11/29/11 20:02, Richard Sandiford wrote: Bernd Schmidt ber...@codesourcery.com writes: The reason I'm suddenly reviewing the code now is that it doesn't prevent shrink-wrapping, because nothing adds register 2 to the liveness info of the affected blocks. The temporary prologue value of

Re: Find more shrink-wrapping opportunities

2011-11-26 Thread Richard Sandiford
Bernd Schmidt ber...@codesourcery.com writes: + CLEAR_HARD_REG_SET (set_regs); + note_stores (PATTERN (scan), record_hard_reg_sets, +set_regs); + if (CALL_P (scan)) + IOR_HARD_REG_SET (set_regs,

Re: Find more shrink-wrapping opportunities

2011-10-06 Thread Jeff Law
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/05/11 14:48, Bernd Schmidt wrote: This adds a little mini-pass to shrink-wrapping, to eliminate a common case that often makes shrink-wrapping unavailable. If a move insn copies an argument registers to a call-saved register, the prologue

Find more shrink-wrapping opportunities

2011-10-05 Thread Bernd Schmidt
This adds a little mini-pass to shrink-wrapping, to eliminate a common case that often makes shrink-wrapping unavailable. If a move insn copies an argument registers to a call-saved register, the prologue must be emitted before this insn. We should therefore try to delay such moves for as long as

Re: Find more shrink-wrapping opportunities

2011-10-05 Thread Steven Bosscher
On Wed, Oct 5, 2011 at 10:48 PM, Bernd Schmidt ber...@codesourcery.com wrote: Bootstrapped and tested on i686-linux. Ok? +/* Return true if BB has any active insns. */ +static bool +bb_active_p (basic_block bb) +{ + rtx label; + + /* Test whether there are active instructions in the