<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/haskell.git, branch wip/T22121</title>
<subtitle>gitlab.haskell.org: ghc/ghc.git
</subtitle>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/haskell.git/'/>
<entry>
<title>ci: Attempt using normal submodule cloning strategy</title>
<updated>2022-08-29T13:07:23+00:00</updated>
<author>
<name>Matthew Pickering</name>
<email>matthewtpickering@gmail.com</email>
</author>
<published>2022-08-29T12:43:56+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/haskell.git/commit/?id=e3678d47079559e17f082b618a6ea12f521b64fc'/>
<id>e3678d47079559e17f082b618a6ea12f521b64fc</id>
<content type='text'>
We do not use any recursively cloned submodules, and this protects us
from flaky upstream remotes.

Fixes #22121
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We do not use any recursively cloned submodules, and this protects us
from flaky upstream remotes.

Fixes #22121
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix a bug in anyInRnEnvR</title>
<updated>2022-08-29T08:18:57+00:00</updated>
<author>
<name>Simon Peyton Jones</name>
<email>simonpj@microsoft.com</email>
</author>
<published>2022-08-25T14:43:56+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/haskell.git/commit/?id=cbe51ac5e0bbe2667b6c7204ae62a534a9bc7c95'/>
<id>cbe51ac5e0bbe2667b6c7204ae62a534a9bc7c95</id>
<content type='text'>
This bug was a subtle error in anyInRnEnvR, introduced by

    commit d4d3fe6e02c0eb2117dbbc9df72ae394edf50f06
    Author: Andreas Klebinger &lt;klebinger.andreas@gmx.at&gt;
    Date:   Sat Jul 9 01:19:52 2022 +0200

    Rule matching: Don't compute the FVs if we don't look at them.

The net result was #22028, where a rewrite rule would wrongly
match on a lambda.

The fix to that function is easy.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This bug was a subtle error in anyInRnEnvR, introduced by

    commit d4d3fe6e02c0eb2117dbbc9df72ae394edf50f06
    Author: Andreas Klebinger &lt;klebinger.andreas@gmx.at&gt;
    Date:   Sat Jul 9 01:19:52 2022 +0200

    Rule matching: Don't compute the FVs if we don't look at them.

The net result was #22028, where a rewrite rule would wrongly
match on a lambda.

The fix to that function is easy.
</pre>
</div>
</content>
</entry>
<entry>
<title>Use TcRnDiagnostic in GHC.Tc.TyCl.Class (#20117)</title>
<updated>2022-08-28T22:01:35+00:00</updated>
<author>
<name>Giles Anderson</name>
<email>agander@gmail.com</email>
</author>
<published>2022-07-09T19:25:35+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/haskell.git/commit/?id=68e6786f3d1bde5d044a649462cdf2b6034a2df8'/>
<id>68e6786f3d1bde5d044a649462cdf2b6034a2df8</id>
<content type='text'>
The following `TcRnDiagnostic` messages have been introduced:

TcRnIllegalHsigDefaultMethods
TcRnBadGenericMethod
TcRnWarningMinimalDefIncomplete
TcRnDefaultMethodForPragmaLacksBinding
TcRnIgnoreSpecialisePragmaOnDefMethod
TcRnBadMethodErr
TcRnNoExplicitAssocTypeOrDefaultDeclaration
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The following `TcRnDiagnostic` messages have been introduced:

TcRnIllegalHsigDefaultMethods
TcRnBadGenericMethod
TcRnWarningMinimalDefIncomplete
TcRnDefaultMethodForPragmaLacksBinding
TcRnIgnoreSpecialisePragmaOnDefMethod
TcRnBadMethodErr
TcRnNoExplicitAssocTypeOrDefaultDeclaration
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix a nasty loop in Tidy</title>
<updated>2022-08-27T04:30:14+00:00</updated>
<author>
<name>Simon Peyton Jones</name>
<email>simonpj@microsoft.com</email>
</author>
<published>2022-08-26T11:16:01+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/haskell.git/commit/?id=161a6f1fd62e797e978e7808a5f567fefa123f16'/>
<id>161a6f1fd62e797e978e7808a5f567fefa123f16</id>
<content type='text'>
As the remarkably-simple #22112 showed, we were making a black hole
in the unfolding of a self-recursive binding.  Boo!

It's a bit tricky.  Documented in GHC.Iface.Tidy,
   Note [tidyTopUnfolding: avoiding black holes]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As the remarkably-simple #22112 showed, we were making a black hole
in the unfolding of a self-recursive binding.  Boo!

It's a bit tricky.  Documented in GHC.Iface.Tidy,
   Note [tidyTopUnfolding: avoiding black holes]
</pre>
</div>
</content>
</entry>
<entry>
<title>Use Solo to avoid retaining the SCE but to avoid performing the substitution</title>
<updated>2022-08-27T04:29:39+00:00</updated>
<author>
<name>Matthew Pickering</name>
<email>matthewtpickering@gmail.com</email>
</author>
<published>2022-08-24T14:46:16+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/haskell.git/commit/?id=a3b23a3318a556beba62a3637600692639575c44'/>
<id>a3b23a3318a556beba62a3637600692639575c44</id>
<content type='text'>
The use of Solo here allows us to force the selection into the SCE to obtain
the Subst but without forcing the substitution to be applied. The resulting thunk
is placed into a lazy field which is rarely forced, so forcing it regresses
peformance.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The use of Solo here allows us to force the selection into the SCE to obtain
the Subst but without forcing the substitution to be applied. The resulting thunk
is placed into a lazy field which is rarely forced, so forcing it regresses
peformance.
</pre>
</div>
</content>
</entry>
<entry>
<title>Force imposs_deflt_cons in filterAlts</title>
<updated>2022-08-27T04:29:39+00:00</updated>
<author>
<name>Matthew Pickering</name>
<email>matthewtpickering@gmail.com</email>
</author>
<published>2022-08-24T08:29:34+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/haskell.git/commit/?id=64779dcd734a69ab38fba1e7542896c168d7bbce'/>
<id>64779dcd734a69ab38fba1e7542896c168d7bbce</id>
<content type='text'>
This fixes a pretty serious space leak as the forced thunk would retain
`Alt b` values which would then contain reference to a lot of old
bindings and other simplifier gunk.

The OtherCon unfolding was not forced on subsequent simplifier runs so
more and more old stuff would be retained until the end of
simplification.

Fixing this has a drastic effect on maximum residency for the mmark
package which goes from

```
  45,005,401,056 bytes allocated in the heap
  17,227,721,856 bytes copied during GC
     818,281,720 bytes maximum residency (33 sample(s))
       9,659,144 bytes maximum slop
            2245 MiB total memory in use (0 MB lost due to fragmentation)
```

to

```
  45,039,453,304 bytes allocated in the heap
  13,128,181,400 bytes copied during GC
     331,546,608 bytes maximum residency (40 sample(s))
       7,471,120 bytes maximum slop
             916 MiB total memory in use (0 MB lost due to fragmentation)
```

See #21993 for some more discussion.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes a pretty serious space leak as the forced thunk would retain
`Alt b` values which would then contain reference to a lot of old
bindings and other simplifier gunk.

The OtherCon unfolding was not forced on subsequent simplifier runs so
more and more old stuff would be retained until the end of
simplification.

Fixing this has a drastic effect on maximum residency for the mmark
package which goes from

```
  45,005,401,056 bytes allocated in the heap
  17,227,721,856 bytes copied during GC
     818,281,720 bytes maximum residency (33 sample(s))
       9,659,144 bytes maximum slop
            2245 MiB total memory in use (0 MB lost due to fragmentation)
```

to

```
  45,039,453,304 bytes allocated in the heap
  13,128,181,400 bytes copied during GC
     331,546,608 bytes maximum residency (40 sample(s))
       7,471,120 bytes maximum slop
             916 MiB total memory in use (0 MB lost due to fragmentation)
```

See #21993 for some more discussion.
</pre>
</div>
</content>
</entry>
<entry>
<title>Avoid retaining bindings via ModGuts held on the stack</title>
<updated>2022-08-27T04:29:39+00:00</updated>
<author>
<name>Matthew Pickering</name>
<email>matthewtpickering@gmail.com</email>
</author>
<published>2022-08-24T08:29:21+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/haskell.git/commit/?id=82ce1654567b24fbbd611ab20b5188291fd3f830'/>
<id>82ce1654567b24fbbd611ab20b5188291fd3f830</id>
<content type='text'>
It's better to overwrite the bindings fields of the ModGuts before
starting an iteration as then all the old bindings can be collected as
soon as the simplifier has processed them. Otherwise we end up with the
old bindings being alive until right at the end of the simplifier pass
as the mg_binds field is only modified right at the end.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It's better to overwrite the bindings fields of the ModGuts before
starting an iteration as then all the old bindings can be collected as
soon as the simplifier has processed them. Otherwise we end up with the
old bindings being alive until right at the end of the simplifier pass
as the mg_binds field is only modified right at the end.
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "Revert "Refactor SpecConstr to use treat bindings uniformly""</title>
<updated>2022-08-27T04:29:39+00:00</updated>
<author>
<name>Matthew Pickering</name>
<email>matthewtpickering@gmail.com</email>
</author>
<published>2022-08-22T20:08:58+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/haskell.git/commit/?id=565a8ec8fb29062827edc6999ac8dc72494ddd07'/>
<id>565a8ec8fb29062827edc6999ac8dc72494ddd07</id>
<content type='text'>
This reverts commit 851d8dd89a7955864b66a3da8b25f1dd88a503f8.

This commit was originally reverted due to an increase in space usage.
This was diagnosed as because the SCE increased in size and that was
being retained by another leak. See #22102
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 851d8dd89a7955864b66a3da8b25f1dd88a503f8.

This commit was originally reverted due to an increase in space usage.
This was diagnosed as because the SCE increased in size and that was
being retained by another leak. See #22102
</pre>
</div>
</content>
</entry>
<entry>
<title>Improve SpecConstr for evals</title>
<updated>2022-08-27T04:29:02+00:00</updated>
<author>
<name>Simon Peyton Jones</name>
<email>simonpj@microsoft.com</email>
</author>
<published>2022-06-22T09:29:03+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/haskell.git/commit/?id=95fe09da09b386008fd730abc5374f3521dd339b'/>
<id>95fe09da09b386008fd730abc5374f3521dd339b</id>
<content type='text'>
As #21763 showed, we were over-specialising in some cases, when
the function involved was doing a simple 'eval', but not taking
the value apart, or branching on it.

This MR fixes the problem.  See Note [Do not specialise evals].

Nofib barely budges, except that spectral/cichelli allocates about
3% less.

Compiler bytes-allocated improves a bit
   geo. mean                                          -0.1%
   minimum                                            -0.5%
   maximum                                            +0.0%

The -0.5% is on T11303b, for what it's worth.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As #21763 showed, we were over-specialising in some cases, when
the function involved was doing a simple 'eval', but not taking
the value apart, or branching on it.

This MR fixes the problem.  See Note [Do not specialise evals].

Nofib barely budges, except that spectral/cichelli allocates about
3% less.

Compiler bytes-allocated improves a bit
   geo. mean                                          -0.1%
   minimum                                            -0.5%
   maximum                                            +0.0%

The -0.5% is on T11303b, for what it's worth.
</pre>
</div>
</content>
</entry>
<entry>
<title>boot: cleanup legacy args</title>
<updated>2022-08-26T19:06:40+00:00</updated>
<author>
<name>Cheng Shao</name>
<email>astrohavoc@gmail.com</email>
</author>
<published>2022-08-26T08:05:37+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/haskell.git/commit/?id=1007829bfb18708dda77b4eb6106fce9cb05f908'/>
<id>1007829bfb18708dda77b4eb6106fce9cb05f908</id>
<content type='text'>
Cleanup legacy boot script args, following removal of the legacy make
build system.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Cleanup legacy boot script args, following removal of the legacy make
build system.
</pre>
</div>
</content>
</entry>
</feed>
