[commit: ghc] master: Test #9233 in perf/compiler/T9233 (b5f1c85)

git at git.haskell.org git at git.haskell.org
Tue Aug 4 16:55:10 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/b5f1c851c34d34cadf536de6494e0ca79b806b67/ghc

>---------------------------------------------------------------

commit b5f1c851c34d34cadf536de6494e0ca79b806b67
Author: Richard Eisenberg <eir at cis.upenn.edu>
Date:   Mon Aug 3 11:11:04 2015 -0400

    Test #9233 in perf/compiler/T9233
    
    Summary:
    Ideally, we could use Phab's numbers to set the perf
    test correctly. But even if that's not possible, then I need help
    writing my `all.T`. With the version you see here, I get the following
    
    ```
    Traceback (most recent call last):
      File "/Users/rae/Documents/ghc-valid/testsuite/driver/testlib.py", line 801, in do_test
        result = func(*[name,way] + args)
    TypeError: multimod_compile() takes exactly 4 arguments (6 given)
    ```
    
    I don't know how to fix this.
    
    Test Plan: validate
    
    Reviewers: austin, bgamari, thomie
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D1129
    
    GHC Trac Issues: #9233


>---------------------------------------------------------------

b5f1c851c34d34cadf536de6494e0ca79b806b67
 testsuite/tests/perf/compiler/T9233.hs  |  12 +++
 testsuite/tests/perf/compiler/T9233a.hs | 128 ++++++++++++++++++++++++++++++++
 testsuite/tests/perf/compiler/all.T     |  12 +++
 3 files changed, 152 insertions(+)

diff --git a/testsuite/tests/perf/compiler/T9233.hs b/testsuite/tests/perf/compiler/T9233.hs
new file mode 100644
index 0000000..1636be6
--- /dev/null
+++ b/testsuite/tests/perf/compiler/T9233.hs
@@ -0,0 +1,12 @@
+module T9233 where
+
+import T9233a
+import Data.Functor.Identity
+
+upds :: (Monad m) => [String -> Options -> m Options]
+upds = [
+  \a o -> return o { flags = (flags o) { f1 = splitComma a ++ " " ++ f1 (flags o) } }
+  ]
+
+setAll :: Options -> Options
+setAll _ = (getOpt upds :: Identity ()) `seq` undefined
diff --git a/testsuite/tests/perf/compiler/T9233a.hs b/testsuite/tests/perf/compiler/T9233a.hs
new file mode 100644
index 0000000..8f7283a
--- /dev/null
+++ b/testsuite/tests/perf/compiler/T9233a.hs
@@ -0,0 +1,128 @@
+module T9233a where
+
+
+data X = X {
+  f1 :: String,
+  f2 :: !Bool,
+  f3 :: !Bool,
+  f4 :: !Bool,
+  f5 :: !Bool,
+  f6 :: !Bool,
+  f7 :: !Bool,
+  f8 :: !Bool,
+  f9 :: !Bool,
+  f10 :: !Bool,
+  f11 :: !Bool,
+  f12 :: !Bool,
+  f13 :: !Bool,
+  f14 :: !Bool,
+  f15 :: !Bool,
+  f16 :: !Bool,
+  f17 :: !Bool,
+  f18 :: !Bool,
+  f19 :: !Bool,
+  f20 :: !Bool,
+  f21 :: !Bool,
+  f22 :: !Bool,
+  f23 :: !Bool,
+  f24 :: !Bool,
+  f25 :: !Bool,
+  f26 :: !Bool,
+  f27 :: !Bool,
+  f28 :: !Bool,
+  f29 :: !Bool,
+  f30 :: !Bool,
+  f31 :: !Bool,
+  f32 :: !Bool,
+  f33 :: !Bool,
+  f34 :: !Bool,
+  f35 :: !Bool,
+  f36 :: !Bool,
+  f37 :: !Bool,
+  f38 :: !Bool,
+  f39 :: !Bool,
+  f40 :: !Bool,
+  f41 :: !Bool,
+  f42 :: !Bool,
+  f43 :: !Bool,
+  f44 :: !Bool,
+  f45 :: !Bool,
+  f46 :: !Bool,
+  f47 :: !Bool,
+  f48 :: !Bool,
+  f49 :: !Bool,
+  f50 :: !Bool,
+  f51 :: !Bool,
+  f52 :: !Bool,
+  f53 :: !Bool,
+  f54 :: !Bool,
+  f55 :: !Bool,
+  f56 :: !Bool,
+  f57 :: !Bool,
+  f58 :: !Bool,
+  f59 :: !Bool,
+  f60 :: !Bool,
+  f61 :: !Bool,
+  f62 :: !Bool,
+  f63 :: !Bool,
+  f64 :: !Bool,
+  f65 :: !Bool,
+  f66 :: !Bool,
+  f67 :: !Bool,
+  f68 :: !Bool,
+  f69 :: !Bool,
+  f70 :: !Bool,
+  f71 :: !Bool,
+  f72 :: !Bool,
+  f73 :: !Bool,
+  f74 :: !Bool,
+  f75 :: !Bool,
+  f76 :: !Bool,
+  f77 :: !Bool,
+  f78 :: !Bool,
+  f79 :: !Bool,
+  f80 :: !Bool,
+  f81 :: !Bool,
+  f82 :: !Bool,
+  f83 :: !Bool,
+  f84 :: !Bool,
+  f85 :: !Bool,
+  f86 :: !Bool,
+  f87 :: !Bool,
+  f88 :: !Bool,
+  f89 :: !Bool,
+  f90 :: !Bool,
+  f91 :: !Bool,
+  f92 :: !Bool,
+  f93 :: !Bool,
+  f94 :: !Bool,
+  f95 :: !Bool,
+  f96 :: !Bool,
+  f97 :: !Bool,
+  f98 :: !Bool,
+  f99 :: !Bool,
+  f100 :: !Bool
+  }
+
+data Options = Options {
+  flags :: !X,
+  o2 :: !Bool,
+  o3 :: !Bool,
+  o4 :: !Bool,
+  o5 :: !Bool,
+  o6 :: !Bool,
+  o7 :: !Bool,
+  o8 :: !Bool,
+  o9 :: !Bool,
+  o10 :: !Bool,
+  o11 :: !Bool,
+  o12 :: !Bool
+  }
+
+splitComma :: String -> String
+splitComma _ = "a"
+{-# NOINLINE splitComma #-}
+
+getOpt :: Monad m => [String -> Options -> m Options] -> m ()
+getOpt _ = return ()
+{-# NOINLINE getOpt #-}
diff --git a/testsuite/tests/perf/compiler/all.T b/testsuite/tests/perf/compiler/all.T
index 4cb811d..66b13bd 100644
--- a/testsuite/tests/perf/compiler/all.T
+++ b/testsuite/tests/perf/compiler/all.T
@@ -679,3 +679,15 @@ test('T9961',
       ],
      compile,
      ['-O'])
+
+test('T9233',
+    [ only_ways(['normal']),
+      compiler_stats_num_field('bytes allocated',
+        [(wordsize(64), 999826288, 5),
+	         # 999826288   4 Aug 2015   initial value
+	 (wordsize(32), 1, 5)   # Put in your value here if you hit this
+	]),
+      extra_clean(['T9233a.hi', 'T9233a.o'])
+    ],
+    multimod_compile,
+    ['T9233', '-v0 -O2 -fno-spec-constr'])



More information about the ghc-commits mailing list