[GHC] #4213: LLVM: Add support for TNTC to LLVM compiler suite

GHC ghc-devs at haskell.org
Fri May 23 23:12:34 UTC 2014


#4213: LLVM: Add support for TNTC to LLVM compiler suite
-------------------------------------+------------------------------------
        Reporter:  dterei            |            Owner:  dterei
            Type:  feature request   |           Status:  new
        Priority:  low               |        Milestone:  7.6.2
       Component:  Compiler (LLVM)   |          Version:  6.13
      Resolution:                    |         Keywords:
Operating System:  Unknown/Multiple  |     Architecture:  Unknown/Multiple
 Type of failure:  None/Unknown      |       Difficulty:  Unknown
       Test Case:                    |       Blocked By:
        Blocking:                    |  Related Tickets:
-------------------------------------+------------------------------------

Comment (by dterei):

 Firstly, its cool that LLVM has added this. It seems we could indeed
 implement TNTC with it. However based my quick understanding we couldnt
 implement it in a wag compatible with the current design.

 I believe the LLVM feature only allows us to place data at the very start
 of the function, after the label not before it. And your meant to ensure
 the very first instruction of the function is a jump that jumps over the
 data. We could use this, Simon Marlow and I discussed such a design in the
 past. But it's a change from the current scheme so the NCG would also need
 to change and it isn't clear if it would be as good as our current design.

 The other issue is that fixing TNTC doesn't eliminate the mangler. We use
 it for a few different reasons now. I can think of at least 3 I believe:
 TNTC, SIMD, and Windows.

 As for moving to the LLVM api. No, I think that isn't a great idea. I'm
 not convinced its will gain much compilation speed improvement. This is
 testable vy measuring how much time is actually spent invoking the LLVM
 binaries and how much time they spend serializing and parsing files.

 Given we need to go to an intermediary file of assembly for the mangler...

 Using the API also creates a GHC build time dependency on LLVM. Right now
 we avoid that which has advantages.

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


More information about the ghc-tickets mailing list