Siddharth Shankar Swain via llvm-dev
2017-Feb-16 10:52 UTC
[llvm-dev] Outlining in JIT LLVM
Just wanted to know is the code size reduction technique called outlining is implemented as a part of JIT LLVM (Orc JIT) or is it separately implemented as a part of code optimization. Please guide -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170216/b2b6a573/attachment.html>
Optimization passes (any transformation to IR except splitting Modules) is performed by the general LLVM optimizations, not by ORC itself. LLVM (in either the general optimization libraries, or in ORC) doesn't currently have an outlining pass, as far as I know. I know it's something people talk about doing/wanting, but I don't believe it's been attempted/implemented so far. On Thu, Feb 16, 2017 at 2:52 AM Siddharth Shankar Swain via llvm-dev < llvm-dev at lists.llvm.org> wrote:> Just wanted to know is the code size reduction technique called outlining > is implemented as a part of JIT LLVM (Orc JIT) or is it separately > implemented as a part of code optimization. Please guide > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170216/2057cb7e/attachment.html>
On 16 Feb 2017, at 16:17, David Blaikie via llvm-dev <llvm-dev at lists.llvm.org> wrote:> > Optimization passes (any transformation to IR except splitting Modules) is performed by the general LLVM optimizations, not by ORC itself. > > LLVM (in either the general optimization libraries, or in ORC) doesn't currently have an outlining pass, as far as I know. I know it's something people talk about doing/wanting, but I don't believe it's been attempted/implemented so far.The proposed outlining pass happens after lowering to machine instructions, as it’s easier to perform the matching there. Note; however, that it would be quite difficult to fit this into a JIT compilation flow. For latency, you typically wish to JIT as little as possible at a time (often single functions), yet for outlining to work well you must have multiple functions that contain duplication. It’s unclear how these two would compose. David