Ticket #8974: T8947_LLVMCG_cmm

File T8947_LLVMCG_cmm, 32.9 KB (added by awson, 5 years ago)
Line 
1
2==================== Cmm produced by new codegen ====================
3[section "data" { __stginit_main:T8947:
4 }]
5
6
7
8==================== Post CPS Cmm ====================
9[section "data" { __stginit_main:T8947:
10 }]
11
12
13
14==================== Output Cmm ====================
15[section "data" { __stginit_main:T8947:
16 }]
17
18
19
20==================== Cmm produced by new codegen ====================
21[section "data" {
22     T8947.t2_closure:
23         const T8947.t2_info;
24         const 0;
25         const 0;
26         const 0;
27 },
28 section "readonly" {
29     c1el_str:
30         I8[] [68,111,110,101]
31 },
32 T8947.t2_entry() //  [R1]
33         { info_tbl: [(c1em,
34                       label: T8947.t2_info
35                       rep:HeapRep static { Thunk })]
36           stack_info: arg_space: 8 updfr_space: Just 8
37         }
38     {offset
39       c1em:
40           _r1c5::P64 = R1;
41           goto c1eg;
42       c1eg:
43           if ((old + 0) - <highSp> < SpLim) goto c1en; else goto c1eo;
44       c1en:
45           R1 = _r1c5::P64;
46           call (stg_gc_enter_1)(R1) args: 8, res: 0, upd: 8;
47       c1eo:
48           (_c1ei::I64) = call "ccall" arg hints:  [PtrHint,
49                                                    PtrHint]  result hints:  [PtrHint] newCAF(BaseReg, _r1c5::P64);
50           if (_c1ei::I64 == 0) goto c1ek; else goto c1ej;
51       c1ek:
52           call (I64[_r1c5::P64])() args: 8, res: 0, upd: 8;
53       c1ej:
54           I64[(old + 24)] = stg_bh_upd_frame_info;
55           I64[(old + 16)] = _c1ei::I64;
56           R2 = c1el_str;
57           call GHC.CString.unpackCString#_info(R2) args: 24, res: 0, upd: 24;
58     }
59 }]
60
61
62
63==================== Post control-flow optimisations ====================
64{offset
65  c1em:
66      _r1c5::P64 = R1;
67      if ((old + 0) - <highSp> < SpLim) goto c1en; else goto c1eo;
68  c1en:
69      R1 = _r1c5::P64;
70      call (stg_gc_enter_1)(R1) args: 8, res: 0, upd: 8;
71  c1eo:
72      (_c1ei::I64) = call "ccall" arg hints:  [PtrHint,
73                                               PtrHint]  result hints:  [PtrHint] newCAF(BaseReg, _r1c5::P64);
74      if (_c1ei::I64 == 0) goto c1ek; else goto c1ej;
75  c1ek:
76      call (I64[_r1c5::P64])() args: 8, res: 0, upd: 8;
77  c1ej:
78      I64[(old + 24)] = stg_bh_upd_frame_info;
79      I64[(old + 16)] = _c1ei::I64;
80      R2 = c1el_str;
81      call GHC.CString.unpackCString#_info(R2) args: 24, res: 0, upd: 24;
82}
83
84
85
86==================== Post common block elimination ====================
87{offset
88  c1em:
89      _r1c5::P64 = R1;
90      if ((old + 0) - <highSp> < SpLim) goto c1en; else goto c1eo;
91  c1en:
92      R1 = _r1c5::P64;
93      call (stg_gc_enter_1)(R1) args: 8, res: 0, upd: 8;
94  c1eo:
95      (_c1ei::I64) = call "ccall" arg hints:  [PtrHint,
96                                               PtrHint]  result hints:  [PtrHint] newCAF(BaseReg, _r1c5::P64);
97      if (_c1ei::I64 == 0) goto c1ek; else goto c1ej;
98  c1ek:
99      call (I64[_r1c5::P64])() args: 8, res: 0, upd: 8;
100  c1ej:
101      I64[(old + 24)] = stg_bh_upd_frame_info;
102      I64[(old + 16)] = _c1ei::I64;
103      R2 = c1el_str;
104      call GHC.CString.unpackCString#_info(R2) args: 24, res: 0, upd: 24;
105}
106
107
108
109==================== Proc points ====================
110T8947.t2_entry
111[c1em]
112{offset
113  c1em:
114      _r1c5::P64 = R1;
115      if ((old + 0) - <highSp> < SpLim) goto c1en; else goto c1eo;
116  c1en:
117      R1 = _r1c5::P64;
118      call (stg_gc_enter_1)(R1) args: 8, res: 0, upd: 8;
119  c1eo:
120      (_c1ei::I64) = call "ccall" arg hints:  [PtrHint,
121                                               PtrHint]  result hints:  [PtrHint] newCAF(BaseReg, _r1c5::P64);
122      if (_c1ei::I64 == 0) goto c1ek; else goto c1ej;
123  c1ek:
124      call (I64[_r1c5::P64])() args: 8, res: 0, upd: 8;
125  c1ej:
126      I64[(old + 24)] = stg_bh_upd_frame_info;
127      I64[(old + 16)] = _c1ei::I64;
128      R2 = c1el_str;
129      call GHC.CString.unpackCString#_info(R2) args: 24, res: 0, upd: 24;
130}
131
132
133
134==================== Layout Stack ====================
135{offset
136  c1em:
137      _r1c5::P64 = R1;
138      if ((Sp + 8) - 24 < SpLim) goto c1en; else goto c1eo;
139  c1en:
140      R1 = _r1c5::P64;
141      call (stg_gc_enter_1)(R1) args: 8, res: 0, upd: 8;
142  c1eo:
143      (_c1ei::I64) = call "ccall" arg hints:  [PtrHint,
144                                               PtrHint]  result hints:  [PtrHint] newCAF(BaseReg, _r1c5::P64);
145      if (_c1ei::I64 == 0) goto c1ek; else goto c1ej;
146  c1ek:
147      call (I64[_r1c5::P64])() args: 8, res: 0, upd: 8;
148  c1ej:
149      I64[Sp - 16] = stg_bh_upd_frame_info;
150      I64[Sp - 8] = _c1ei::I64;
151      R2 = c1el_str;
152      Sp = Sp - 16;
153      call GHC.CString.unpackCString#_info(R2) args: 24, res: 0, upd: 24;
154}
155
156
157
158==================== Sink assignments ====================
159{offset
160  c1em:
161      if ((Sp + -16) < SpLim) goto c1en; else goto c1eo;
162  c1en:
163      R1 = R1;
164      call (stg_gc_enter_1)(R1) args: 8, res: 0, upd: 8;
165  c1eo:
166      (_c1ei::I64) = call "ccall" arg hints:  [PtrHint,
167                                               PtrHint]  result hints:  [PtrHint] newCAF(BaseReg, R1);
168      if (_c1ei::I64 == 0) goto c1ek; else goto c1ej;
169  c1ek:
170      call (I64[R1])() args: 8, res: 0, upd: 8;
171  c1ej:
172      I64[Sp - 16] = stg_bh_upd_frame_info;
173      I64[Sp - 8] = _c1ei::I64;
174      R2 = c1el_str;
175      Sp = Sp - 16;
176      call GHC.CString.unpackCString#_info(R2) args: 24, res: 0, upd: 24;
177}
178
179
180
181==================== CAFEnv ====================
182[(c1ej, {}), (c1ek, {}), (c1em, {}), (c1en, {}), (c1eo, {})]
183
184
185
186==================== procpoint map ====================
187[(c1ej, reached by c1em), (c1ek, reached by c1em),
188 (c1em, <procpt>), (c1en, reached by c1em), (c1eo, reached by c1em)]
189
190
191
192==================== Post splitting ====================
193T8947.t2_entry() //  [R1]
194        { info_tbl: [(c1em,
195                      label: T8947.t2_info
196                      rep:HeapRep static { Thunk })]
197          stack_info: arg_space: 0 updfr_space: Nothing
198        }
199    {offset
200      c1em:
201          if ((Sp + -16) < SpLim) goto c1en; else goto c1eo;
202      c1en:
203          R1 = R1;
204          call (stg_gc_enter_1)(R1) args: 8, res: 0, upd: 8;
205      c1eo:
206          (_c1ei::I64) = call "ccall" arg hints:  [PtrHint,
207                                                   PtrHint]  result hints:  [PtrHint] newCAF(BaseReg, R1);
208          if (_c1ei::I64 == 0) goto c1ek; else goto c1ej;
209      c1ek:
210          call (I64[R1])() args: 8, res: 0, upd: 8;
211      c1ej:
212          I64[Sp - 16] = stg_bh_upd_frame_info;
213          I64[Sp - 8] = _c1ei::I64;
214          R2 = c1el_str;
215          Sp = Sp - 16;
216          call GHC.CString.unpackCString#_info(R2) args: 24, res: 0, upd: 24;
217    }
218}
219
220
221
222==================== after setInfoTableStackMap ====================
223T8947.t2_entry() //  [R1]
224        { info_tbl: [(c1em,
225                      label: T8947.t2_info
226                      rep:HeapRep static { Thunk })]
227          stack_info: arg_space: 0 updfr_space: Nothing
228        }
229    {offset
230      c1em:
231          if ((Sp + -16) < SpLim) goto c1en; else goto c1eo;
232      c1en:
233          R1 = R1;
234          call (stg_gc_enter_1)(R1) args: 8, res: 0, upd: 8;
235      c1eo:
236          (_c1ei::I64) = call "ccall" arg hints:  [PtrHint,
237                                                   PtrHint]  result hints:  [PtrHint] newCAF(BaseReg, R1);
238          if (_c1ei::I64 == 0) goto c1ek; else goto c1ej;
239      c1ek:
240          call (I64[R1])() args: 8, res: 0, upd: 8;
241      c1ej:
242          I64[Sp - 16] = stg_bh_upd_frame_info;
243          I64[Sp - 8] = _c1ei::I64;
244          R2 = c1el_str;
245          Sp = Sp - 16;
246          call GHC.CString.unpackCString#_info(R2) args: 24, res: 0, upd: 24;
247    }
248}
249
250
251
252==================== Post control-flow optimisations ====================
253T8947.t2_entry() //  [R1]
254        { info_tbl: [(c1em,
255                      label: T8947.t2_info
256                      rep:HeapRep static { Thunk })]
257          stack_info: arg_space: 0 updfr_space: Nothing
258        }
259    {offset
260      c1em:
261          if ((Sp + -16) < SpLim) goto c1en; else goto c1eo;
262      c1en:
263          R1 = R1;
264          call (stg_gc_enter_1)(R1) args: 8, res: 0, upd: 8;
265      c1eo:
266          (_c1ei::I64) = call "ccall" arg hints:  [PtrHint,
267                                                   PtrHint]  result hints:  [PtrHint] newCAF(BaseReg, R1);
268          if (_c1ei::I64 == 0) goto c1ek; else goto c1ej;
269      c1ek:
270          call (I64[R1])() args: 8, res: 0, upd: 8;
271      c1ej:
272          I64[Sp - 16] = stg_bh_upd_frame_info;
273          I64[Sp - 8] = _c1ei::I64;
274          R2 = c1el_str;
275          Sp = Sp - 16;
276          call GHC.CString.unpackCString#_info(R2) args: 24, res: 0, upd: 24;
277    }
278}
279
280
281
282==================== Post CPS Cmm ====================
283[section "data" {
284     T8947.t2_closure:
285         const T8947.t2_info;
286         const 0;
287         const 0;
288         const 0;
289 },
290 section "readonly" {
291     c1el_str:
292         I8[] [68,111,110,101]
293 },
294 T8947.t2_entry() //  [R1]
295         { info_tbl: [(c1em,
296                       label: T8947.t2_info
297                       rep:HeapRep static { Thunk })]
298           stack_info: arg_space: 0 updfr_space: Nothing
299         }
300     {offset
301       c1em:
302           if ((Sp + -16) < SpLim) goto c1en; else goto c1eo;
303       c1en:
304           R1 = R1;
305           call (stg_gc_enter_1)(R1) args: 8, res: 0, upd: 8;
306       c1eo:
307           (_c1ei::I64) = call "ccall" arg hints:  [PtrHint,
308                                                    PtrHint]  result hints:  [PtrHint] newCAF(BaseReg, R1);
309           if (_c1ei::I64 == 0) goto c1ek; else goto c1ej;
310       c1ek:
311           call (I64[R1])() args: 8, res: 0, upd: 8;
312       c1ej:
313           I64[Sp - 16] = stg_bh_upd_frame_info;
314           I64[Sp - 8] = _c1ei::I64;
315           R2 = c1el_str;
316           Sp = Sp - 16;
317           call GHC.CString.unpackCString#_info(R2) args: 24, res: 0, upd: 24;
318     }
319 }]
320
321
322
323==================== Output Cmm ====================
324[section "data" {
325     T8947.t2_closure:
326         const T8947.t2_info;
327         const 0;
328         const 0;
329         const 0;
330 },
331 section "readonly" {
332     c1el_str:
333         I8[] [68,111,110,101]
334 },
335 T8947.t2_entry() //  [R1]
336         { info_tbl: [(c1em,
337                       label: T8947.t2_info
338                       rep:HeapRep static { Thunk })]
339           stack_info: arg_space: 0 updfr_space: Nothing
340         }
341     {offset
342       c1em:
343           if ((Sp + -16) < SpLim) goto c1en; else goto c1eo;
344       c1en:
345           R1 = R1;
346           call (stg_gc_enter_1)(R1) args: 8, res: 0, upd: 8;
347       c1eo:
348           (_c1ei::I64) = call "ccall" arg hints:  [PtrHint,
349                                                    PtrHint]  result hints:  [PtrHint] newCAF(BaseReg, R1);
350           if (_c1ei::I64 == 0) goto c1ek; else goto c1ej;
351       c1ek:
352           call (I64[R1])() args: 8, res: 0, upd: 8;
353       c1ej:
354           I64[Sp - 16] = stg_bh_upd_frame_info;
355           I64[Sp - 8] = _c1ei::I64;
356           R2 = c1el_str;
357           Sp = Sp - 16;
358           call GHC.CString.unpackCString#_info(R2) args: 24, res: 0, upd: 24;
359     }
360 }]
361
362
363
364==================== Cmm produced by new codegen ====================
365[section "data" {
366     T8947.t1_closure:
367         const T8947.t1_info;
368         const 0;
369 },
370 T8947.t1_entry() //  []
371         { info_tbl: [(c1fd,
372                       label: T8947.t1_info
373                       rep:HeapRep static { Fun {arity: 1 fun_type: ArgSpec 3} })]
374           stack_info: arg_space: 8 updfr_space: Just 8
375         }
376     {offset
377       c1fd:
378           goto c1f8;
379       c1f8:
380           if ((old + 0) - <highSp> < SpLim) goto c1ff; else goto c1fg;
381       c1ff:
382           R1 = T8947.t1_closure;
383           call (stg_gc_fun)(R1) args: 8, res: 0, upd: 8;
384       c1fg:
385           goto c1f7;
386       c1f7:
387           _c1fa::I64 = performMajorGC;
388           I64[(young<c1fb> + 8)] = c1fb;
389           foreign call "ccall" arg hints:  []  result hints:  [] (_c1fa::I64)(...) returns to c1fb args: ([]) ress: ([])ret_args: 8ret_off: 8;
390       c1fb:
391           R4 = GHC.Types.True_closure+2;
392           R3 = T8947.t2_closure;
393           R2 = GHC.IO.Handle.FD.stdout_closure;
394           call GHC.IO.Handle.Text.hPutStr2_info(R4,
395                                                 R3,
396                                                 R2) args: 8, res: 0, upd: 8;
397     }
398 }]
399
400
401
402==================== Post control-flow optimisations ====================
403{offset
404  c1fd:
405      if ((old + 0) - <highSp> < SpLim) goto c1ff; else goto c1fg;
406  c1ff:
407      R1 = T8947.t1_closure;
408      call (stg_gc_fun)(R1) args: 8, res: 0, upd: 8;
409  c1fg:
410      _c1fa::I64 = performMajorGC;
411      I64[(young<c1fb> + 8)] = c1fb;
412      foreign call "ccall" arg hints:  []  result hints:  [] (_c1fa::I64)(...) returns to c1fb args: ([]) ress: ([])ret_args: 8ret_off: 8;
413  c1fb:
414      R4 = GHC.Types.True_closure+2;
415      R3 = T8947.t2_closure;
416      R2 = GHC.IO.Handle.FD.stdout_closure;
417      call GHC.IO.Handle.Text.hPutStr2_info(R4,
418                                            R3,
419                                            R2) args: 8, res: 0, upd: 8;
420}
421
422
423
424==================== Post common block elimination ====================
425{offset
426  c1fd:
427      if ((old + 0) - <highSp> < SpLim) goto c1ff; else goto c1fg;
428  c1ff:
429      R1 = T8947.t1_closure;
430      call (stg_gc_fun)(R1) args: 8, res: 0, upd: 8;
431  c1fg:
432      _c1fa::I64 = performMajorGC;
433      I64[(young<c1fb> + 8)] = c1fb;
434      foreign call "ccall" arg hints:  []  result hints:  [] (_c1fa::I64)(...) returns to c1fb args: ([]) ress: ([])ret_args: 8ret_off: 8;
435  c1fb:
436      R4 = GHC.Types.True_closure+2;
437      R3 = T8947.t2_closure;
438      R2 = GHC.IO.Handle.FD.stdout_closure;
439      call GHC.IO.Handle.Text.hPutStr2_info(R4,
440                                            R3,
441                                            R2) args: 8, res: 0, upd: 8;
442}
443
444
445
446==================== Proc points ====================
447T8947.t1_entry
448[c1fb, c1fd]
449{offset
450  c1fd:
451      if ((old + 0) - <highSp> < SpLim) goto c1ff; else goto c1fg;
452  c1ff:
453      R1 = T8947.t1_closure;
454      call (stg_gc_fun)(R1) args: 8, res: 0, upd: 8;
455  c1fg:
456      _c1fa::I64 = performMajorGC;
457      I64[(young<c1fb> + 8)] = c1fb;
458      foreign call "ccall" arg hints:  []  result hints:  [] (_c1fa::I64)(...) returns to c1fb args: ([]) ress: ([])ret_args: 8ret_off: 8;
459  c1fb:
460      R4 = GHC.Types.True_closure+2;
461      R3 = T8947.t2_closure;
462      R2 = GHC.IO.Handle.FD.stdout_closure;
463      call GHC.IO.Handle.Text.hPutStr2_info(R4,
464                                            R3,
465                                            R2) args: 8, res: 0, upd: 8;
466}
467
468
469
470==================== Layout Stack ====================
471{offset
472  c1fd:
473      if ((Sp + 8) - 16 < SpLim) goto c1ff; else goto c1fg;
474  c1ff:
475      R1 = T8947.t1_closure;
476      call (stg_gc_fun)(R1) args: 8, res: 0, upd: 8;
477  c1fg:
478      _c1fa::I64 = performMajorGC;
479      I64[Sp - 8] = c1fb;
480      Sp = Sp - 8;
481      I64[I64[CurrentTSO + 24] + 16] = Sp;
482      P64[CurrentNursery + 8] = Hp + 8;
483      (_u1fh::I64) = call "ccall" arg hints:  [PtrHint,]  result hints:  [PtrHint] suspendThread(BaseReg, 0);
484      call "ccall" arg hints:  []  result hints:  [] (_c1fa::I64)();
485      (_u1fi::I64) = call "ccall" arg hints:  [PtrHint]  result hints:  [PtrHint] resumeThread(_u1fh::I64);
486      BaseReg = _u1fi::I64;
487      _u1fj::P64 = CurrentTSO;
488      _u1fk::P64 = I64[_u1fj::P64 + 24];
489      Sp = I64[_u1fk::P64 + 16];
490      SpLim = _u1fk::P64 + 192;
491      HpAlloc = 0;
492      Hp = I64[CurrentNursery + 8] - 8;
493      HpLim = I64[CurrentNursery] + (%MO_SS_Conv_W32_W64(I32[CurrentNursery + 48]) * 4096 - 1);
494      call (I64[Sp])() returns to c1fb, args: 8, res: 8, upd: 8;
495  c1fb:
496      R4 = GHC.Types.True_closure+2;
497      R3 = T8947.t2_closure;
498      R2 = GHC.IO.Handle.FD.stdout_closure;
499      Sp = Sp + 8;
500      call GHC.IO.Handle.Text.hPutStr2_info(R4,
501                                            R3,
502                                            R2) args: 8, res: 0, upd: 8;
503}
504
505
506
507==================== Sink assignments ====================
508{offset
509  c1fd:
510      if ((Sp + -8) < SpLim) goto c1ff; else goto c1fg;
511  c1ff:
512      R1 = T8947.t1_closure;
513      call (stg_gc_fun)(R1) args: 8, res: 0, upd: 8;
514  c1fg:
515      I64[Sp - 8] = c1fb;
516      Sp = Sp - 8;
517      I64[I64[CurrentTSO + 24] + 16] = Sp;
518      P64[CurrentNursery + 8] = Hp + 8;
519      (_u1fh::I64) = call "ccall" arg hints:  [PtrHint,]  result hints:  [PtrHint] suspendThread(BaseReg, 0);
520      call "ccall" arg hints:  []  result hints:  [] performMajorGC();
521      (_u1fi::I64) = call "ccall" arg hints:  [PtrHint]  result hints:  [PtrHint] resumeThread(_u1fh::I64);
522      BaseReg = _u1fi::I64;
523      _u1fk::P64 = I64[CurrentTSO + 24];
524      Sp = I64[_u1fk::P64 + 16];
525      SpLim = _u1fk::P64 + 192;
526      HpAlloc = 0;
527      Hp = I64[CurrentNursery + 8] - 8;
528      HpLim = I64[CurrentNursery] + ((%MO_SS_Conv_W32_W64(I32[CurrentNursery + 48]) << 12) - 1);
529      call (I64[Sp])() returns to c1fb, args: 8, res: 8, upd: 8;
530  c1fb:
531      R4 = GHC.Types.True_closure+2;
532      R3 = T8947.t2_closure;
533      R2 = GHC.IO.Handle.FD.stdout_closure;
534      Sp = Sp + 8;
535      call GHC.IO.Handle.Text.hPutStr2_info(R4,
536                                            R3,
537                                            R2) args: 8, res: 0, upd: 8;
538}
539
540
541
542==================== CAFEnv ====================
543[(c1fb,
544  {GHC.IO.Handle.Text.hPutStr2_closure,
545   GHC.IO.Handle.FD.stdout_closure, T8947.t2_closure}),
546 (c1fd,
547  {GHC.IO.Handle.Text.hPutStr2_closure,
548   GHC.IO.Handle.FD.stdout_closure, T8947.t1_closure,
549   T8947.t2_closure}),
550 (c1ff, {T8947.t1_closure}),
551 (c1fg,
552  {GHC.IO.Handle.Text.hPutStr2_closure,
553   GHC.IO.Handle.FD.stdout_closure, T8947.t2_closure})]
554
555
556
557==================== procpoint map ====================
558[(c1fb, <procpt>), (c1fd, <procpt>), (c1ff, reached by c1fd),
559 (c1fg, reached by c1fd)]
560
561
562
563==================== Post splitting ====================
564T8947.t1_entry() //  []
565        { info_tbl: [(c1fd,
566                      label: T8947.t1_info
567                      rep:HeapRep static { Fun {arity: 1 fun_type: ArgSpec 3} })]
568          stack_info: arg_space: 0 updfr_space: Nothing
569        }
570    {offset
571      c1fd:
572          if ((Sp + -8) < SpLim) goto c1ff; else goto c1fg;
573      c1ff:
574          R1 = T8947.t1_closure;
575          call (stg_gc_fun)(R1) args: 8, res: 0, upd: 8;
576      c1fg:
577          I64[Sp - 8] = block_c1fb_info;
578          Sp = Sp - 8;
579          I64[I64[CurrentTSO + 24] + 16] = Sp;
580          P64[CurrentNursery + 8] = Hp + 8;
581          (_u1fh::I64) = call "ccall" arg hints:  [PtrHint,]  result hints:  [PtrHint] suspendThread(BaseReg, 0);
582          call "ccall" arg hints:  []  result hints:  [] performMajorGC();
583          (_u1fi::I64) = call "ccall" arg hints:  [PtrHint]  result hints:  [PtrHint] resumeThread(_u1fh::I64);
584          BaseReg = _u1fi::I64;
585          _u1fk::P64 = I64[CurrentTSO + 24];
586          Sp = I64[_u1fk::P64 + 16];
587          SpLim = _u1fk::P64 + 192;
588          HpAlloc = 0;
589          Hp = I64[CurrentNursery + 8] - 8;
590          HpLim = I64[CurrentNursery] + ((%MO_SS_Conv_W32_W64(I32[CurrentNursery + 48]) << 12) - 1);
591          call (I64[Sp])() args: 8, res: 8, upd: 8;
592    }
593}
594
595
596
597==================== Post splitting ====================
598block_c1fb_entry() //  []
599        { info_tbl: [(c1fb,
600                      label: block_c1fb_info
601                      rep:StackRep [])]
602          stack_info: arg_space: 0 updfr_space: Nothing
603        }
604    {offset
605      c1fb:
606          R4 = GHC.Types.True_closure+2;
607          R3 = T8947.t2_closure;
608          R2 = GHC.IO.Handle.FD.stdout_closure;
609          Sp = Sp + 8;
610          call GHC.IO.Handle.Text.hPutStr2_info(R4,
611                                                R3,
612                                                R2) args: 8, res: 0, upd: 8;
613    }
614}
615
616
617
618==================== after setInfoTableStackMap ====================
619T8947.t1_entry() //  []
620        { info_tbl: [(c1fd,
621                      label: T8947.t1_info
622                      rep:HeapRep static { Fun {arity: 1 fun_type: ArgSpec 3} })]
623          stack_info: arg_space: 0 updfr_space: Nothing
624        }
625    {offset
626      c1fd:
627          if ((Sp + -8) < SpLim) goto c1ff; else goto c1fg;
628      c1ff:
629          R1 = T8947.t1_closure;
630          call (stg_gc_fun)(R1) args: 8, res: 0, upd: 8;
631      c1fg:
632          I64[Sp - 8] = block_c1fb_info;
633          Sp = Sp - 8;
634          I64[I64[CurrentTSO + 24] + 16] = Sp;
635          P64[CurrentNursery + 8] = Hp + 8;
636          (_u1fh::I64) = call "ccall" arg hints:  [PtrHint,]  result hints:  [PtrHint] suspendThread(BaseReg, 0);
637          call "ccall" arg hints:  []  result hints:  [] performMajorGC();
638          (_u1fi::I64) = call "ccall" arg hints:  [PtrHint]  result hints:  [PtrHint] resumeThread(_u1fh::I64);
639          BaseReg = _u1fi::I64;
640          _u1fk::P64 = I64[CurrentTSO + 24];
641          Sp = I64[_u1fk::P64 + 16];
642          SpLim = _u1fk::P64 + 192;
643          HpAlloc = 0;
644          Hp = I64[CurrentNursery + 8] - 8;
645          HpLim = I64[CurrentNursery] + ((%MO_SS_Conv_W32_W64(I32[CurrentNursery + 48]) << 12) - 1);
646          call (I64[Sp])() args: 8, res: 8, upd: 8;
647    }
648}
649
650
651
652==================== after setInfoTableStackMap ====================
653block_c1fb_entry() //  []
654        { info_tbl: [(c1fb,
655                      label: block_c1fb_info
656                      rep:StackRep [])]
657          stack_info: arg_space: 0 updfr_space: Nothing
658        }
659    {offset
660      c1fb:
661          R4 = GHC.Types.True_closure+2;
662          R3 = T8947.t2_closure;
663          R2 = GHC.IO.Handle.FD.stdout_closure;
664          Sp = Sp + 8;
665          call GHC.IO.Handle.Text.hPutStr2_info(R4,
666                                                R3,
667                                                R2) args: 8, res: 0, upd: 8;
668    }
669}
670
671
672
673==================== Post control-flow optimisations ====================
674T8947.t1_entry() //  []
675        { info_tbl: [(c1fd,
676                      label: T8947.t1_info
677                      rep:HeapRep static { Fun {arity: 1 fun_type: ArgSpec 3} })]
678          stack_info: arg_space: 0 updfr_space: Nothing
679        }
680    {offset
681      c1fd:
682          if ((Sp + -8) < SpLim) goto c1ff; else goto c1fg;
683      c1ff:
684          R1 = T8947.t1_closure;
685          call (stg_gc_fun)(R1) args: 8, res: 0, upd: 8;
686      c1fg:
687          I64[Sp - 8] = block_c1fb_info;
688          Sp = Sp - 8;
689          I64[I64[CurrentTSO + 24] + 16] = Sp;
690          P64[CurrentNursery + 8] = Hp + 8;
691          (_u1fh::I64) = call "ccall" arg hints:  [PtrHint,]  result hints:  [PtrHint] suspendThread(BaseReg, 0);
692          call "ccall" arg hints:  []  result hints:  [] performMajorGC();
693          (_u1fi::I64) = call "ccall" arg hints:  [PtrHint]  result hints:  [PtrHint] resumeThread(_u1fh::I64);
694          BaseReg = _u1fi::I64;
695          _u1fk::P64 = I64[CurrentTSO + 24];
696          Sp = I64[_u1fk::P64 + 16];
697          SpLim = _u1fk::P64 + 192;
698          HpAlloc = 0;
699          Hp = I64[CurrentNursery + 8] - 8;
700          HpLim = I64[CurrentNursery] + ((%MO_SS_Conv_W32_W64(I32[CurrentNursery + 48]) << 12) - 1);
701          call (I64[Sp])() args: 8, res: 8, upd: 8;
702    }
703}
704
705
706
707==================== Post control-flow optimisations ====================
708block_c1fb_entry() //  []
709        { info_tbl: [(c1fb,
710                      label: block_c1fb_info
711                      rep:StackRep [])]
712          stack_info: arg_space: 0 updfr_space: Nothing
713        }
714    {offset
715      c1fb:
716          R4 = GHC.Types.True_closure+2;
717          R3 = T8947.t2_closure;
718          R2 = GHC.IO.Handle.FD.stdout_closure;
719          Sp = Sp + 8;
720          call GHC.IO.Handle.Text.hPutStr2_info(R4,
721                                                R3,
722                                                R2) args: 8, res: 0, upd: 8;
723    }
724}
725
726
727
728==================== Post CPS Cmm ====================
729[section "data" {
730     T8947.t1_closure:
731         const T8947.t1_info;
732         const 0;
733 },
734 T8947.t1_entry() //  []
735         { info_tbl: [(c1fd,
736                       label: T8947.t1_info
737                       rep:HeapRep static { Fun {arity: 1 fun_type: ArgSpec 3} })]
738           stack_info: arg_space: 0 updfr_space: Nothing
739         }
740     {offset
741       c1fd:
742           if ((Sp + -8) < SpLim) goto c1ff; else goto c1fg;
743       c1ff:
744           R1 = T8947.t1_closure;
745           call (stg_gc_fun)(R1) args: 8, res: 0, upd: 8;
746       c1fg:
747           I64[Sp - 8] = block_c1fb_info;
748           Sp = Sp - 8;
749           I64[I64[CurrentTSO + 24] + 16] = Sp;
750           P64[CurrentNursery + 8] = Hp + 8;
751           (_u1fh::I64) = call "ccall" arg hints:  [PtrHint,]  result hints:  [PtrHint] suspendThread(BaseReg, 0);
752           call "ccall" arg hints:  []  result hints:  [] performMajorGC();
753           (_u1fi::I64) = call "ccall" arg hints:  [PtrHint]  result hints:  [PtrHint] resumeThread(_u1fh::I64);
754           BaseReg = _u1fi::I64;
755           _u1fk::P64 = I64[CurrentTSO + 24];
756           Sp = I64[_u1fk::P64 + 16];
757           SpLim = _u1fk::P64 + 192;
758           HpAlloc = 0;
759           Hp = I64[CurrentNursery + 8] - 8;
760           HpLim = I64[CurrentNursery] + ((%MO_SS_Conv_W32_W64(I32[CurrentNursery + 48]) << 12) - 1);
761           call (I64[Sp])() args: 8, res: 8, upd: 8;
762     }
763 },
764 block_c1fb_entry() //  []
765         { info_tbl: [(c1fb,
766                       label: block_c1fb_info
767                       rep:StackRep [])]
768           stack_info: arg_space: 0 updfr_space: Nothing
769         }
770     {offset
771       c1fb:
772           R4 = GHC.Types.True_closure+2;
773           R3 = T8947.t2_closure;
774           R2 = GHC.IO.Handle.FD.stdout_closure;
775           Sp = Sp + 8;
776           call GHC.IO.Handle.Text.hPutStr2_info(R4,
777                                                 R3,
778                                                 R2) args: 8, res: 0, upd: 8;
779     }
780 }]
781
782
783
784==================== Output Cmm ====================
785[section "data" {
786     T8947.t1_closure:
787         const T8947.t1_info;
788         const 0;
789 },
790 T8947.t1_entry() //  []
791         { info_tbl: [(c1fd,
792                       label: T8947.t1_info
793                       rep:HeapRep static { Fun {arity: 1 fun_type: ArgSpec 3} })]
794           stack_info: arg_space: 0 updfr_space: Nothing
795         }
796     {offset
797       c1fd:
798           if ((Sp + -8) < SpLim) goto c1ff; else goto c1fg;
799       c1ff:
800           R1 = T8947.t1_closure;
801           call (stg_gc_fun)(R1) args: 8, res: 0, upd: 8;
802       c1fg:
803           I64[Sp - 8] = block_c1fb_info;
804           Sp = Sp - 8;
805           I64[I64[CurrentTSO + 24] + 16] = Sp;
806           P64[CurrentNursery + 8] = Hp + 8;
807           (_u1fh::I64) = call "ccall" arg hints:  [PtrHint,]  result hints:  [PtrHint] suspendThread(BaseReg, 0);
808           call "ccall" arg hints:  []  result hints:  [] performMajorGC();
809           (_u1fi::I64) = call "ccall" arg hints:  [PtrHint]  result hints:  [PtrHint] resumeThread(_u1fh::I64);
810           BaseReg = _u1fi::I64;
811           _u1fk::P64 = I64[CurrentTSO + 24];
812           Sp = I64[_u1fk::P64 + 16];
813           SpLim = _u1fk::P64 + 192;
814           HpAlloc = 0;
815           Hp = I64[CurrentNursery + 8] - 8;
816           HpLim = I64[CurrentNursery] + ((%MO_SS_Conv_W32_W64(I32[CurrentNursery + 48]) << 12) - 1);
817           call (I64[Sp])() args: 8, res: 8, upd: 8;
818     }
819 },
820 block_c1fb_entry() //  []
821         { info_tbl: [(c1fb,
822                       label: block_c1fb_info
823                       rep:StackRep [])]
824           stack_info: arg_space: 0 updfr_space: Nothing
825         }
826     {offset
827       c1fb:
828           R4 = GHC.Types.True_closure+2;
829           R3 = T8947.t2_closure;
830           R2 = GHC.IO.Handle.FD.stdout_closure;
831           Sp = Sp + 8;
832           call GHC.IO.Handle.Text.hPutStr2_info(R4,
833                                                 R3,
834                                                 R2) args: 8, res: 0, upd: 8;
835     }
836 }]
837
838
839
840==================== Cmm produced by new codegen ====================
841[section "data" {
842     T8947.t8947_closure:
843         const T8947.t8947_info;
844         const 0;
845 },
846 T8947.t8947_entry() //  []
847         { info_tbl: [(c1hs,
848                       label: T8947.t8947_info
849                       rep:HeapRep static { Fun {arity: 1 fun_type: ArgSpec 3} })]
850           stack_info: arg_space: 8 updfr_space: Just 8
851         }
852     {offset
853       c1hs:
854           goto c1hq;
855       c1hq:
856           if ((old + 0) - <highSp> < SpLim) goto c1ht; else goto c1hu;
857       c1ht:
858           R1 = T8947.t8947_closure;
859           call (stg_gc_fun)(R1) args: 8, res: 0, upd: 8;
860       c1hu:
861           goto c1hp;
862       c1hp:
863           call T8947.t1_info() args: 8, res: 0, upd: 8;
864     }
865 }]
866
867
868
869==================== Post control-flow optimisations ====================
870{offset
871  c1hs:
872      if ((old + 0) - <highSp> < SpLim) goto c1ht; else goto c1hu;
873  c1ht:
874      R1 = T8947.t8947_closure;
875      call (stg_gc_fun)(R1) args: 8, res: 0, upd: 8;
876  c1hu:
877      call T8947.t1_info() args: 8, res: 0, upd: 8;
878}
879
880
881
882==================== Post common block elimination ====================
883{offset
884  c1hs:
885      if ((old + 0) - <highSp> < SpLim) goto c1ht; else goto c1hu;
886  c1ht:
887      R1 = T8947.t8947_closure;
888      call (stg_gc_fun)(R1) args: 8, res: 0, upd: 8;
889  c1hu:
890      call T8947.t1_info() args: 8, res: 0, upd: 8;
891}
892
893
894
895==================== Proc points ====================
896T8947.t8947_entry
897[c1hs]
898{offset
899  c1hs:
900      if ((old + 0) - <highSp> < SpLim) goto c1ht; else goto c1hu;
901  c1ht:
902      R1 = T8947.t8947_closure;
903      call (stg_gc_fun)(R1) args: 8, res: 0, upd: 8;
904  c1hu:
905      call T8947.t1_info() args: 8, res: 0, upd: 8;
906}
907
908
909
910==================== Layout Stack ====================
911{offset
912  c1hs:
913      goto c1hu;
914  c1hu:
915      call T8947.t1_info() args: 8, res: 0, upd: 8;
916}
917
918
919
920==================== Sink assignments ====================
921{offset
922  c1hs:
923      goto c1hu;
924  c1hu:
925      call T8947.t1_info() args: 8, res: 0, upd: 8;
926}
927
928
929
930==================== CAFEnv ====================
931[(c1hs, {T8947.t1_closure}), (c1hu, {T8947.t1_closure})]
932
933
934
935==================== procpoint map ====================
936[(c1hs, <procpt>), (c1hu, reached by c1hs)]
937
938
939
940==================== Post splitting ====================
941T8947.t8947_entry() //  []
942        { info_tbl: [(c1hs,
943                      label: T8947.t8947_info
944                      rep:HeapRep static { Fun {arity: 1 fun_type: ArgSpec 3} })]
945          stack_info: arg_space: 0 updfr_space: Nothing
946        }
947    {offset
948      c1hs:
949          goto c1hu;
950      c1hu:
951          call T8947.t1_info() args: 8, res: 0, upd: 8;
952    }
953}
954
955
956
957==================== after setInfoTableStackMap ====================
958T8947.t8947_entry() //  []
959        { info_tbl: [(c1hs,
960                      label: T8947.t8947_info
961                      rep:HeapRep static { Fun {arity: 1 fun_type: ArgSpec 3} })]
962          stack_info: arg_space: 0 updfr_space: Nothing
963        }
964    {offset
965      c1hs:
966          goto c1hu;
967      c1hu:
968          call T8947.t1_info() args: 8, res: 0, upd: 8;
969    }
970}
971
972
973
974==================== Post control-flow optimisations ====================
975T8947.t8947_entry() //  []
976        { info_tbl: [(c1hs,
977                      label: T8947.t8947_info
978                      rep:HeapRep static { Fun {arity: 1 fun_type: ArgSpec 3} })]
979          stack_info: arg_space: 0 updfr_space: Nothing
980        }
981    {offset
982      c1hs:
983          call T8947.t1_info() args: 8, res: 0, upd: 8;
984    }
985}
986
987
988
989==================== Post CPS Cmm ====================
990[section "data" {
991     T8947.t8947_closure:
992         const T8947.t8947_info;
993         const 0;
994 },
995 T8947.t8947_entry() //  []
996         { info_tbl: [(c1hs,
997                       label: T8947.t8947_info
998                       rep:HeapRep static { Fun {arity: 1 fun_type: ArgSpec 3} })]
999           stack_info: arg_space: 0 updfr_space: Nothing
1000         }
1001     {offset
1002       c1hs:
1003           call T8947.t1_info() args: 8, res: 0, upd: 8;
1004     }
1005 }]
1006
1007
1008
1009==================== Output Cmm ====================
1010[section "data" {
1011     T8947.t8947_closure:
1012         const T8947.t8947_info;
1013         const 0;
1014 },
1015 T8947.t8947_entry() //  []
1016         { info_tbl: [(c1hs,
1017                       label: T8947.t8947_info
1018                       rep:HeapRep static { Fun {arity: 1 fun_type: ArgSpec 3} })]
1019           stack_info: arg_space: 0 updfr_space: Nothing
1020         }
1021     {offset
1022       c1hs:
1023           call T8947.t1_info() args: 8, res: 0, upd: 8;
1024     }
1025 }]
1026
1027
1028
1029==================== Output Cmm ====================
1030[section "relreadonly" {
1031     S1fm_srt:
1032         const GHC.IO.Handle.Text.hPutStr2_closure;
1033         const GHC.IO.Handle.FD.stdout_closure;
1034         const T8947.t1_closure;
1035         const T8947.t2_closure;
1036 }]
1037
1038