[GHC] #4960: Better inlining test in CoreUnfold

2011-02-15 Thread GHC
#4960: Better inlining test in CoreUnfold
-+--
Reporter:  simonpj   |Owner:  
Type:  bug   |   Status:  new 
Priority:  normal|Milestone:  
   Component:  Compiler  |  Version:  7.0.1   
Keywords:| Testcase:  
   Blockedby:|   Difficulty:  
  Os:  Unknown/Multiple  | Blocking:  
Architecture:  Unknown/Multiple  |  Failure:  None/Unknown
-+--
 Consider this
 {{{
 f x = let
 $j y = case x of { True -> e1; False -> e2 }
   in
   case x of
 True -> ...$j y1...
 False -> ...$j y2...
 }}}
 If a function that scrutinises its argument is applied to a constructor,
 it becomes much keener to inline.  But in this example the function
 scrutinises a ''free variable'' that is evaluated to a known constructor
 at the call site.  At the moment this is ignored, and `$j` may well not be
 inlined in situations where it would be jolly good to do so.

 This shows up in test `perf/should_run/MethSharing` where the join points
 created early only inline because `exprIsDupable` is ''just'' generous
 enough to do so.  If you reduce `CoreUtils.dupAppSize` by 1, the join
 point doesn't inline any more.  But it should.

 The solution is fairly easy: compute discounts on free varaibles as well
 as arguments.  I'm making a ticket because I don't want to execute on this
 today.

-- 
Ticket URL: 
GHC 
The Glasgow Haskell Compiler

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


Re: [GHC] #4960: Better inlining test in CoreUnfold

2011-03-05 Thread GHC
#4960: Better inlining test in CoreUnfold
-+--
Reporter:  simonpj   |Owner:  
Type:  bug   |   Status:  new 
Priority:  normal|Milestone:  7.4.1   
   Component:  Compiler  |  Version:  7.0.1   
Keywords:| Testcase:  
   Blockedby:|   Difficulty:  
  Os:  Unknown/Multiple  | Blocking:  
Architecture:  Unknown/Multiple  |  Failure:  None/Unknown
-+--
Changes (by igloo):

  * milestone:  => 7.4.1


-- 
Ticket URL: 
GHC 
The Glasgow Haskell Compiler

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


Re: [GHC] #4960: Better inlining test in CoreUnfold

2011-07-29 Thread GHC
#4960: Better inlining test in CoreUnfold
-+--
Reporter:  simonpj   |Owner:  
Type:  bug   |   Status:  new 
Priority:  normal|Milestone:  7.4.1   
   Component:  Compiler  |  Version:  7.0.1   
Keywords:| Testcase:  
   Blockedby:|   Difficulty:  
  Os:  Unknown/Multiple  | Blocking:  
Architecture:  Unknown/Multiple  |  Failure:  None/Unknown
-+--

Comment(by simonpj):

 See #3781, #3755, which would find this optimisation useful.

-- 
Ticket URL: 
GHC 
The Glasgow Haskell Compiler

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