<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en" style='--code-editor-font: var(--default-mono-font, "GitLab Mono"), JetBrains Mono, Menlo, DejaVu Sans Mono, Liberation Mono, Consolas, Ubuntu Mono, Courier New, andale mono, lucida console, monospace;'>
<head>
<meta content="text/html; charset=US-ASCII" http-equiv="Content-Type">
<title>
GitLab
</title>
<style data-premailer="ignore" type="text/css">
a { color: #1068bf; }
</style>
<style>img {
max-width: 100%; height: auto;
}
body {
font-size: .875rem;
}
body {
-webkit-text-shadow: rgba(255,255,255,.01) 0 0 1px;
}
body {
font-family: "GitLab Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans",Ubuntu,Cantarell,"Helvetica Neue",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"; font-size: inherit;
}
</style>
</head>
<body style='font-size: inherit; -webkit-text-shadow: rgba(255,255,255,.01) 0 0 1px; font-family: "GitLab Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans",Ubuntu,Cantarell,"Helvetica Neue",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";'>
<div class="content">
<h3 style="margin-top: 20px; margin-bottom: 10px;">
Marge Bot pushed to branch master at <a href="https://gitlab.haskell.org/ghc/ghc">Glasgow Haskell Compiler / GHC</a>
</h3>
<h4 style="margin-top: 10px; margin-bottom: 10px;">
Commits:
</h4>
<ul>
<li>
<strong style="font-weight: 600;"><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/2a551cd5f6d9b23afd1f23ee64e8ef53874ec223">2a551cd5</a></strong>
<div>
<span> by Matthew Pickering </span> <i> at 2024-09-24T16:33:50+05:30 </i>
</div>
<pre class="commit-message" style='white-space: pre-wrap; display: block; font-size: 14px; color: #28272d; position: relative; font-family: "GitLab Mono","JetBrains Mono","Menlo","DejaVu Sans Mono","Liberation Mono","Consolas","Ubuntu Mono","Courier New","andale mono","lucida console",monospace; word-break: break-all; word-wrap: break-word; background-color: #fbfafd; border-radius: 2px; margin: 0; padding: 8px 12px; border: 1px solid #dcdcde;'>ci: Run abi-test on test-abi label
</pre>
</li>
<li>
<strong style="font-weight: 600;"><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/ab4039ace849e4e77a6be2993f599171d252f78c">ab4039ac</a></strong>
<div>
<span> by Rodrigo Mesquita </span> <i> at 2024-09-24T16:33:50+05:30 </i>
</div>
<pre class="commit-message" style='white-space: pre-wrap; display: block; font-size: 14px; color: #28272d; position: relative; font-family: "GitLab Mono","JetBrains Mono","Menlo","DejaVu Sans Mono","Liberation Mono","Consolas","Ubuntu Mono","Courier New","andale mono","lucida console",monospace; word-break: break-all; word-wrap: break-word; background-color: #fbfafd; border-radius: 2px; margin: 0; padding: 8px 12px; border: 1px solid #dcdcde;'>testsuite: Add a test for object determinism
Extends the abi_test with an object determinism check
Also includes a standalone test to be run by developers manually when
debugging issues with determinism.
</pre>
</li>
<li>
<strong style="font-weight: 600;"><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/d62c18d84c23728d258333b049994094c6858bbe">d62c18d8</a></strong>
<div>
<span> by Rodrigo Mesquita </span> <i> at 2024-09-24T16:33:50+05:30 </i>
</div>
<pre class="commit-message" style='white-space: pre-wrap; display: block; font-size: 14px; color: #28272d; position: relative; font-family: "GitLab Mono","JetBrains Mono","Menlo","DejaVu Sans Mono","Liberation Mono","Consolas","Ubuntu Mono","Courier New","andale mono","lucida console",monospace; word-break: break-all; word-wrap: break-word; background-color: #fbfafd; border-radius: 2px; margin: 0; padding: 8px 12px; border: 1px solid #dcdcde;'>determinism: Sampling uniques in the CG
To achieve object determinism, the passes processing Cmm and the rest of
the code generation pipeline musn't create new uniques which are
non-deterministic.
This commit changes occurrences of non-deterministic unique sampling
within these code generation passes by a deterministic unique sampling
strategy by propagating and threading through a deterministic
incrementing counter in them. The threading is done implicitly with
`UniqDSM` and `UniqDSMT`.
Secondly, the `DUniqSupply` used to run a `UniqDSM` must be threaded
through all passes to guarantee uniques in different passes are unique
amongst them altogether. Specifically, the same `DUniqSupply` must be
threaded through the CG Streaming pipeline, starting with Driver.Main
calling `StgToCmm.codeGen`, `cmmPipeline`, `cmmToRawCmm`, and
`codeOutput` in sequence.
To thread resources through the `Stream` abstraction, we use the `UniqDSMT`
transformer on top of `IO` as the Monad underlying the Stream. `UniqDSMT` will
thread the `DUniqSupply` through every pass applied to the `Stream`, for every
element. We use @type CgStream = Stream (UniqDSMT IO)@ for the Stream used in
code generation which that carries through the deterministic unique supply.
See Note [Deterministic Uniques in the CG]
</pre>
</li>
<li>
<strong style="font-weight: 600;"><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/3bbe4af48cdc15f43f4cb10ba131157b0cb7e228">3bbe4af4</a></strong>
<div>
<span> by Rodrigo Mesquita </span> <i> at 2024-09-24T16:33:50+05:30 </i>
</div>
<pre class="commit-message" style='white-space: pre-wrap; display: block; font-size: 14px; color: #28272d; position: relative; font-family: "GitLab Mono","JetBrains Mono","Menlo","DejaVu Sans Mono","Liberation Mono","Consolas","Ubuntu Mono","Courier New","andale mono","lucida console",monospace; word-break: break-all; word-wrap: break-word; background-color: #fbfafd; border-radius: 2px; margin: 0; padding: 8px 12px; border: 1px solid #dcdcde;'>determinism: Cmm unique renaming pass
To achieve object determinism, we need to prevent the non-deterministic
uniques from leaking into the object code. We can do this by
deterministically renaming the non-external uniques in the Cmm groups
that are yielded right after StgToCmm.
The key to deterministic renaming is observing that the order of
declarations, instructions, and data in the Cmm groups are already
deterministic (modulo other determinism bugs), regardless of the
uniques. We traverse the Cmm AST in this deterministic order and
rename the uniques, incrementally, in the order they are found, thus
making them deterministic. This renaming is guarded by
-fobject-determinism which is disabled by default for now.
This is one of the key passes for object determinism. Read about the
overview of object determinism and a more detailed explanation of this
pass in:
* Note [Object determinism]
* Note [Renaming uniques deterministically]
Significantly closes the gap to #12935
</pre>
</li>
<li>
<strong style="font-weight: 600;"><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/8357ed502d096e998eb2beeefd88b04f6810a170">8357ed50</a></strong>
<div>
<span> by Rodrigo Mesquita </span> <i> at 2024-09-24T16:33:50+05:30 </i>
</div>
<pre class="commit-message" style='white-space: pre-wrap; display: block; font-size: 14px; color: #28272d; position: relative; font-family: "GitLab Mono","JetBrains Mono","Menlo","DejaVu Sans Mono","Liberation Mono","Consolas","Ubuntu Mono","Courier New","andale mono","lucida console",monospace; word-break: break-all; word-wrap: break-word; background-color: #fbfafd; border-radius: 2px; margin: 0; padding: 8px 12px; border: 1px solid #dcdcde;'>determinism: DCmmGroup vs CmmGroup
Part of our strategy in producing deterministic objects, namely,
renaming all Cmm uniques in order, depend on the object code produced
having a deterministic order (say, A_closure always comes before
B_closure).
However, the use of LabelMaps in the Cmm representation invalidated this
requirement because the LabelMaps elements would already be in a
non-deterministic order (due to the original uniques), and the renaming
in sequence wouldn't work because of that non-deterministic order.
Therefore, we now start off with lists in CmmGroup (which preserve the
original order), and convert them into LabelMaps (for performance in the
code generator) after the uniques of the list elements have been
renamed.
See Note [DCmmGroup vs CmmGroup or: Deterministic Info Tables] and #12935.
Co-authored-by: Matthew Pickering <matthewtpickering@gmail.com>
</pre>
</li>
<li>
<strong style="font-weight: 600;"><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/0e675fb8ab682b64dfac2d44cb23b20bb3314809">0e675fb8</a></strong>
<div>
<span> by Rodrigo Mesquita </span> <i> at 2024-09-24T16:33:50+05:30 </i>
</div>
<pre class="commit-message" style='white-space: pre-wrap; display: block; font-size: 14px; color: #28272d; position: relative; font-family: "GitLab Mono","JetBrains Mono","Menlo","DejaVu Sans Mono","Liberation Mono","Consolas","Ubuntu Mono","Courier New","andale mono","lucida console",monospace; word-break: break-all; word-wrap: break-word; background-color: #fbfafd; border-radius: 2px; margin: 0; padding: 8px 12px; border: 1px solid #dcdcde;'>determinism: Don't print unique in pprFullName
This unique was leaking as part of the profiling description in info
tables when profiling was enabled, despite not providing information
relevant to the profile.
</pre>
</li>
<li>
<strong style="font-weight: 600;"><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/340f58b0b01da0052d938b658c5728be0534f433">340f58b0</a></strong>
<div>
<span> by Rodrigo Mesquita </span> <i> at 2024-09-24T16:33:50+05:30 </i>
</div>
<pre class="commit-message" style='white-space: pre-wrap; display: block; font-size: 14px; color: #28272d; position: relative; font-family: "GitLab Mono","JetBrains Mono","Menlo","DejaVu Sans Mono","Liberation Mono","Consolas","Ubuntu Mono","Courier New","andale mono","lucida console",monospace; word-break: break-all; word-wrap: break-word; background-color: #fbfafd; border-radius: 2px; margin: 0; padding: 8px 12px; border: 1px solid #dcdcde;'>determinism: UDFM for distinct-constructor-tables
In order to produce deterministic objects when compiling with
-distinct-constructor-tables, we also have to update the data
constructor map to be backed by a deterministic unique map (UDFM) rather
than a non-deterministic one (UniqMap).
</pre>
</li>
<li>
<strong style="font-weight: 600;"><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/282f37a0a328adcb03e7d911b71938524b261dd8">282f37a0</a></strong>
<div>
<span> by Rodrigo Mesquita </span> <i> at 2024-09-24T16:33:50+05:30 </i>
</div>
<pre class="commit-message" style='white-space: pre-wrap; display: block; font-size: 14px; color: #28272d; position: relative; font-family: "GitLab Mono","JetBrains Mono","Menlo","DejaVu Sans Mono","Liberation Mono","Consolas","Ubuntu Mono","Courier New","andale mono","lucida console",monospace; word-break: break-all; word-wrap: break-word; background-color: #fbfafd; border-radius: 2px; margin: 0; padding: 8px 12px; border: 1px solid #dcdcde;'>determinism: InfoTableMap uniques in generateCgIPEStub
Fixes object determinism when using -finfo-table-map
Make sure to also deterministically rename the IPE map (as per Note
[Renaming uniques deterministically]), and to use a deterministic unique
supply when creating new labels for the IPE information to guarantee
deterministic objects when IPE information is requested.
Note that the Cmm group produced in generateCgIPEStub must /not/ be
renamed because renaming uniques is not idempotent, and the references
to the previously renamed code in the IPE Cmm group would be renamed
twice and become invalid references to non-existent symbols.
We do need to det-rename the InfoTableMap that is created in the
conversion from Core to Stg. This is not a problem since that map won't
refer any already renamed names (since it was created before the
renaming).
</pre>
</li>
<li>
<strong style="font-weight: 600;"><a href="https://gitlab.haskell.org/ghc/ghc/-/commit/7b37afc9f3e79559055488998ee73187886a0e00">7b37afc9</a></strong>
<div>
<span> by Zubin Duggal </span> <i> at 2024-09-24T16:33:50+05:30 </i>
</div>
<pre class="commit-message" style='white-space: pre-wrap; display: block; font-size: 14px; color: #28272d; position: relative; font-family: "GitLab Mono","JetBrains Mono","Menlo","DejaVu Sans Mono","Liberation Mono","Consolas","Ubuntu Mono","Courier New","andale mono","lucida console",monospace; word-break: break-all; word-wrap: break-word; background-color: #fbfafd; border-radius: 2px; margin: 0; padding: 8px 12px; border: 1px solid #dcdcde;'>ci: Allow abi-test to fail.
We are not fully deterministic yet, see #12935 for work that remains to be done.
</pre>
</li>
</ul>
<h4 style="margin-top: 10px; margin-bottom: 10px;">
30 changed files:
</h4>
<ul>
<li class="file-stats">
<a href="#587d266bb27a4dc3022bbed44dfa19849df3044c">
.gitlab-ci.yml
</a>
</li>
<li class="file-stats">
<a href="#157f7634c25bc6366cb7c9c9edb48e819dce38db">
.gitlab/ci.sh
</a>
</li>
<li class="file-stats">
<a href="#f73a4fa90a8eb153bccdcfcc9f63c15edcd66785">
compiler/GHC/Cmm.hs
</a>
</li>
<li class="file-stats">
<a href="#2635960270885615c76f7437d2eb6c5bd6082895">
compiler/GHC/Cmm/BlockId.hs
</a>
</li>
<li class="file-stats">
<a href="#db697f6aea9f93f1583f1d5c62d25570a1e07f73">
compiler/GHC/Cmm/CLabel.hs
</a>
</li>
<li class="file-stats">
<a href="#ae3febe6c6eb7c487d9f1021b113402ae6148bae">
compiler/GHC/Cmm/Dataflow.hs
</a>
</li>
<li class="file-stats">
<a href="#f0eb87ebfd1fa86064e22c34e559db8c8195ffcb">
compiler/GHC/Cmm/Dataflow/Graph.hs
</a>
</li>
<li class="file-stats">
<a href="#29368208fbfcaee57ce84000cdccaba639e85a75">
compiler/GHC/Cmm/Graph.hs
</a>
</li>
<li class="file-stats">
<a href="#47cba74ae8965f1665cd11bf2b023760ea27594e">
compiler/GHC/Cmm/Info.hs
</a>
</li>
<li class="file-stats">
<a href="#2d3721ad8de95e1144493ca545db846672cb109f">
compiler/GHC/Cmm/Info/Build.hs
</a>
</li>
<li class="file-stats">
<a href="#066085df29cc928ac539d8feae6e5215cbbf1e14">
compiler/GHC/Cmm/LayoutStack.hs
</a>
</li>
<li class="file-stats">
<a href="#00c27365316e033b00cc3ed3854ac8714d25a2b5">
compiler/GHC/Cmm/Opt.hs
</a>
</li>
<li class="file-stats">
<a href="#71e696f452eb493722d70306c6f304fc9b2f6a95">
compiler/GHC/Cmm/Parser.y
</a>
</li>
<li class="file-stats">
<a href="#d40f34584a7f4c0fa7587fb41f94a34bca0d1064">
compiler/GHC/Cmm/Pipeline.hs
</a>
</li>
<li class="file-stats">
<a href="#29a1593e7281c8a9103a19e3a7562e2365e23b47">
compiler/GHC/Cmm/ProcPoint.hs
</a>
</li>
<li class="file-stats">
<a href="#6269ecd0e04f688b9a50e8cf9709fb4d9d5616d5">
compiler/GHC/Cmm/Reducibility.hs
</a>
</li>
<li class="file-stats">
<a href="#b1390f6749e1a2dddcae35f88d55623ea6269f56">
compiler/GHC/Cmm/Sink.hs
</a>
</li>
<li class="file-stats">
<a href="#072618a3250e1148569c2d2e0c05e313c2f529e3">
compiler/GHC/Cmm/Switch.hs
</a>
</li>
<li class="file-stats">
<a href="#f8bd883e3d3136150937961aaca9b45779a06100">
compiler/GHC/Cmm/Switch/Implement.hs
</a>
</li>
<li class="file-stats">
<a href="#194e2602b82bb08fd31c3028aace1da113aae36f">
compiler/GHC/Cmm/ThreadSanitizer.hs
</a>
</li>
<li class="file-stats">
<a href="#abeee02d953ad375632ff4797c0b431d42757b6a">
<span class="new-file">
+
compiler/GHC/Cmm/UniqueRenamer.hs
</span>
</a>
</li>
<li class="file-stats">
<a href="#10b61652f9817945bb54ccf8fc40f8a664ca3c30">
compiler/GHC/CmmToAsm.hs
</a>
</li>
<li class="file-stats">
<a href="#6997a0cd37829d3d08db1c48185aaa3d7dfc3e6b">
compiler/GHC/CmmToAsm/AArch64/CodeGen.hs
</a>
</li>
<li class="file-stats">
<a href="#807babf5b215890881c92043bcd08486141a405c">
compiler/GHC/CmmToAsm/AArch64/Instr.hs
</a>
</li>
<li class="file-stats">
<a href="#5986ebaacfa99d264abfd2f7ef19d99a64db720f">
compiler/GHC/CmmToAsm/BlockLayout.hs
</a>
</li>
<li class="file-stats">
<a href="#b131e0d591301ee7a1c76bbd812f3d14783e934f">
compiler/GHC/CmmToAsm/Dwarf.hs
</a>
</li>
<li class="file-stats">
<a href="#ea29061dab1b843e0ea9294afc614998f3a8d08f">
compiler/GHC/CmmToAsm/Monad.hs
</a>
</li>
<li class="file-stats">
<a href="#89f8a68c62e7b5e239f8d8d532820fc086d29140">
compiler/GHC/CmmToAsm/PPC/Instr.hs
</a>
</li>
<li class="file-stats">
<a href="#8aa37f646abc1f31b2187039a5e6d02a2c625422">
compiler/GHC/CmmToAsm/RV64/CodeGen.hs
</a>
</li>
<li class="file-stats">
<a href="#cfb1f42e06866e0d86fc3f8997170ad794b63817">
compiler/GHC/CmmToAsm/RV64/Instr.hs
</a>
</li>
</ul>
<h5 style="margin-top: 10px; margin-bottom: 10px; font-size: .875rem;">
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: #737278;">
—
<br>
<a href="https://gitlab.haskell.org/ghc/ghc/-/compare/c0df5aa9999fcb7a7890973c319b56731b77aa7d...7b37afc9f3e79559055488998ee73187886a0e00">View it on GitLab</a>.
<br>
You're receiving this email because of your account on <a target="_blank" rel="noopener noreferrer" href="https://gitlab.haskell.org">gitlab.haskell.org</a>. <a href="https://gitlab.haskell.org/-/profile/notifications" target="_blank" rel="noopener noreferrer" class="mng-notif-link">Manage all notifications</a> · <a href="https://gitlab.haskell.org/help" target="_blank" rel="noopener noreferrer" class="help-link">Help</a>
</p>
</div>
</body>
</html>