[GHC] #11138: Kill the terrible LLVM Mangler

GHC ghc-devs at haskell.org
Fri Nov 27 14:23:44 UTC 2015


#11138: Kill the terrible LLVM Mangler
-------------------------------------+-------------------------------------
           Reporter:  bgamari        |             Owner:
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  7.11
           Keywords:                 |  Operating System:  Unknown/Multiple
       Architecture:                 |   Type of failure:  Other
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 Since its introduction the LLVM backend has had a mangler which transforms
 assembler produced by LLVM. In the past this mangler was responsible for
 shuffling around code to make tables-next-to-code work, but the need for
 this
 has past with the resolution of #4213.

 At this point the only reason it exists is to mangle AVX instructions to

 1. rewriting all symbols of type `@function` to `@object` to prevent
 symbol
   references from going through the PLT, which would be bad due to
   tables-next-to-code.

 2. On x86_64, rewrite AVX instructions that require
   alignment to their unaligned counterparts, since the stack is only
 16-byte
   aligned but these instructions require 32-byte alignment.

 While it's unclear that we will ever be able to discharge (1), it would be
 nice
 to investigate whether we can at least do something about (2) (there may
 even be
 performance to be gained!).

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


More information about the ghc-tickets mailing list