[GHC] #6084: Add stg_ap_pnnv and related call patterns
GHC
cvs-ghc at haskell.org
Wed Jan 16 11:15:30 CET 2013
#6084: Add stg_ap_pnnv and related call patterns
---------------------------------+------------------------------------------
Reporter: SimonMeier | Owner: simonmar
Type: feature request | Status: new
Priority: normal | Milestone: 7.8.1
Component: Runtime System | Version: 7.4.1
Keywords: | Os: Unknown/Multiple
Architecture: Unknown/Multiple | Failure: None/Unknown
Difficulty: Unknown | Testcase:
Blockedby: | Blocking:
Related: |
---------------------------------+------------------------------------------
Comment(by simonmar):
A better fix for this just occurred to me. If we're making a tail-call to
an unknown function that would require multiple stack frames, we could
attempt to shortcut it like this (pseudo code):
{{{
if (GET_TAG(fun) != 0 && fun->header.info.f.arity == 5) {
// make a fast call with args in regs
} else {
// make the slow call as before
}
}}}
This is more code of course, but the advantage is that it doesn't require
us to guess which call patterns we need. It could be enabled with -O2
only, and only if we're making a call that would need, say, 3 or more
frames.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/6084#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list