[GHC] #6084: Add stg_ap_pnnv and related call patterns

GHC ghc-devs at haskell.org
Tue Sep 19 06:31:41 UTC 2017


#6084: Add stg_ap_pnnv and related call patterns
-------------------------------------+-------------------------------------
        Reporter:  SimonMeier        |                Owner:  simonmar
            Type:  feature request   |               Status:  closed
        Priority:  high              |            Milestone:  7.8.1
       Component:  Runtime System    |              Version:  7.7
      Resolution:  fixed             |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:  8313
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by angerman):

 The problem I'm running into is, that I try to match up caller and callee
 signatures in my llvm code gen,
 as LLVM expect them to be properly typed. And as we are passing registers
 are argument in LLVM. I end
 up with signatures that do not match.

 Our current llvm backend, simply assumes it can safely call a function
 with more parameters than the
 function signature permitted.

 I'm not sure we could potentially create a function

 {{{
  f :: BaseReg -> Sp -> Hp -> R1 -> R2 -> R3 -> R4 -> R5 -> R6 -> SpLim ->
 F1 -> D1 -> F2 -> D2
 }}}
 and then elminate `F1` and `D1`. Thus actually having
 {{{
  f :: BaseReg -> Sp -> Hp -> R1 -> R2 -> R3 -> R4 -> R5 -> R6 -> SpLim ->
 F2 -> D2
 }}}

 and finally ending up calling it with
 {{{
  f baseReg sp hp r1 r2 r3 r4 r5 r6 spLim f1 d1 f2 d2
 }}}

 where we now pass `f1` where `f` expects `F2`?

 It might also just be the case, that generating the function signature
 from the `live` is suboptimal.

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


More information about the ghc-tickets mailing list