LLVM optimisation passes / tables next to code
unlimitedscolobb at gmail.com
Thu Mar 22 00:31:21 CET 2012
On Mon, Mar 19, 2012 at 12:12 PM, Simon Marlow <simonmar at microsoft.com> wrote:
> I've been thinking a little about this. If some extension to LLVM is needed to support TNTC, then I think it might be better to go all the way and support arbitrary labels with info tables, not just top-level procedures. Also, it has to be possible to take the address of a label. Obviously, such labels cannot be optimised away, and there has to be enough information in the intermediate code to be able to construct control-flow graphs.
Now that you have stated it, this approach sounds like the right one.
Do I get it right that we could place such a label at the end of the
info table and thus get the proper TNTC?
> We can make the NCG support arbitrary labels with info tables quite easily, and I'm very tempted to do it because it will let us generate much better code. But the LLVM route will not be able to benefit, unless we can find a way to do this with LLVM too.
Do you think the LLVM developers would accept such an extension if we
suggest this to them explicitly? I'm afraid they won't be very happy
More information about the Cvs-ghc