<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/haskell.git/compiler/GHC/Driver, branch wip/backpack-errs</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>Rename `ms_hspp_file` to `ms_hspp_file_loc` and change its</title>
<updated>2021-10-21T12:28:34+00:00</updated>
<author>
<name>Zubin Duggal</name>
<email>zubin.duggal@gmail.com</email>
</author>
<published>2021-10-21T12:09:41+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/haskell.git/commit/?id=95b25a0fa66cb7eda4bc54ba3cce3d9fc73c8262'/>
<id>95b25a0fa66cb7eda4bc54ba3cce3d9fc73c8262</id>
<content type='text'>
type to a `RealSrcLoc` to accomodate backpack
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
type to a `RealSrcLoc` to accomodate backpack
</pre>
</div>
</content>
</entry>
<entry>
<title>Introduce 'PreprocessedFile' type to model backpack interface files.</title>
<updated>2021-10-19T12:24:45+00:00</updated>
<author>
<name>Zubin Duggal</name>
<email>zubin.duggal@gmail.com</email>
</author>
<published>2021-10-18T09:25:24+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/haskell.git/commit/?id=1c4078db07df370e5ba48268c980e3ff5145e111'/>
<id>1c4078db07df370e5ba48268c980e3ff5145e111</id>
<content type='text'>
We don't want to print out data from the interface file (#20489)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We don't want to print out data from the interface file (#20489)
</pre>
</div>
</content>
</entry>
<entry>
<title>Add defaulting plugins.</title>
<updated>2021-10-08T23:45:29+00:00</updated>
<author>
<name>Andrei Barbu</name>
<email>andrei@0xab.com</email>
</author>
<published>2021-08-25T07:20:51+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/haskell.git/commit/?id=a76409c758d8c7bd837dcc6c0b58f8cce656b4f1'/>
<id>a76409c758d8c7bd837dcc6c0b58f8cce656b4f1</id>
<content type='text'>
Like the built-in type defaulting rules these plugins can propose candidates
to resolve ambiguous type variables.

Machine learning and other large APIs like those for game engines introduce
new numeric types and other complex typed APIs. The built-in defaulting
mechanism isn't powerful enough to resolve ambiguous types in these cases forcing
users to specify minutia that they might not even know how to do. There is
an example defaulting plugin linked in the documentation. Applications include
defaulting the device a computation executes on, if a gradient should be
computed for a tensor, or the size of a tensor.

See https://github.com/ghc-proposals/ghc-proposals/pull/396 for details.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Like the built-in type defaulting rules these plugins can propose candidates
to resolve ambiguous type variables.

Machine learning and other large APIs like those for game engines introduce
new numeric types and other complex typed APIs. The built-in defaulting
mechanism isn't powerful enough to resolve ambiguous types in these cases forcing
users to specify minutia that they might not even know how to do. There is
an example defaulting plugin linked in the documentation. Applications include
defaulting the device a computation executes on, if a gradient should be
computed for a tensor, or the size of a tensor.

See https://github.com/ghc-proposals/ghc-proposals/pull/396 for details.
</pre>
</div>
</content>
</entry>
<entry>
<title>code gen: Disable dead code elimination when -finfo-table-map is enabled</title>
<updated>2021-10-08T22:11:43+00:00</updated>
<author>
<name>Matthew Pickering</name>
<email>matthewtpickering@gmail.com</email>
</author>
<published>2021-10-06T09:45:55+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/haskell.git/commit/?id=55a6377a5d55d6e6e93cf3d087f1e2d17fe7d3f3'/>
<id>55a6377a5d55d6e6e93cf3d087f1e2d17fe7d3f3</id>
<content type='text'>
It's important that when -finfo-table-map is enabled that we generate
IPE entries just for those info tables which are actually used. To this
end, the info tables which are used are collected just before code
generation starts and entries only created for those tables.

Not accounted for in this scheme was the dead code elimination in the
native code generator. When compiling GHC this optimisation removed an
info table which had an IPE entry which resulting in the following kind
of linker error:

```
/home/matt/ghc-with-debug/_build/stage1/lib/../lib/x86_64-linux-ghc-9.3.20210928/libHSCabal-3.5.0.0-ghc9.3.20210928.so: error: undefined reference to '.Lc5sS_info'
/home/matt/ghc-with-debug/_build/stage1/lib/../lib/x86_64-linux-ghc-9.3.20210928/libHSCabal-3.5.0.0-ghc9.3.20210928.so: error: undefined reference to '.Lc5sH_info'
/home/matt/ghc-with-debug/_build/stage1/lib/../lib/x86_64-linux-ghc-9.3.20210928/libHSCabal-3.5.0.0-ghc9.3.20210928.so: error: undefined reference to '.Lc5sm_info'
collect2: error: ld returned 1 exit status
`cc' failed in phase `Linker'. (Exit code: 1)
Development.Shake.cmd, system command failed
```

Unfortunately, by the time this optimisation happens the structure of
the CmmInfoTable has been lost, we only have the generated code for the
info table to play with so we can no longer just collect all the used
info tables and generate the IPE map.

This leaves us with two options:

1. Return a list of the names of the discarded info tables and then
   remove them from the map. This is awkward because we need to do code
   generation for the map as well.
2. Just disable this small code size optimisation when -finfo-table-map
   is enabled. The option produces very big object files anyway.

Option 2 is much easier to implement and means we don't have to thread
information around awkwardly. It's at the cost of slightly larger object
files (as dead code is not eliminated).

Disabling this optimisation allows an IPE build of GHC to complete
successfully.

Fixes #20428
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It's important that when -finfo-table-map is enabled that we generate
IPE entries just for those info tables which are actually used. To this
end, the info tables which are used are collected just before code
generation starts and entries only created for those tables.

Not accounted for in this scheme was the dead code elimination in the
native code generator. When compiling GHC this optimisation removed an
info table which had an IPE entry which resulting in the following kind
of linker error:

```
/home/matt/ghc-with-debug/_build/stage1/lib/../lib/x86_64-linux-ghc-9.3.20210928/libHSCabal-3.5.0.0-ghc9.3.20210928.so: error: undefined reference to '.Lc5sS_info'
/home/matt/ghc-with-debug/_build/stage1/lib/../lib/x86_64-linux-ghc-9.3.20210928/libHSCabal-3.5.0.0-ghc9.3.20210928.so: error: undefined reference to '.Lc5sH_info'
/home/matt/ghc-with-debug/_build/stage1/lib/../lib/x86_64-linux-ghc-9.3.20210928/libHSCabal-3.5.0.0-ghc9.3.20210928.so: error: undefined reference to '.Lc5sm_info'
collect2: error: ld returned 1 exit status
`cc' failed in phase `Linker'. (Exit code: 1)
Development.Shake.cmd, system command failed
```

Unfortunately, by the time this optimisation happens the structure of
the CmmInfoTable has been lost, we only have the generated code for the
info table to play with so we can no longer just collect all the used
info tables and generate the IPE map.

This leaves us with two options:

1. Return a list of the names of the discarded info tables and then
   remove them from the map. This is awkward because we need to do code
   generation for the map as well.
2. Just disable this small code size optimisation when -finfo-table-map
   is enabled. The option produces very big object files anyway.

Option 2 is much easier to implement and means we don't have to thread
information around awkwardly. It's at the cost of slightly larger object
files (as dead code is not eliminated).

Disabling this optimisation allows an IPE build of GHC to complete
successfully.

Fixes #20428
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix -E -fno-code undesirable interactions #20439</title>
<updated>2021-10-08T22:11:08+00:00</updated>
<author>
<name>CarrieMY</name>
<email>carrie.xmy@gmail.com</email>
</author>
<published>2021-10-04T13:03:38+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/haskell.git/commit/?id=816d256114858d01c99503c10e3be86ecdb15173'/>
<id>816d256114858d01c99503c10e3be86ecdb15173</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Disable -dynamic-too if -dynamic is also passed</title>
<updated>2021-10-06T14:57:24+00:00</updated>
<author>
<name>Matthew Pickering</name>
<email>matthewtpickering@gmail.com</email>
</author>
<published>2021-10-01T09:36:59+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/haskell.git/commit/?id=9af29e7fa81a8696a2d829a0ecbebcbc8be5badd'/>
<id>9af29e7fa81a8696a2d829a0ecbebcbc8be5badd</id>
<content type='text'>
Before if you passed both options then you would generate two identical
hi/dyn_hi and o/dyn_o files, both in the dynamic way. It's better to
warn this is happening rather than duplicating the work and causing
potential confusion.

-dynamic-too should only be used with -static.

Fixes #20436
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Before if you passed both options then you would generate two identical
hi/dyn_hi and o/dyn_o files, both in the dynamic way. It's better to
warn this is happening rather than duplicating the work and causing
potential confusion.

-dynamic-too should only be used with -static.

Fixes #20436
</pre>
</div>
</content>
</entry>
<entry>
<title>driver: Fix -E -XCPP, copy output from CPP ouput rather than .hs output</title>
<updated>2021-09-30T23:41:44+00:00</updated>
<author>
<name>Matthew Pickering</name>
<email>matthewtpickering@gmail.com</email>
</author>
<published>2021-09-27T09:28:43+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/haskell.git/commit/?id=adc41a7747a72a526dd30e63afb03c61cee13e9a'/>
<id>adc41a7747a72a526dd30e63afb03c61cee13e9a</id>
<content type='text'>
Fixes #20416

I thought about adding a test for this case but I struggled to think of
something robust. Grepping -v3 will include different paths on different
systems and the structure of the result file depends on which
preprocessor you are using.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes #20416

I thought about adding a test for this case but I struggled to think of
something robust. Grepping -v3 will include different paths on different
systems and the structure of the result file depends on which
preprocessor you are using.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add `-dsuppress-core-sizes` flag (#20342)</title>
<updated>2021-09-28T05:53:01+00:00</updated>
<author>
<name>Sylvain Henry</name>
<email>sylvain@haskus.fr</email>
</author>
<published>2021-09-16T09:27:52+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/haskell.git/commit/?id=45a674aacf33dc47c48506b834752d59fffd7e2c'/>
<id>45a674aacf33dc47c48506b834752d59fffd7e2c</id>
<content type='text'>
This flag is used to remove the output of core stats per binding in Core
dumps.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This flag is used to remove the output of core stats per binding in Core
dumps.
</pre>
</div>
</content>
</entry>
<entry>
<title>driver: Fix Ctrl-C handling with -j1</title>
<updated>2021-09-28T05:52:23+00:00</updated>
<author>
<name>Matthew Pickering</name>
<email>matthewtpickering@gmail.com</email>
</author>
<published>2021-08-26T16:42:53+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/haskell.git/commit/?id=e38facf85200ea97ca107caefd1b17252639bc18'/>
<id>e38facf85200ea97ca107caefd1b17252639bc18</id>
<content type='text'>
Even in -j1 we now fork all the work into it's own thread so that Ctrl-C
exceptions are thrown on the main thread, which is blocked waiting for
the work thread to finish. The default exception handler then picks up
Ctrl-C exception and the dangling thread is killed.

Fixes #20292
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Even in -j1 we now fork all the work into it's own thread so that Ctrl-C
exceptions are thrown on the main thread, which is blocked waiting for
the work thread to finish. The default exception handler then picks up
Ctrl-C exception and the dangling thread is killed.

Fixes #20292
</pre>
</div>
</content>
</entry>
<entry>
<title>Use Info Table Provenances to decode cloned stack (#18163)</title>
<updated>2021-09-23T19:59:38+00:00</updated>
<author>
<name>Sven Tennie</name>
<email>sven.tennie@gmail.com</email>
</author>
<published>2021-04-03T17:35:34+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/haskell.git/commit/?id=29717ecb0711cd03796510fbe9b4bff58c7da870'/>
<id>29717ecb0711cd03796510fbe9b4bff58c7da870</id>
<content type='text'>
Emit an Info Table Provenance Entry (IPE) for every stack represeted info table
if -finfo-table-map is turned on.

To decode a cloned stack, lookupIPE() is used. It provides a mapping between
info tables and their source location.

Please see these notes for details:

- [Stacktraces from Info Table Provenance Entries (IPE based stack unwinding)]
- [Mapping Info Tables to Source Positions]

Metric Increase:
    T12545
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Emit an Info Table Provenance Entry (IPE) for every stack represeted info table
if -finfo-table-map is turned on.

To decode a cloned stack, lookupIPE() is used. It provides a mapping between
info tables and their source location.

Please see these notes for details:

- [Stacktraces from Info Table Provenance Entries (IPE based stack unwinding)]
- [Mapping Info Tables to Source Positions]

Metric Increase:
    T12545
</pre>
</div>
</content>
</entry>
</feed>
