On Tue, Dec 11, 2012 at 1:02 PM, Simon Peyton-Jones <simo...@microsoft.com> wrote: > | > data T = MkT !S > | > data S = MkS Int > | > > | > then my impl will unbox the S field of MkT because the result is only > one field > | wide, namely an Int. > | > | Wouldn't Johan's have unboxed S too? (if not, I misunderstood what he did) > > No, that would change the semantics! We don't want to do that.
I think Simon M meant that my change would have unpacked the field of *type* S in the MkT constructor. We must not unpack the field in the MkS constructor. > | I'm happy to call this -funbox-strict-small-fields. However, I'd like > | the documentation to talk about pointer-sized things as that, even > | though a bit operational sounding, has a clear meaning in my mind. > > I'm somewhat inclined to *change* the current flag so that > > -funbox-strict-fields means "unbox small fields" > -funbox-all-strict-fields means "unbox ALL strict fields" Lets go with -funbox-small-strict-fields to avoid unnecessary breakages. If we end up enabling this flag by default eventually it doesn't really matter what the name is as people will never type it out explicitly. > And as you say to make -funbox-strict-fields implied by -O. I was going to not enable this by default in 7.8 and spend some time after the 7.8 release to run a bunch of benchmarks to try to decide whether it's a win on average. If you think that we should enable it by default already in 7.8 we can do that. -- Johan _______________________________________________ Cvs-ghc mailing list Cvs-ghc@haskell.org http://www.haskell.org/mailman/listinfo/cvs-ghc