RE: Why does SpecConstr run far later than specialisation

2018-03-20 Thread Simon Peyton Jones via ghc-devs
However, looking at the pass order in `SimplCore`, specialisation runs very early before any major simplification but SpecConstr runs very late right at the end of the pipeline. Does anyone know the justification for this? Here’s my thought * Typeclass specialisation makes a specialised

Re: Question about indirectees of BLACKHOLE closures

2018-03-20 Thread Simon Marlow
Added comments: https://phabricator.haskell.org/D4517 On 20 March 2018 at 14:58, Simon Marlow wrote: > Hi Omer, > > On 20 March 2018 at 13:05, Ömer Sinan Ağacan wrote: > >> Hi, >> >> I've been looking at BLACKHOLE closures and how the indirectee field

Re: Question about indirectees of BLACKHOLE closures

2018-03-20 Thread Simon Marlow
Hi Omer, On 20 March 2018 at 13:05, Ömer Sinan Ağacan wrote: > Hi, > > I've been looking at BLACKHOLE closures and how the indirectee field is > used > and I have a few questions: > > Looking at evacuate for BLACKHOLE closures: > > case BLACKHOLE: > { >

Re: Why does SpecConstr run far later than specialisation

2018-03-20 Thread Joachim Breitner
Hi, Am Dienstag, den 20.03.2018, 13:23 + schrieb Matthew Pickering: > As far as I understand it, the goals of SpecConstr and specialisation > are the same. One works for > normal value arguments and one works for special type class dictionary > arguments. > > However, looking at the pass

Why does SpecConstr run far later than specialisation

2018-03-20 Thread Matthew Pickering
As far as I understand it, the goals of SpecConstr and specialisation are the same. One works for normal value arguments and one works for special type class dictionary arguments. However, looking at the pass order in `SimplCore`, specialisation runs very early before any major simplification but

RE: What does "return" keyword mean in INFO_TABLE_RET declarations?

2018-03-20 Thread Simon Peyton Jones via ghc-devs
It might help to a) make the reference more specific, et See Note [Stack frames] in CmmParse.y b) put that citation close to the relevant definitions, rather than at the head of the file. It's not easy for authors to anticipate the path that others will follow later. But /you/

Re: What does "return" keyword mean in INFO_TABLE_RET declarations?

2018-03-20 Thread Ömer Sinan Ağacan
I think this may be my bad. Both StgMiscClosures.cmm and Updates.cmm have this line in the header: This file is written in a subset of C--, extended with various features specific to GHC. It is compiled by GHC directly. For the syntax of .cmm files, see the parser in

Question about indirectees of BLACKHOLE closures

2018-03-20 Thread Ömer Sinan Ağacan
Hi, I've been looking at BLACKHOLE closures and how the indirectee field is used and I have a few questions: Looking at evacuate for BLACKHOLE closures: case BLACKHOLE: { StgClosure *r; const StgInfoTable *i; r = ((StgInd*)q)->indirectee; if

RE: What does "return" keyword mean in INFO_TABLE_RET declarations?

2018-03-20 Thread Simon Peyton Jones via ghc-devs
It’s fine where it is, provided it takes the form of Note [Stack frames] and that Note is referred to from relevant places elsewhere. E.g. Omer didn’t find it. One plausible place to point to it is the very definition site of INFO_TABLE_RET, wherever that is. Simon From: