#5173: Implement forward substitution of constants in the Cmm mini-inliner
---------------------------------+------------------------------------------
    Reporter:  tibbe             |       Owner:              
        Type:  bug               |      Status:  patch       
    Priority:  normal            |   Component:  Compiler    
     Version:  7.0.3             |    Keywords:              
    Testcase:                    |   Blockedby:              
          Os:  Unknown/Multiple  |    Blocking:              
Architecture:  Unknown/Multiple  |     Failure:  None/Unknown
---------------------------------+------------------------------------------

Comment(by tibbe):

 I added the constant folding as well, the last example in the previous
 comment now looks great:

 {{{
 stH_ret()
         { [const 1;, const 32;]
         }
     cv1:
         _cv9::I64 = I64[Sp + 8];
         _cvh::I64 = I64[R1 + 7] + 32;
         foreign "ccall"
           MO_Memcpy((_cv9::I64 + 32, PtrHint), (_cvh::I64, PtrHint),
 (64,),
                     (8,))[_unsafe_call_];
         I64[_cv9::I64] = stg_MUT_ARR_PTRS_DIRTY_info;
         foreign "ccall"
           MO_Memset(((_cv9::I64 + 24) + (I64[_cv9::I64 + 8] << 3),
 PtrHint),
                     (1,), (1,), (8,))[_unsafe_call_];
         R1 = GHC.Unit.()_closure+1;
         Sp = Sp + 16;
         jump (I64[Sp + 0]) ();
 }
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5173#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to