[Git][ghc/ghc][wip/run-nofib] 6 commits: testsuite: Really fix #16741

Ben Gamari gitlab at gitlab.haskell.org
Mon Jun 17 14:20:39 UTC 2019



Ben Gamari pushed to branch wip/run-nofib at Glasgow Haskell Compiler / GHC


Commits:
3c35e140 by Ben Gamari at 2019-06-16T23:38:51Z
testsuite: Really fix #16741

The previous fix, !1095, didn't work as `--show-iface` ignores
`-dsuppress-ticks`. Rework the test instead.

- - - - -
b3bb1b06 by Ben Gamari at 2019-06-16T23:38:51Z
gitlab-ci: Don't allow failure of deb9-dwarf job

This #16741 out of the way this should now pass.

- - - - -
b965de1e by Ömer Sinan Ağacan at 2019-06-16T23:39:29Z
Use TupleSections in CmmParse.y, simplify a few exprs

- - - - -
63965ae3 by Ben Gamari at 2019-06-17T05:20:21Z
make: Clean includes/settings file

Now since this is generated by the build system we should ensure that it
is properly cleaned.

[skip ci]

- - - - -
bb141114 by Siddharth Bhat at 2019-06-17T05:20:57Z
Add link to mfix.github.io/ghc in HACKING.md

- - - - -
24afbfe9 by Ben Gamari at 2019-06-17T14:20:32Z
gitlab-ci: Run nofib on binary distributions

Updates docker images to ensure that the `time` utility is available.

- - - - -


6 changed files:

- .gitlab-ci.yml
- HACKING.md
- compiler/cmm/CmmParse.y
- ghc.mk
- testsuite/tests/simplCore/should_compile/Makefile
- testsuite/tests/simplCore/should_compile/T4918.stdout


Changes:

=====================================
.gitlab-ci.yml
=====================================
@@ -2,7 +2,7 @@ variables:
   GIT_SSL_NO_VERIFY: "1"
 
   # Commit of ghc/ci-images repository from which to pull Docker images
-  DOCKER_REV: 88e952f165f48cfb956ac9a2486a9263aa4f777c
+  DOCKER_REV: e517150438cd9df9564fb91adc4b42e2667b2bc1
 
   # Sequential version number capturing the versions of all tools fetched by
   # .gitlab/win32-init.sh.
@@ -24,7 +24,7 @@ stages:
   - full-build # Build all the things
   - cleanup    # See Note [Cleanup after the shell executor]
   - packaging  # Source distribution, etc.
-  - hackage    # head.hackage testing
+  - testing    # head.hackage correctness and compiler performance testing
   - deploy     # push documentation
 
 # N.B.Don't run on wip/ branches, instead on run on merge requests.
@@ -546,11 +546,10 @@ release-x86_64-linux-deb9-dwarf:
   extends: .validate-linux
   stage: build
   image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb9:$DOCKER_REV"
-  allow_failure: true
   variables:
     CONFIGURE_ARGS: "--enable-dwarf-unwind"
     BUILD_FLAVOUR: dwarf
-    TEST_ENV: "x86_64-linux-deb9"
+    TEST_ENV: "x86_64-linux-deb9-dwarf"
   artifacts:
     when: always
     expire_in: 2 week
@@ -904,7 +903,7 @@ source-tarball:
 
 .hackage:
   <<: *only-default
-  stage: hackage
+  stage: testing
   image: ghcci/x86_64-linux-deb9:0.2
   tags:
     - x86_64-linux
@@ -930,6 +929,47 @@ nightly-hackage:
     variables:
       - $NIGHTLY
 
+############################################################
+# Nofib testing
+############################################################
+
+perf-nofib:
+  stage: testing
+  dependencies:
+    - release-x86_64-linux-deb9-dwarf
+  image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb9:$DOCKER_REV"
+  only:
+    refs:
+      - merge_requests
+      - master
+      - /ghc-[0-9]+\.[0-9]+/
+  tags:
+    - x86_64-linux
+  script:
+    - root=$(pwd)/ghc
+    - |
+      mkdir tmp
+      tar -xf ghc-*-x86_64-unknown-linux.tar.xz -C tmp
+      pushd tmp/ghc-*/
+      ./configure --prefix=$root
+      make install
+      popd
+      rm -Rf tmp
+    - export BOOT_HC=$(which ghc)
+    - cabal update; cabal install -w $BOOT_HC regex-compat
+    - export PATH=$root/bin:$PATH
+    - make -C nofib boot mode=fast -j$CPUS
+    - "make -C nofib EXTRA_RUNTEST_OPTS='-cachegrind +RTS -V0 -RTS' NoFibRuns=1 mode=fast -j$CPUS 2>&1 | tee nofib.log"
+  artifacts:
+    expire_in: 12 week
+    when: always
+    paths:
+      - nofib.log
+
+############################################################
+# Documentation deployment via GitLab Pages
+############################################################
+
 pages:
   stage: deploy
   dependencies:


=====================================
HACKING.md
=====================================
@@ -86,10 +86,21 @@ read over this page carefully:
 
 <https://gitlab.haskell.org/ghc/ghc/wikis/building/using>
 
+A web based code explorer for the GHC source code with semantic analysis
+and type information of the GHC sources is available at:
+
+<https://haskell-code-explorer.mfix.io/>
+
+Look for `GHC` in `Package-name`. For example, here is the link to
+[GHC-8.6.5](https://haskell-code-explorer.mfix.io/package/ghc-8.6.5).
+
+
+
 If you want to watch issues and code review activities, the following page is a good start:
 
 <https://gitlab.haskell.org/ghc/ghc/activity>
 
+
 How to communicate with us
 ==========================
 


=====================================
compiler/cmm/CmmParse.y
=====================================
@@ -198,6 +198,8 @@ necessary to the stack to accommodate it (e.g. 2).
 ----------------------------------------------------------------------------- -}
 
 {
+{-# LANGUAGE TupleSections #-}
+
 module CmmParse ( parseCmmFile ) where
 
 import GhcPrelude
@@ -808,7 +810,7 @@ foreign_formals :: { [CmmParse (LocalReg, ForeignHint)] }
         | foreign_formal ',' foreign_formals    { $1 : $3 }
 
 foreign_formal :: { CmmParse (LocalReg, ForeignHint) }
-        : local_lreg            { do e <- $1; return (e, (inferCmmHint (CmmReg (CmmLocal e)))) }
+        : local_lreg            { do e <- $1; return (e, inferCmmHint (CmmReg (CmmLocal e))) }
         | STRING local_lreg     {% do h <- parseCmmHint $1;
                                       return $ do
                                          e <- $2; return (e,h) }
@@ -999,36 +1001,36 @@ machOps = listToUFM $
 callishMachOps :: UniqFM ([CmmExpr] -> (CallishMachOp, [CmmExpr]))
 callishMachOps = listToUFM $
         map (\(x, y) -> (mkFastString x, y)) [
-        ( "write_barrier", (,) MO_WriteBarrier ),
+        ( "write_barrier", (MO_WriteBarrier,)),
         ( "memcpy", memcpyLikeTweakArgs MO_Memcpy ),
         ( "memset", memcpyLikeTweakArgs MO_Memset ),
         ( "memmove", memcpyLikeTweakArgs MO_Memmove ),
         ( "memcmp", memcpyLikeTweakArgs MO_Memcmp ),
 
-        ("prefetch0", (,) $ MO_Prefetch_Data 0),
-        ("prefetch1", (,) $ MO_Prefetch_Data 1),
-        ("prefetch2", (,) $ MO_Prefetch_Data 2),
-        ("prefetch3", (,) $ MO_Prefetch_Data 3),
-
-        ( "popcnt8",  (,) $ MO_PopCnt W8  ),
-        ( "popcnt16", (,) $ MO_PopCnt W16 ),
-        ( "popcnt32", (,) $ MO_PopCnt W32 ),
-        ( "popcnt64", (,) $ MO_PopCnt W64 ),
-
-        ( "pdep8",  (,) $ MO_Pdep W8  ),
-        ( "pdep16", (,) $ MO_Pdep W16 ),
-        ( "pdep32", (,) $ MO_Pdep W32 ),
-        ( "pdep64", (,) $ MO_Pdep W64 ),
-
-        ( "pext8",  (,) $ MO_Pext W8  ),
-        ( "pext16", (,) $ MO_Pext W16 ),
-        ( "pext32", (,) $ MO_Pext W32 ),
-        ( "pext64", (,) $ MO_Pext W64 ),
-
-        ( "cmpxchg8",  (,) $ MO_Cmpxchg W8  ),
-        ( "cmpxchg16", (,) $ MO_Cmpxchg W16 ),
-        ( "cmpxchg32", (,) $ MO_Cmpxchg W32 ),
-        ( "cmpxchg64", (,) $ MO_Cmpxchg W64 )
+        ("prefetch0", (MO_Prefetch_Data 0,)),
+        ("prefetch1", (MO_Prefetch_Data 1,)),
+        ("prefetch2", (MO_Prefetch_Data 2,)),
+        ("prefetch3", (MO_Prefetch_Data 3,)),
+
+        ( "popcnt8",  (MO_PopCnt W8,)),
+        ( "popcnt16", (MO_PopCnt W16,)),
+        ( "popcnt32", (MO_PopCnt W32,)),
+        ( "popcnt64", (MO_PopCnt W64,)),
+
+        ( "pdep8",  (MO_Pdep W8,)),
+        ( "pdep16", (MO_Pdep W16,)),
+        ( "pdep32", (MO_Pdep W32,)),
+        ( "pdep64", (MO_Pdep W64,)),
+
+        ( "pext8",  (MO_Pext W8,)),
+        ( "pext16", (MO_Pext W16,)),
+        ( "pext32", (MO_Pext W32,)),
+        ( "pext64", (MO_Pext W64,)),
+
+        ( "cmpxchg8",  (MO_Cmpxchg W8,)),
+        ( "cmpxchg16", (MO_Cmpxchg W16,)),
+        ( "cmpxchg32", (MO_Cmpxchg W32,)),
+        ( "cmpxchg64", (MO_Cmpxchg W64,))
 
         -- ToDo: the rest, maybe
         -- edit: which rest?


=====================================
ghc.mk
=====================================
@@ -1306,6 +1306,7 @@ CLEAN_FILES += includes/DerivedConstants.h
 CLEAN_FILES += includes/ghcautoconf.h
 CLEAN_FILES += includes/ghcplatform.h
 CLEAN_FILES += includes/ghcversion.h
+CLEAN_FILES += $(includes_SETTINGS)
 CLEAN_FILES += utils/ghc-pkg/Version.hs
 CLEAN_FILES += compiler/prelude/primops.txt
 CLEAN_FILES += $(wildcard compiler/primop*incl)


=====================================
testsuite/tests/simplCore/should_compile/Makefile
=====================================
@@ -111,8 +111,7 @@ T4903:
 T4918:
 	$(RM) -f T4918.hi T4918.o T4918a.hi T4918a.o
 	'$(TEST_HC)' $(TEST_HC_OPTS) -c -O T4918a.hs
-	'$(TEST_HC)' $(TEST_HC_OPTS) -c -O T4918.hs
-	'$(TEST_HC)' $(TEST_HC_OPTS) -dsuppress-ticks --show-iface T4918.hi | grep 'C#'
+	'$(TEST_HC)' $(TEST_HC_OPTS) -c -O T4918.hs -ddump-simpl -dsuppress-all 2>&1 | grep 'C#'
 
 EvalTest:
 	'$(TEST_HC)' $(TEST_HC_OPTS) -c -O EvalTest.hs -ddump-simpl -dsuppress-uniques | grep 'rght.*Dmd' | sed 's/^ *//'


=====================================
testsuite/tests/simplCore/should_compile/T4918.stdout
=====================================
@@ -1,2 +1,3 @@
-  {- HasNoCafRefs, Strictness: m, Unfolding: (GHC.Types.C# 'p'#) -}
-  {- HasNoCafRefs, Strictness: m, Unfolding: (GHC.Types.C# 'q'#) -}
+f4 = C# 'p'#
+f5 = C# 'q'#
+



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/compare/7ed710ed8d7cb0841bba52304a53f462cb67b816...24afbfe9aacbb3f6a5cec8875ab100f0dfbe1bf8

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/compare/7ed710ed8d7cb0841bba52304a53f462cb67b816...24afbfe9aacbb3f6a5cec8875ab100f0dfbe1bf8
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/20190617/951af7be/attachment-0001.html>


More information about the ghc-commits mailing list