[GHC] #9142: LLVM HEAD rejects aliases used by LLVM codegen

GHC ghc-devs at haskell.org
Mon Jul 21 02:02:11 UTC 2014


#9142: LLVM HEAD rejects aliases  used by LLVM codegen
-------------------------------------+-------------------------------------
              Reporter:  bgamari     |             Owner:
                  Type:  bug         |            Status:  new
              Priority:  high        |         Milestone:  7.10.1
             Component:  Compiler    |           Version:  7.8.2
            Resolution:              |          Keywords:
Differential Revisions:              |  Operating System:  Unknown/Multiple
          Architecture:              |   Type of failure:  None/Unknown
  Unknown/Multiple                   |         Test Case:
            Difficulty:  Unknown     |          Blocking:  4213
            Blocked By:              |
       Related Tickets:              |
-------------------------------------+-------------------------------------

Comment (by bgamari):

 To describe the approach a bit more, I've inverted the roles of the
 aliases and symbol definitions. That is, symbol definitions take names of
 the form `@symbol$def` whereas `@symbol` is defined as an alias. The
 `@symbol` aliases have external linkage when appropriate, ensuring they
 are available for external references which can simply use an normal
 `@symbol = external global` declaration. This in effect moves the aliases
 from the point of use to the point of definition, satisfying LLVM's
 prohibition of aliases of declarations.

 As I've currently implemented it this logic is scattered through the
 backend (although the fact that data and functions are so distinct in LLVM
 doesn't help things). Hopefully a bit more reflection will produce a more
 coherent solution. Ultimately I may hold off on this until after we know
 how we will fix TNTC as this will be another major refactoring.

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


More information about the ghc-tickets mailing list