#4941: SpecConstr generates functions that do not use their arguments
---------------------------------+------------------------------------------
    Reporter:  simonpj           |        Owner:                         
        Type:  task              |       Status:  new                    
    Priority:  normal            |    Milestone:  _|_                    
   Component:  Compiler          |      Version:  7.0.1                  
    Keywords:                    |     Testcase:                         
   Blockedby:                    |   Difficulty:                         
          Os:  Unknown/Multiple  |     Blocking:                         
Architecture:  Unknown/Multiple  |      Failure:  Runtime performance bug
---------------------------------+------------------------------------------

Comment(by rl):

 So there are a few useful things we can do after SpecConstr:

   1. eliminate unused arguments
   2. eliminate duplicate arguments
   3. static argument transformation (?)

 Strictness analysis helps with the former but not with the latter two. It
 seems that a pass that does either 1 and 2 or all 3 would be quite useful.
 Or perhaps SpecConstr itself could be extended to do this analysis. It
 seems that roughly speaking, it could record information about the
 shape/values of and the demand on arguments and free variables, split them
 into equivalence classes and then specialise based on that information. My
 gut feeling is that something like this could do 1-3 and also subsume
 LiberateCase.

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

_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to