Only pass mod_location with HscRecomp instead of the entire ModSummary
[ghc.git] / testsuite / tests / perf / should_run / all.T
1 # T12791 and T5835 test that GHC uses top-level instances in places where using
2 # a locally given solution would produce worse code.
3 # See Note [Solving from instances when interacting Dicts]
4
5 test('T5835',
6      [collect_runtime_residency(10),
7       only_ways(['normal'])
8       ],
9      compile_and_run,
10      ['-O'])
11
12 test('T12791',
13      [collect_runtime_residency(10),
14       only_ways(['normal'])
15        ],
16      compile_and_run,
17      ['-O'])
18
19 # Tests that newArray/newArray_ is being optimised correctly
20
21 test('T10359',
22      [collect_stats('bytes allocated',5),
23       only_ways(['normal'])
24       ],
25      compile_and_run,
26      ['-O'])
27
28 test('T14955',
29      [collect_stats('bytes allocated',5),
30       only_ways(['normal'])
31       ],
32      multimod_compile_and_run,
33      ['T14955', '-O'])
34
35 # fortunately the values here are mostly independent of the wordsize,
36 # because the test allocates an unboxed array of doubles.
37 test('T3586',
38      [collect_runtime_residency(2),
39       collect_stats('bytes allocated', 5),
40       only_ways(['normal']),
41       ],
42      compile_and_run,
43      ['-O'])
44
45 test('T4830',
46      [collect_stats('bytes allocated',4),
47       only_ways(['normal'])
48       ],
49      compile_and_run,
50      ['-O2'])
51
52 test('T3245', [when(doing_ghci(), extra_hc_opts('-fobject-code'))],
53      compile_and_run, ['-O'])
54
55 # Test that bytestring reading/writing isn't over-allocating.  We had
56 # a bug in hGetBufNonBlocking in 6.13 that triggered this.
57 #
58 test('lazy-bs-alloc',
59      [extra_files(['../../numeric/should_run/arith011.stdout']),
60       collect_stats('bytes allocated',5),
61       collect_runtime_residency(1),
62       only_ways(['normal']),
63       extra_run_opts('arith011.stdout'),
64       ignore_stdout,
65       ],
66      # use a suitably big file, without bloating the repo with a new one:
67      compile_and_run,
68      ['-O'])
69
70 test('T876',
71      [collect_stats('bytes allocated',5),
72       only_ways(['normal']),
73       extra_run_opts('10000')
74       ],
75      compile_and_run,
76      ['-O'])
77
78 # Get reproducible floating-point results on x86
79 if config.arch == 'i386':
80    sse2_opts = '-msse2'
81 else:
82    sse2_opts = ''
83
84 test('T4321',
85      omit_ways(['ghci']),
86      compile_and_run, ['-O ' + sse2_opts])
87
88 test('T3736', [], makefile_test, ['T3736'])
89 test('T3738',
90      [extra_clean(['T3738a.hi', 'T3738a.o']),
91       collect_stats('peak_megabytes_allocated', 0),
92       collect_stats('bytes allocated',8),
93       only_ways(['normal'])
94       ],
95      compile_and_run,
96      ['-O'])
97
98 test('MethSharing',
99      [collect_stats('peak_megabytes_allocated',  0),
100       collect_stats('bytes allocated',5),
101       only_ways(['normal'])
102       ],
103      compile_and_run,
104      ['-O'])
105 test('T2902', [], makefile_test, ['T2902'])
106 test('T149',
107      [ # expect_broken(149),
108        # working (2 Jul 2013, x86-64/Linux)
109       extra_clean(['T149_A',    'T149_B',
110                    'T149_A.hi', 'T149_B.hi',
111                    'T149_A.o',  'T149_B.o'])],
112      makefile_test, ['T149'])
113
114 test('T5113',
115      [collect_stats('bytes allocated',5),
116       only_ways(['normal'])
117       ],
118      compile_and_run,
119      ['-O'])
120
121
122 test('T4978',
123      [collect_stats('bytes allocated',5),
124       only_ways(['normal'])
125       ],
126      compile_and_run,
127      ['-O2'])
128
129 test('T5205',
130      [collect_stats('bytes allocated',5),
131       only_ways(['normal', 'optasm'])
132       ],
133      compile_and_run,
134      [''])
135
136 test('T5549',
137      [collect_stats('bytes allocated',5),
138       only_ways(['normal'])
139       ],
140      compile_and_run,
141      ['-O'])
142
143 test('T4474a',
144      [collect_stats('bytes allocated',5),
145       only_ways(['normal'])
146       ],
147      compile_and_run,
148      ['-O'])
149 test('T4474b',
150      [collect_stats('bytes allocated',5),
151       only_ways(['normal'])
152       ],
153      compile_and_run,
154      ['-O'])
155 test('T4474c',
156      [collect_stats('bytes allocated',5),
157       only_ways(['normal'])
158       ],
159      compile_and_run,
160      ['-O'])
161
162 test('T5237',
163      [collect_stats('bytes allocated',5),
164      only_ways(['normal'])
165      ],
166     compile_and_run,
167     ['-O ' + sse2_opts])
168
169 test('T5536',
170      [collect_stats('bytes allocated',1),
171      extra_clean(['T5536.data']),
172      ignore_stdout,
173      only_ways(['normal'])
174      ],
175     compile_and_run,
176     ['-O'])
177
178 test('T7257',
179      [collect_stats('bytes allocated',10),
180       collect_stats('peak_megabytes_allocated',5),
181       only_ways(['normal'])
182      ],
183     compile_and_run, ['-O'])
184
185 test('Conversions',
186      [collect_stats('bytes allocated',3),
187       only_ways(['normal'])
188      ],
189     compile_and_run, ['-O -msse2'])
190
191 test('T7507', omit_ways(['ghci']), compile_and_run, ['-O'])
192 # For 7507, stack overflow is the bad case
193
194 test('T7436',
195      [collect_stats('max_bytes_used',4),
196       only_ways(['normal'])
197       ],
198      compile_and_run,
199      ['-O'])
200
201 test('T7797',
202       [collect_stats('bytes allocated',5),
203       extra_clean(['T7797a.hi', 'T7797a.o']),
204       only_ways(['normal'])
205       ],
206      compile_and_run,
207      ['-O'])
208
209 test('T7954',
210       [collect_stats('bytes allocated',10),
211       only_ways(['normal'])
212       ],
213      compile_and_run,
214      ['-O'])
215
216 test('T7850',
217      [collect_stats('peak_megabytes_allocated',10),
218       only_ways(['normal'])],
219      compile_and_run,
220      ['-O'])
221
222 test('T5949',
223      [collect_stats('bytes allocated',10),
224       only_ways(['normal'])],
225      compile_and_run,
226      ['-O'])
227
228 test('T4267',
229      [collect_stats('bytes allocated',10),
230       only_ways(['normal'])],
231       compile_and_run,
232       ['-O'])
233
234 test('T7619',
235      [collect_stats('bytes allocated',10),
236       only_ways(['normal'])],
237      compile_and_run,
238      ['-O'])
239
240 test('InlineArrayAlloc',
241      [collect_stats('bytes allocated',5),
242       only_ways(['normal'])],
243      compile_and_run,
244      ['-O2'])
245
246 test('InlineByteArrayAlloc',
247      [collect_stats('bytes allocated',5),
248       only_ways(['normal'])],
249      compile_and_run,
250      ['-O2'])
251
252 test('InlineCloneArrayAlloc',
253      [collect_stats('bytes allocated',5),
254       only_ways(['normal'])],
255      compile_and_run,
256      ['-O2'])
257
258 test('T9203',
259      [collect_stats('bytes allocated',5),
260       only_ways(['normal'])],
261      compile_and_run,
262      ['-O2'])
263
264 test('T9339',
265      [collect_stats('bytes allocated',5),
266       only_ways(['normal'])],
267      compile_and_run,
268      ['-O2 -fspec-constr-keen'])
269      # For the -fspec-constr-keen see Note [Making SpecConstr keener] in SpecConstr
270
271
272 test('T8472',
273      [collect_stats('bytes allocated',80),
274       only_ways(['normal'])],
275      compile_and_run,
276      ['-O2'])
277
278 test('T12996',
279      [collect_stats('bytes allocated',5),
280       only_ways(['normal'])],
281      compile_and_run,
282      ['-O2'])
283
284 test('T13001',
285      [collect_stats('bytes allocated',20),
286       only_ways(['normal'])],
287      compile_and_run,
288      ['-O2'])
289
290 test('T8763',
291      [collect_stats('bytes allocated', 20),
292       only_ways(['normal'])],
293      compile_and_run,
294      ['-O2'])
295
296 test('T12990',
297     [collect_stats('bytes allocated',5),
298      only_ways(['normal'])],
299     compile_and_run,
300     ['-O2'])
301
302 test('T13218',
303     [collect_stats('bytes allocated',5),
304      collect_stats('max_bytes_used',10),
305      only_ways(['normal'])],
306     compile_and_run,
307     ['-O'])
308
309 test('DeriveNull',
310     [collect_stats('bytes allocated',5),
311      only_ways(['normal'])],
312     compile_and_run,
313     ['-O'])
314
315 test('DeriveNullTermination', normal, compile_and_run, [''])
316
317 test('T13623',
318     [collect_stats('bytes allocated',10),
319      only_ways(['normal'])],
320     compile_and_run,
321     ['-O2'])
322
323 test('T14052',
324      [collect_compiler_stats('bytes allocated',15)],
325      ghci_script,
326      ['T14052.script'])
327
328 test('T14936',
329      [collect_stats('bytes allocated',10)],
330      compile_and_run,
331      ['-O2'])
332
333 test('T15226',
334     [collect_stats('bytes allocated',5),
335      only_ways(['normal'])],
336     compile_and_run,
337     ['-O'])
338
339 test('T15226a',
340     [collect_stats('bytes allocated',5),
341      only_ways(['normal'])],
342     compile_and_run,
343     ['-O'])
344
345 test('T15263',
346     [collect_stats('bytes allocated', 4),
347      only_ways(['normal'])],
348     compile_and_run,
349     ['-O'])
350
351 test('T15426',
352     [collect_stats('bytes allocated', 20),
353     only_ways(['normal'])],
354     compile_and_run,
355     ['-O2'])
356
357 test('T15578',
358     [collect_stats('bytes allocated', 5),
359      only_ways(['normal'])],
360     compile_and_run,
361     ['-O2'])
362
363 # Test performance of creating Uniques.
364 test('UniqLoop',
365      [collect_stats('bytes allocated',5),
366       only_ways(['normal'])
367       ],
368      compile_and_run,
369      ['-O -package ghc'])