On 21/02/2012 06:25, David Terei wrote:
On 20 February 2012 23:19, Sergiu Ivanov<[email protected]> wrote:
Hello,
I've been following the discussion with the LLVM developers, but the
last message I have received on that topic was about 4 days ago and it
was:
Sure, the jump instruction is not the problem. But we were hoping to omit the
jump instruction and have the compiler add the correct offset to the pointer
when it generates code. In order to be able to do that, it has to know what
the offset is:
label difference? Between start of function and start of the code?
Has the discussion arrived at some conclusion (i.e., the way to
address TNTC with LLVM is emitting jump instructions and/or
manipulating pointers to closures), or am I just not receiving further
messages?
It has arrived at a kind of conclusion. The trick suggested by Chris
seems like it should work, only concern would be that we can encode
the jmp instruction in constant space (and if not how to handle by
padding or splitting the table). Also not sure what performance impact
would be of having an unconditional jmp at the start of every function
but seems probably minimal to me.
Simon M, you know a lot more about TNTC than me, do you think Chris's
suggestion is worth taking further?
It's hard to say. All of the proposed solutions are a compromise of one
kind or another, and they would all impose some kind of penalty - code
size or speed - on the NCG too, since we have to use the same ABI. If
the penalty can be shown to be negligible then it would be OK, but of
course then we argue about what negligible means. It seems particularly
hard to accept any penalty at all since we already have a solution
(albeit an ugly one) but which imposes no penalty or ABI changes.
Cheers,
Simon
_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc