#5173: Implement forward substitution of constants in the Cmm mini-inliner
---------------------------------+------------------------------------------
    Reporter:  tibbe             |       Owner:              
        Type:  bug               |      Status:  new         
    Priority:  normal            |   Component:  Compiler    
     Version:  7.0.3             |    Keywords:              
    Testcase:                    |   Blockedby:              
          Os:  Unknown/Multiple  |    Blocking:              
Architecture:  Unknown/Multiple  |     Failure:  None/Unknown
---------------------------------+------------------------------------------
 While working on a new set of primops for copying arrays, I ran into a Cmm
 optimizer issue where constants weren't being inlined if the temporary
 that the constant was assigned to was used more than once. Example:

 {{{
 fn
 {
     bits64 a, b;

     a = 1;
     b = a + a;
     RET_N(b);
 }
 }}}

 is optimized as

 {{{
 fn()    { []
         }
     ca: _cb::I64 = 1;
         R1 = _cb::I64 + _cb::I64;
         jump (I64[Sp + 0]) ();
 }
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5173>
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