[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 15 commits: Generate straightline code for inline array allocation

Marge Bot gitlab at gitlab.haskell.org
Tue Apr 9 14:13:46 UTC 2019



 Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC


Commits:
63b7d5fb by Michal Terepeta at 2019-04-08T18:29:34Z
Generate straightline code for inline array allocation

GHC has an optimization for allocating arrays when the size is
statically known -- it'll generate the code allocating and initializing
the array inline (instead of a call to a procedure from
`rts/PrimOps.cmm`).

However, the generated code uses a loop to do the initialization. Since
we already check that the requested size is small (we check against
`maxInlineAllocSize`), we can generate faster straightline code instead.
This brings about 15% improvement for `newSmallArray#` in my testing and
slightly simplifies the code in GHC.

Signed-off-by: Michal Terepeta <michal.terepeta at gmail.com>

- - - - -
2b3f4718 by Phuong Trinh at 2019-04-08T18:35:43Z
Fix #16500: look for interface files in -hidir flag in OneShot mode

We are currently ignoring options set in the hiDir field of hsc_dflags
when looking for interface files while compiling in OneShot mode. This
is inconsistent with the behaviour of other directory redirecting fields
(such as objectDir or hieDir). It is also inconsistent with the
behaviour of compilation in CompManager mode (a.k.a `ghc --make`) which
looks for interface files in the directory set in hidir flag. This
changes Finder.hs so that we use the value of hiDir while looking for
interface in OneShot mode.

- - - - -
97502be8 by Yuriy Syrovetskiy at 2019-04-08T18:41:51Z
Add `-optcxx` option (#16477)

- - - - -
97d3d546 by Ben Gamari at 2019-04-08T18:47:54Z
testsuite: Unmark T16190 as broken

Was broken via #16389 yet strangely it has started passing despite the
fact that the suggested root cause has not changed.

- - - - -
a42d206a by Yuriy Syrovetskiy at 2019-04-08T18:54:02Z
Fix whitespace style

- - - - -
4dda2270 by Matthew Pickering at 2019-04-08T19:00:08Z
Use ./hadrian/ghci.sh in .ghcid

- - - - -
d236d9d0 by Sebastian Graf at 2019-04-08T19:06:15Z
Make `singleConstructor` cope with pattern synonyms

Previously, `singleConstructor` didn't handle singleton `COMPLETE` sets
of a single pattern synonym, resulting in incomplete pattern warnings
in #15753.

This is fixed by making `singleConstructor` (now named
`singleMatchConstructor`) query `allCompleteMatches`, necessarily making
it effectful. As a result, most of this patch is concerned with
threading the side-effect through to `singleMatchConstructor`.

Unfortunately, this is not enough to completely fix the original
reproduction from #15753 and #15884, which are related to function
applications in pattern guards being translated too conservatively.

- - - - -
1085090e by Ömer Sinan Ağacan at 2019-04-08T19:12:22Z
Skip test ArithInt16 and ArithWord16 in GHCi way

These tests use unboxed tuples, which GHCi doesn't support

- - - - -
7287bb9e by Ömer Sinan Ağacan at 2019-04-08T19:18:33Z
testsuite: Show exit code of GHCi tests on failure

- - - - -
f5604d37 by John Ericson at 2019-04-08T19:24:43Z
settings.in: Reformat

We're might be about to switch to generating it in Hadrian/Make. This
reformat makes it easier to programmingmatically generate and end up
with the exact same thing, which is good for diffing to ensure no
regressions.

I had this as part of !712, but given the difficulty of satisfying CI, I
figured I should break things up even further.

- - - - -
cf9e1837 by Ryan Scott at 2019-04-08T19:30:51Z
Bump hpc submodule

Currently, the `hpc` submodule is pinned against the `wip/final-mfp`
branch, not against `master`. This pins it back against `master`.

- - - - -
12e3d8bc by Ben Gamari at 2019-04-09T14:13:37Z
users-guide: Document how to disable package environments

As noted in #16309 this somehow went undocumented.

- - - - -
7f33979d by Artem Pyanykh at 2019-04-09T14:13:40Z
codegen: fix memset unroll for small bytearrays, add 64-bit sets

Fixes #16052

When the offset in `setByteArray#` is statically known, we can provide
better alignment guarantees then just 1 byte.

Also, memset can now do 64-bit wide sets.

The current memset intrinsic is not optimal however and can be
improved for the case when we know that we deal with

(baseAddress at known alignment) + offset

For instance, on 64-bit

`setByteArray# s 1# 23# 0#`

given that bytearray is 8 bytes aligned could be unrolled into
`movb, movw, movl, movq, movq`; but currently it is
`movb x23` since alignment of 1 is all we can embed into MO_Memset op.

- - - - -
6ba24ba0 by Artem Pyanykh at 2019-04-09T14:13:40Z
codegen: use newtype for Alignment in BasicTypes

- - - - -
06b04e44 by Artem Pyanykh at 2019-04-09T14:13:40Z
docs: add a note about changes in memset unrolling to 8.10.1-notes

- - - - -


30 changed files:

- .ghcid
- .gitlab-ci.yml
- compiler/basicTypes/BasicTypes.hs
- compiler/codeGen/StgCmmPrim.hs
- compiler/deSugar/Check.hs
- compiler/main/DriverPhases.hs
- compiler/main/DriverPipeline.hs
- compiler/main/DynFlags.hs
- compiler/main/Finder.hs
- compiler/main/HscTypes.hs
- compiler/main/SysTools.hs
- compiler/main/SysTools/ExtraObj.hs
- compiler/main/SysTools/Tasks.hs
- compiler/nativeGen/X86/CodeGen.hs
- compiler/nativeGen/X86/Ppr.hs
- compiler/utils/Util.hs
- docs/users_guide/8.10.1-notes.rst
- docs/users_guide/packages.rst
- docs/users_guide/phases.rst
- docs/users_guide/separate_compilation.rst
- libraries/ghc-prim/cbits/bitrev.c
- libraries/hpc
- settings.in
- testsuite/driver/testlib.py
- testsuite/tests/codeGen/should_gen_asm/all.T
- + testsuite/tests/codeGen/should_gen_asm/bytearray-memset-unroll.asm
- + testsuite/tests/codeGen/should_gen_asm/bytearray-memset-unroll.hs
- + testsuite/tests/codeGen/should_run/NewSmallArray.hs
- + testsuite/tests/codeGen/should_run/NewSmallArray.stdout
- testsuite/tests/codeGen/should_run/all.T


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/compare/27d0db377d53b46a4861dc977010049f6eb6088e...06b04e44e9ac588fbd54d1c6f904275de6d248c1

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/compare/27d0db377d53b46a4861dc977010049f6eb6088e...06b04e44e9ac588fbd54d1c6f904275de6d248c1
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20190409/c586d518/attachment.html>


More information about the ghc-commits mailing list