<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en">
<head>
<meta content="text/html; charset=US-ASCII" http-equiv="Content-Type">
<title>
GitLab
</title>



<style>img {
max-width: 100%; height: auto;
}
</style>
</head>
<body>
<div class="content">

<h3>
Andreas Klebinger pushed to branch wip/andreask/allocationArea
at <a href="https://gitlab.haskell.org/ghc/ghc">Glasgow Haskell Compiler / GHC</a>
</h3>
<h4>
Commits:
</h4>
<ul>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/d9f095060b0f00d7140f8b0858b7a5dcbffea9ef">d9f09506</a></strong>
<div>
<span>by Simon Peyton Jones</span>
<i>at 2020-07-10T10:33:44-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Define multiShotIO and use it in mkSplitUniqueSupply

This patch is part of the ongoing eta-expansion saga;
see #18238.

It implements a neat trick (suggested by Sebastian Graf)
that allows the programmer to disable the default one-shot behaviour
of IO (the "state hack").  The trick is to use a new multiShotIO
function; see Note [multiShotIO].  For now, multiShotIO is defined
here in Unique.Supply; but it should ultimately be moved to the IO
library.

The change is necessary to get good code for GHC's unique supply;
see Note [Optimising the unique supply].

However it makes no difference to GHC as-is.  Rather, it makes
a difference when a subsequent commit

   Improve eta-expansion using ArityType

lands.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/bce695cc97cadbc3eced5b53efaaa0ecfd201d61">bce695cc</a></strong>
<div>
<span>by Simon Peyton Jones</span>
<i>at 2020-07-10T10:33:44-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Make arityType deal with join points

As Note [Eta-expansion and join points] describes,
this patch makes arityType deal correctly with join points.
What was there before was not wrong, but yielded lower
arities than it could.

Fixes #18328

In base GHC this makes no difference to nofib.

        Program           Size    Allocs   Runtime   Elapsed  TotalMem
--------------------------------------------------------------------------------
         n-body          -0.1%     -0.1%     -1.2%     -1.1%      0.0%
--------------------------------------------------------------------------------
            Min          -0.1%     -0.1%    -55.0%    -56.5%      0.0%
            Max          -0.0%      0.0%    +16.1%    +13.4%      0.0%
 Geometric Mean          -0.0%     -0.0%    -30.1%    -31.0%     -0.0%

But it starts to make real difference when we land the change to the
way mkDupableAlts handles StrictArg, in fixing #13253 and friends.
I think this is because we then get more non-inlined join points.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/2b7c71cb79095a10b9a5964a5a0676a2a196e92d">2b7c71cb</a></strong>
<div>
<span>by Simon Peyton Jones</span>
<i>at 2020-07-11T12:17:02-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Improve eta-expansion using ArityType

As #18355 shows, we were failing to preserve one-shot info when
eta-expanding.  It's rather easy to fix, by using ArityType more,
rather than just Arity.

This patch is important to suport the one-shot monad trick;
see #18202.  But the extra tracking of one-shot-ness requires
the patch

   Define multiShotIO and use it in mkSplitUniqueSupply

If that patch is missing, ths patch makes things worse in
GHC.Types.Uniq.Supply.  With it, however, we see these improvements

    T3064     compiler bytes allocated -2.2%
    T3294     compiler bytes allocated -1.3%
    T12707    compiler bytes allocated -1.3%
    T13056    compiler bytes allocated -2.2%

Metric Decrease:
    T3064
    T3294
    T12707
    T13056
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/de139cc496c0e0110e252a1208ae346f47f8061e">de139cc4</a></strong>
<div>
<span>by Artem Pelenitsyn</span>
<i>at 2020-07-12T02:53:20-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">add reproducer for #15630
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/c4de6a7a5c6433ae8c4df8a9fa09fbd9f3bbd0bf">c4de6a7a</a></strong>
<div>
<span>by Andreas Klebinger</span>
<i>at 2020-07-12T02:53:55-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Give Uniq[D]FM a phantom type for its key.

This fixes #17667 and should help to avoid such issues going forward.

The changes are mostly mechanical in nature. With two notable
exceptions.

* The register allocator.

  The register allocator references registers by distinct uniques.
  However they come from the types of VirtualReg, Reg or Unique in
  various places. As a result we sometimes cast the key type of the
  map and use functions which operate on the now typed map but take
  a raw Unique as actual key. The logic itself has not changed it
  just becomes obvious where we do so now.

* <Type>Env Modules.

As an example a ClassEnv is currently queried using the types `Class`,
`Name`, and `TyCon`. This is safe since for a distinct class value all
these expressions give the same unique.

    getUnique cls
    getUnique (classTyCon cls)
    getUnique (className cls)
    getUnique (tcName $ classTyCon cls)

This is for the most part contained within the modules defining the
interface. However it requires us to play dirty when we are given a
`Name` to lookup in a `UniqFM Class a` map. But again the logic did
not change and it's for the most part hidden behind the Env Module.

Some of these cases could be avoided by refactoring but this is left
for future work.

We also bump the haddock submodule as it uses UniqFM.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/c2cfdfde20d0d6c0e16aa7a84d8ebe51501bcfa8">c2cfdfde</a></strong>
<div>
<span>by Aaron Allen</span>
<i>at 2020-07-13T09:00:33-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Warn about empty Char enumerations (#18402)

Currently the "Enumeration is empty" warning (-Wempty-enumerations)
only fires for numeric literals. This patch adds support for `Char`
literals so that enumerating an empty list of `Char`s will also
trigger the warning.
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/c3ac87ece2716b83ad886e81c20f4161e8ec0efd">c3ac87ec</a></strong>
<div>
<span>by Stefan Schulze Frielinghaus</span>
<i>at 2020-07-13T09:01:10-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">hadrian: build check-ppr dynamic if GHC is build dynamic

Fixes #18361
</pre>
</li>
<li>
<strong><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/d5275f44a45317d9806fb28ff94bc0b7d9aa99d1">d5275f44</a></strong>
<div>
<span>by Andreas Klebinger</span>
<i>at 2020-07-14T09:33:25-04:00</i>
</div>
<pre class="commit-message" style="white-space: pre-wrap; margin: 0;">Increase -A and -O rts defaults to 4MB.

Fixes #16499
</pre>
</li>
</ul>
<h4>30 changed files:</h4>
<ul>
<li class="file-stats">
<a href="#d95fdf6575459444666f72b2281534e0558a4ba0">
compiler/GHC/Builtin/Utils.hs
</a>
</li>
<li class="file-stats">
<a href="#066085df29cc928ac539d8feae6e5215cbbf1e14">
compiler/GHC/Cmm/LayoutStack.hs
</a>
</li>
<li class="file-stats">
<a href="#71e696f452eb493722d70306c6f304fc9b2f6a95">
compiler/GHC/Cmm/Parser.y
</a>
</li>
<li class="file-stats">
<a href="#b1390f6749e1a2dddcae35f88d55623ea6269f56">
compiler/GHC/Cmm/Sink.hs
</a>
</li>
<li class="file-stats">
<a href="#10b61652f9817945bb54ccf8fc40f8a664ca3c30">
compiler/GHC/CmmToAsm.hs
</a>
</li>
<li class="file-stats">
<a href="#5986ebaacfa99d264abfd2f7ef19d99a64db720f">
compiler/GHC/CmmToAsm/BlockLayout.hs
</a>
</li>
<li class="file-stats">
<a href="#ea29061dab1b843e0ea9294afc614998f3a8d08f">
compiler/GHC/CmmToAsm/Monad.hs
</a>
</li>
<li class="file-stats">
<a href="#eb63fd2d9f8f64c1063f9ce3e162f92c2e6e508c">
compiler/GHC/CmmToAsm/Reg/Graph.hs
</a>
</li>
<li class="file-stats">
<a href="#b5d9809f48ef349a168fb08742fa95fb2a059129">
compiler/GHC/CmmToAsm/Reg/Graph/Coalesce.hs
</a>
</li>
<li class="file-stats">
<a href="#02f4cb4badaefd6ed6f1ae3ff38a357c449fc286">
compiler/GHC/CmmToAsm/Reg/Graph/Spill.hs
</a>
</li>
<li class="file-stats">
<a href="#3aba9ceb20d68f25343fe3a27b2b7a4f8fea68da">
compiler/GHC/CmmToAsm/Reg/Graph/SpillClean.hs
</a>
</li>
<li class="file-stats">
<a href="#18fcc4c56813c879ea69a2e6b2bdf6b09dd037c5">
compiler/GHC/CmmToAsm/Reg/Graph/SpillCost.hs
</a>
</li>
<li class="file-stats">
<a href="#23fa440e58d1f384d18650b52802ad6d03891572">
compiler/GHC/CmmToAsm/Reg/Graph/Stats.hs
</a>
</li>
<li class="file-stats">
<a href="#83a3b2df5c77503c3a8c6df05a7654333d30cac3">
compiler/GHC/CmmToAsm/Reg/Linear.hs
</a>
</li>
<li class="file-stats">
<a href="#e7e32ef13a93a68891f700047f89c45df0e3772d">
compiler/GHC/CmmToAsm/Reg/Linear/Base.hs
</a>
</li>
<li class="file-stats">
<a href="#6b7e521fe89077442c3d86c888eb96793606049a">
compiler/GHC/CmmToAsm/Reg/Linear/JoinToTargets.hs
</a>
</li>
<li class="file-stats">
<a href="#a25615433d8186f543ea64f55fdf156b7b1e6996">
compiler/GHC/CmmToAsm/Reg/Linear/StackMap.hs
</a>
</li>
<li class="file-stats">
<a href="#62e26243bb502b18583ce19f1a921417090459c7">
compiler/GHC/CmmToAsm/Reg/Linear/Stats.hs
</a>
</li>
<li class="file-stats">
<a href="#b4cadffdafb6a1f441fede8639ba742ae903afca">
compiler/GHC/CmmToAsm/Reg/Liveness.hs
</a>
</li>
<li class="file-stats">
<a href="#d0fd0c4522f53657c4f3e9d6433bfc05f0e303df">
<span class="new-file">
+
compiler/GHC/CmmToAsm/Reg/Utils.hs
</span>
</a>
</li>
<li class="file-stats">
<a href="#522ba674004d5ebf69a7ec80b0d7c765e08b60cc">
compiler/GHC/CmmToAsm/X86/RegInfo.hs
</a>
</li>
<li class="file-stats">
<a href="#b5ac041c7f79084a7a7626eda4cdadda3457d235">
compiler/GHC/CmmToLlvm/Base.hs
</a>
</li>
<li class="file-stats">
<a href="#91648438362e5a35363d2bb7abb04016dedd7d7e">
compiler/GHC/Core/FamInstEnv.hs
</a>
</li>
<li class="file-stats">
<a href="#5596bb0f228bd2a308c4391df97375ae879430a8">
compiler/GHC/Core/InstEnv.hs
</a>
</li>
<li class="file-stats">
<a href="#c3967bb9d3e8f5aae2dd111b5a335b48c21c1999">
compiler/GHC/Core/Opt/Arity.hs
</a>
</li>
<li class="file-stats">
<a href="#aa79261abf782f3dc603af7fbd5c4b08ed3ddb88">
compiler/GHC/Core/Opt/ConstantFold.hs
</a>
</li>
<li class="file-stats">
<a href="#bac3d5159a5688007de3aa3f5c4e50569677b347">
compiler/GHC/Core/Opt/OccurAnal.hs
</a>
</li>
<li class="file-stats">
<a href="#f168a93cde5e2aec2441d6331dfe500172df4af3">
compiler/GHC/Core/Opt/Simplify.hs
</a>
</li>
<li class="file-stats">
<a href="#48fbb5cdea308650de5756521feb28ec68819b9b">
compiler/GHC/Core/Opt/Simplify/Utils.hs
</a>
</li>
<li class="file-stats">
<a href="#b6a5ba32bafb8fbda933538b3007e755fef6f101">
compiler/GHC/Core/Opt/SpecConstr.hs
</a>
</li>
</ul>
<h5>The diff was not included because it is too large.</h5>

</div>
<div class="footer" style="margin-top: 10px;">
<p style="font-size: small; color: #777;">

<br>
<a href="https://gitlab.haskell.org/ghc/ghc/-/compare/444c1e0e9df29e3323bec9cf5d50fb88c57eaafa...d5275f44a45317d9806fb28ff94bc0b7d9aa99d1">View it on GitLab</a>.
<br>
You're receiving this email because of your account on gitlab.haskell.org.
If you'd like to receive fewer emails, you can
adjust your notification settings.



</p>
</div>
</body>
</html>