On Jan 7, 2008, at 10:54, Carl Friedrich Bolz wrote:> Gordon Henriksen wrote: > >> That said, the PyPy group has llvmgcroot support on a branch; you >> could ask Armin Rigo <arigo at tunes dot org> for details about >> accessing it. >> >> On his benchmarks, Armin saw an 8% speedup vs. a shadow stack. >> Their gcc backend still outperforms the LLVM backend, though—and >> llvm-gcc outperforms that further still. > > The second part of this is not correct. I don't think we ever even > tried llvm-gcc on the output of our C backend. What we see on x86 > machines is that LLVM's own code generators produce slower code than > using LLVM's C backend and then running GCC on this. This however is > then faster than our own C backend using GCC.Thanks for the clarification, Carl.> Hm, summary: > > pypy-llvm-backend with llvm's codegen > < pypy-c-backend with GCC > < pypy-llvm-backend using llvm's C backend and then GCCI wonder what the impact of using llvm-gcc instead of GCC is in this final pipeline. If that actually works, you could indeed eliminate the shadow stack here as well, since llvm-gcc has extensions to emit gcroot intrinsic calls. It's currently hardwired to the shadow-stack codegen, but that's very fixable. — Gordon -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080107/d173deb3/attachment.html>
Gordon Henriksen wrote:>> Hm, summary: >> >> pypy-llvm-backend with llvm's codegen >> < pypy-c-backend with GCC >> < pypy-llvm-backend using llvm's C backend and then GCC > > I wonder what the impact of using llvm-gcc instead of GCC is in this > final pipeline. If that actually works, you could indeed eliminate the > shadow stack here as well, since llvm-gcc has extensions to emit gcroot > intrinsic calls. It's currently hardwired to the shadow-stack codegen, > but that's very fixable.How would that help? Using llvm-gcc would still give you LLVM's code generator which seems to be not optimal for what PyPy does (for whatever reason). Besides, PyPy cannot get rid of its own shadow-stack implementation as long as LLVM is not the leading compiler on most platforms :-). Cheers, Carl Friedrich Bolz
On 2008-01-08, at 08:12, Carl Friedrich Bolz wrote:> Gordon Henriksen wrote: >>> Hm, summary: >>> >>> pypy-llvm-backend with llvm's codegen >>> < pypy-c-backend with GCC >>> < pypy-llvm-backend using llvm's C backend and then GCC >> >> I wonder what the impact of using llvm-gcc instead of GCC is in >> this final pipeline. If that actually works, you could indeed >> eliminate the shadow stack here as well, since llvm-gcc has >> extensions to emit gcroot intrinsic calls. It's currently hardwired >> to the shadow-stack codegen, but that's very fixable. > > How would that help? Using llvm-gcc would still give you LLVM's code > generator which seems to be not optimal for what PyPy does (for > whatever reason).In the event that the translation via C is a significant factor. — Gordon