Changes between Initial Version and Version 1 of Ticket #12076


Ignore:
Timestamp:
May 17, 2016 4:49:07 AM (3 years ago)
Author:
ezyang
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #12076 – Description

    initial v1  
    3737}}}
    3838
    39 Error goes away when you turn on optimization. My understanding is that removing `lazy` in `CorePrep` is too late, because there's no pass afterwards that eliminates the trivial thunk assignment.
     39Error goes away when you turn on optimization. My understanding is that removing `lazy` in `CorePrep` is too late, because there's no pass afterwards that eliminates the trivial thunk assignment. Here's the STG:
     40
     41{{{
     42z_r2aC :: ()
     43[GblId, Caf=NoCafRefs, Str=DmdType, Unf=OtherCon []] =
     44    NO_CCS ()! [];
     45
     46g_r2aD :: () -> () -> ()
     47[GblId, Arity=2, Caf=NoCafRefs, Str=DmdType, Unf=OtherCon []] =
     48    sat-only \r srt:SRT:[] [ds_s2rW ds1_s2rX] () [];
     49
     50M.f :: () -> ()
     51[GblId, Arity=1, Caf=NoCafRefs, Str=DmdType, Unf=OtherCon []] =
     52    \r srt:SRT:[] [ds_s2rY]
     53        let {
     54          x_s2rZ :: ()
     55          [LclId, Str=DmdType, Unf=OtherCon []] =
     56              \u srt:SRT:[] [] z_r2aC;
     57        } in  g_r2aD x_s2rZ x_s2rZ;
     58}}}
     59
     60so we need, instead, something like `x_s2rZ = z_r2aC`.
    4061
    4162This is blocking Phab:D2211, where the insertion of a `noinline` (which is optimized out similarly to `lazy`) triggers a stage 2 linker failure when you don't compile with optimization (unfortunately, this is NOT caught validate since we build GHC with optimization... but with this test it will be!)