Re: [PATCH]: further shrinking of boot2

2014-11-21 Thread David Chisnall
Fir the clang 3.4 import, I had some patches (that never got applied), which 
used clang -O0 and then opt with some custom optimisation order to get a 
reasonable size saving.  It might be worth trying that, so that future changes 
to the default optimisation order don't make things worse again.

David

On 21 Nov 2014, at 12:56, Roman Divacky rdiva...@vlakno.cz wrote:

 Hi all!
 
 In an effort to help import clang3.5 I looked at squeezing a few more bytes
 from boot2.
 
 
http://rys.vlakno.cz/~rdivacky/boot2.diet.patch
 
 
 Please test and review the patch. It survived my qemu boot attempt so it's
 not completely broken. But I would like to have some more testing and review
 comments before I move forward with this.
 
 Fwiw, it shrinks boot2 by 16 bytes when compiled with clang34 and by 28 bytes
 when compiled with clang35.
 
 Thanks! Roman
 ___
 freebsd-current@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-current
 To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org

___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: [PATCH]: further shrinking of boot2

2014-11-21 Thread John Baldwin
On Friday, November 21, 2014 01:56:32 PM Roman Divacky wrote:
 Hi all!
 
 In an effort to help import clang3.5 I looked at squeezing a few more bytes
 from boot2.
 
 
 http://rys.vlakno.cz/~rdivacky/boot2.diet.patch
 
 
 Please test and review the patch. It survived my qemu boot attempt so it's
 not completely broken. But I would like to have some more testing and review
 comments before I move forward with this.
 
 Fwiw, it shrinks boot2 by 16 bytes when compiled with clang34 and by 28
 bytes when compiled with clang35.

I would prefer 'int k' over 'int i2/j2'.  Also, do you really have to move
the variable definitions to get the size change?  I'd prefer to leave the
variable declarations where they are if possible (and just add 'int k' or
'size_t k' in the existing variable blocks).

-- 
John Baldwin
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: [PATCH]: further shrinking of boot2

2014-11-21 Thread Roman Divacky
Sure thing. Reload the patch from the same url.

http://rys.vlakno.cz/~rdivacky/boot2.diet.patch

On Fri, Nov 21, 2014 at 10:16:58AM -0500, John Baldwin wrote:
 On Friday, November 21, 2014 01:56:32 PM Roman Divacky wrote:
  Hi all!
  
  In an effort to help import clang3.5 I looked at squeezing a few more bytes
  from boot2.
  
  
  http://rys.vlakno.cz/~rdivacky/boot2.diet.patch
  
  
  Please test and review the patch. It survived my qemu boot attempt so it's
  not completely broken. But I would like to have some more testing and review
  comments before I move forward with this.
  
  Fwiw, it shrinks boot2 by 16 bytes when compiled with clang34 and by 28
  bytes when compiled with clang35.
 
 I would prefer 'int k' over 'int i2/j2'.  Also, do you really have to move
 the variable definitions to get the size change?  I'd prefer to leave the
 variable declarations where they are if possible (and just add 'int k' or
 'size_t k' in the existing variable blocks).
 
 -- 
 John Baldwin
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: [PATCH]: further shrinking of boot2

2014-11-21 Thread John Baldwin
On Friday, November 21, 2014 08:39:17 PM Roman Divacky wrote:
 Sure thing. Reload the patch from the same url.
 
 http://rys.vlakno.cz/~rdivacky/boot2.diet.patch

Thanks.  I haven't run tested it, but I'm ok with it otherwise.

-- 
John Baldwin
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: [PATCH]: further shrinking of boot2

2014-11-21 Thread Roman Divacky
On Fri, Nov 21, 2014 at 04:00:35PM -0500, John Baldwin wrote:
 On Friday, November 21, 2014 08:39:17 PM Roman Divacky wrote:
  Sure thing. Reload the patch from the same url.
  
  http://rys.vlakno.cz/~rdivacky/boot2.diet.patch
 
 Thanks.  I haven't run tested it, but I'm ok with it otherwise.

Thanks for the review. I'll wait a couple of days, hopefully someone
will test the patch in a different way I did.

Unless someone reports a breakage I'll commit this sometime next week.

Thanks! Roman
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org