Re: [GHC] #1547: Arity can decrease with -prof

2008-07-14 Thread GHC
#1547: Arity can decrease with -prof
---+
 Reporter:  igloo  |  Owner: 
 Type:  bug| Status:  new
 Priority:  normal |  Milestone:  _|_
Component:  Profiling  |Version:  6.6.1  
 Severity:  normal | Resolution: 
 Keywords: | Difficulty:  Unknown
 Testcase:  stm package/tests/conc052  |   Architecture:  Unknown
   Os:  Unknown|  
---+
Changes (by simonmar):

  * priority:  high = normal
  * milestone:  6.10 branch = _|_

Comment:

 bug isn't manifesting any more, and doesn't seem to be an urgent problem.

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


Re: [GHC] #1547: Arity can decrease with -prof

2008-06-04 Thread GHC
#1547: Arity can decrease with -prof
---+
 Reporter:  igloo  |  Owner: 
 Type:  bug| Status:  new
 Priority:  high   |  Milestone:  6.10 branch
Component:  Profiling  |Version:  6.6.1  
 Severity:  normal | Resolution: 
 Keywords: | Difficulty:  Unknown
 Testcase:  stm package/tests/conc052  |   Architecture:  Unknown
   Os:  Unknown|  
---+
Comment (by simonmar):

 Update: conc052 is now apparently not failing any more, but this bug
 hasn't been fixed.  I imagine something else has changed such that we
 don't tickle the bug any more.

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


Re: [GHC] #1547: Arity can decrease with -prof

2007-12-04 Thread GHC
#1547: Arity can decrease with -prof
---+
 Reporter:  igloo  |  Owner: 
 Type:  bug| Status:  new
 Priority:  high   |  Milestone:  6.10 branch
Component:  Profiling  |Version:  6.6.1  
 Severity:  normal | Resolution: 
 Keywords: | Difficulty:  Unknown
 Testcase:  stm package/tests/conc052  |   Architecture:  Unknown
   Os:  Unknown|  
---+
Comment (by simonpj):

 I had a half-done change in `SimplUtils` which I'm just going to dump here
 for now.  The actual code change (which I am not sure is right) is this:
 {{{
 hunk ./compiler/simplCore/SimplUtils.lhs 827
 -   any isRuntimeVar bndrs
 +   any isRuntimeVar bndrs || not (exprIsTrivial body)
 +   -- Note [RHS eta expansion]
 }}}
 and the note is this:
 {{{
 Note [RHS eta expansion]
 
 The basic idea is to transform
f = \x1..xn - N  ==   f = \x1..xn y1..ym - N y1..ym
  (n = 0)
 where (in both cases)

 * The xi can include type variables

 * The yi are all value variables

 * N is a NORMAL FORM (i.e. no redexes anywhere)
   wanting a suitable number of extra args.

 This is OK even if n=0; for example:
 let g=\xs. x:xs in (\ys. map g ys)
 Here we can eta expand to
 \ys. let g=\xs. x:xs in map g ys
 You might think the f-binding woudl have floated, but it may not when
 we are profiling:
 f = scc foo (let g=\xs. x:xs in (\xs. map g ys))
 Furthermore, f's arity might have been 1 before, if it originally looked
 like
 h g ys = map g ys
 f = scc foo (h (\xs. x:xs))
 and we do not expect like the arity to decrease so that it now looks
 like zero (to the cheap-and-cheerful exprArity).

 However, we must be careful not to undo the effect of eta-reduction, hence
 the check for `(not (exprIsTrivial body))`.
 }}}
 I just want to capture the state of play because I can't finish this
 today.

 Simon

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


Re: [GHC] #1547: Arity can decrease with -prof

2007-11-12 Thread GHC
#1547: Arity can decrease with -prof
---+
 Reporter:  igloo  |  Owner: 
 Type:  bug| Status:  new
 Priority:  high   |  Milestone:  6.10 branch
Component:  Profiling  |Version:  6.6.1  
 Severity:  normal | Resolution: 
 Keywords: | Difficulty:  Unknown
 Testcase:  stm package/tests/conc052  |   Architecture:  Unknown
   Os:  Unknown|  
---+
Changes (by simonpj):

  * testcase:  = stm package/tests/conc052
  * summary:  conc052 core lint errors in profc/profasm ways = Arity can
  decrease with -prof
  * milestone:  6.8 branch = 6.10 branch

Old description:

 The conc052 test (in the stm package) on amd64/Linux is giving core lint
 errors for the profc/profasm ways.

 Part of #1546 might be the same problem.

New description:

 Something like
 {{{
   f = \p\q.body
   x = scc foo f (\y.e)
 }}}
 shows f having arity 2, and hence x having arity 1.  But when we inline f,
 we get
 {{{
   x = scc foo let p = \x.e in \q.body
 }}}
 and the cheap-and-cheerful arity discovery function (`exprArity`) detects
 arity of 0, not 1.  And then !CoreLint complains about the inconsistency
 of arity and strictness info.

 This is unpleasant but not actually a problem.

 It shows up in the `conc052` test (in the stm package).

 Part of #1546 might be the same problem.

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