[GHC] #10062: Codegen on sequential FFI calls is not very good

GHC ghc-devs at haskell.org
Tue Feb 3 10:00:27 UTC 2015


#10062: Codegen on sequential FFI calls is not very good
-------------------------------------+-------------------------------------
        Reporter:  chadaustin        |                   Owner:
            Type:  bug               |                  Status:  new
        Priority:  normal            |               Milestone:
       Component:  Compiler          |                 Version:  7.8.3
  (CodeGen)                          |                Keywords:
      Resolution:                    |            Architecture:
Operating System:  Unknown/Multiple  |  Unknown/Multiple
 Type of failure:  Runtime           |               Test Case:
  performance bug                    |                Blocking:
      Blocked By:                    |  Differential Revisions:
 Related Tickets:                    |
-------------------------------------+-------------------------------------

Comment (by chadaustin):

 Wow!  Thanks for the fast response!  The ABI constraints make sense.  In
 light of them, then yes, the improvements would be:

 * Change "movl $0,%eax" to "xorq %rax,%rax" (or maybe "movb $0,%al",
 though I don't know whether a smaller instruction is more important than
 breaking the data dependency on rax)

 * Merge the rsp additions and subtractions between FFI calls

 * Eliminate the extra move in "movq 72(%rsp),%rax; movq %rax,%rsi"

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


More information about the ghc-tickets mailing list