LLVM optimisation passes / tables next to code
davidterei at gmail.com
Tue Feb 21 07:25:26 CET 2012
On 20 February 2012 23:19, Sergiu Ivanov <unlimitedscolobb at gmail.com> wrote:
> 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
>> 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
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?
More information about the Cvs-ghc