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

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.
On 22/05/2014 10:12 pm, "GHC"
#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 awson):
I'm extremely sorry for a kind of OT. There is another LLVM/infotable related ticket, which I don't know how to solve [https://ghc.haskell.org/trac/ghc/ticket/8974 without the mangler]. Could you, please, look into it and check if we can fix that without mangler
or,
perhaps, understand what a feature we could ask LLVM people to introduce.
-- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/4213#comment:14 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
David Terei