[GHC] #8905: Function arguments are always spilled/reloaded if scrutinee is already in WHNF

GHC ghc-devs at haskell.org
Sun Mar 16 18:43:17 UTC 2014


#8905: Function arguments are always spilled/reloaded if scrutinee is already in
WHNF
--------------------------------------------+------------------------------
        Reporter:  tibbe                    |            Owner:
            Type:  bug                      |           Status:  new
        Priority:  normal                   |        Milestone:
       Component:  Compiler                 |          Version:  7.9
      Resolution:                           |         Keywords:
Operating System:  Unknown/Multiple         |     Architecture:
 Type of failure:  Runtime performance bug  |  Unknown/Multiple
       Test Case:                           |       Difficulty:  Unknown
        Blocking:                           |       Blocked By:
                                            |  Related Tickets:
--------------------------------------------+------------------------------

Comment (by tibbe):

 The register allocator doesn't tidy this up either:

 {{{
 #!asm
 _c2wS:
         leaq block_c2my_info(%rip),%rax
         movq %rax,-40(%rbp)
         movq %r9,%rbx
         movq %r14,-32(%rbp)
         movq %rsi,-24(%rbp)
         movq %rdi,-16(%rbp)
         movq %r8,-8(%rbp)
         addq $-40,%rbp
         testq $7,%rbx
         jne _c2my
 }}}

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


More information about the ghc-tickets mailing list