The reason that GHC is forced to pass input to LLVM that is in CPS is ultimately quite simple: the GHC RTS expects to be able to move the GHC stack, because thread stacks are GC’d objects. Until LLVM supports this, it is not possible for GHC to generate direct-style LLVM IR, because GHC“s implementation of lightweight threads depends on this. Does LLVM have any support for the case where the stack pointer might change at a garbage collection? If not, how difficult would it be to add such support? Demi -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170726/c5bcc3c8/attachment.html>