[commit: ghc] master: Revert "comments" (fb1d2cc)

git at git.haskell.org git at git.haskell.org
Sat Oct 26 16:09:08 UTC 2013


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/fb1d2cc9f18f3515379a5e329f8da3bd919a91d4/ghc

>---------------------------------------------------------------

commit fb1d2cc9f18f3515379a5e329f8da3bd919a91d4
Author: Austin Seipp <austin at well-typed.com>
Date:   Fri Oct 25 22:33:52 2013 -0500

    Revert "comments"
    
    This reverts commit 9026c77a07533bda3773c3c3f3df1c6592bc80c7.


>---------------------------------------------------------------

fb1d2cc9f18f3515379a5e329f8da3bd919a91d4
 compiler/codeGen/StgCmmLayout.hs |   27 ---------------------------
 1 file changed, 27 deletions(-)

diff --git a/compiler/codeGen/StgCmmLayout.hs b/compiler/codeGen/StgCmmLayout.hs
index 2153430..8473642 100644
--- a/compiler/codeGen/StgCmmLayout.hs
+++ b/compiler/codeGen/StgCmmLayout.hs
@@ -188,7 +188,6 @@ slowCall fun stg_args
                                       " with pat " ++ unpackFS rts_fun)
            return r
 
-        -- Note [avoid intermediate PAPs]
         let n_args = length stg_args
         if n_args > arity && optLevel dflags >= 2
            then do
@@ -225,32 +224,6 @@ slowCall fun stg_args
              return r
 
 
--- Note [avoid intermediate PAPs]
---
--- A slow call which needs multiple generic apply patterns will be
--- almost guaranteed to create one or more intermediate PAPs when
--- applied to a function that takes the correct number of arguments.
--- We try to avoid this situation by generating code to test whether
--- we are calling a function with the correct number of arguments
--- first, i.e.:
---
---   if (TAG(f) != 0} {  // f is not a thunk
---      if (f->info.arity == n) {
---         ... make a fast call to f ...
---      }
---   }
---   ... otherwise make the slow call ...
---
--- We *only* do this when the call requires multiple generic apply
--- functions, which requires pushing extra stack frames and probably
--- results in intermediate PAPs.  (I say probably, because it might be
--- that we're over-applying a function, but that seems even less
--- likely).
---
--- This very rarely applies, but if it does happen in an inner loop it
--- can have a severe impact on performance (#6084).
-
-
 --------------
 direct_call :: String
             -> Convention     -- e.g. NativeNodeCall or NativeDirectCall



More information about the ghc-commits mailing list