<div dir="ltr">Uh, if oyu really have any plans to ever try to upstream it, talking about third party library usage is the least of your problems.<br><div>If you ever plan on trying to upstream something as important as "parallelizing code generation", you should propose, design, build, etc, it upstream.</div><div>Not try to do it and then try to upstream it.</div><div><br>Something like that requires a very large amount of design consensus.</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 18, 2016 at 8:57 PM, Bekket McClane via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><span class=""><blockquote type="cite"><div>Mehdi Amini <<a href="mailto:mehdi.amini@apple.com" target="_blank">mehdi.amini@apple.com</a>> 於 2016年10月19日 上午11:47 寫道:</div><br class="m_6890214005425039902Apple-interchange-newline"><div><blockquote type="cite" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div><br class="m_6890214005425039902Apple-interchange-newline">On Oct 18, 2016, at 8:41 PM, Bekket McClane <<a href="mailto:bekket.mcclane@gmail.com" target="_blank">bekket.mcclane@gmail.com</a>> wrote:</div><br class="m_6890214005425039902Apple-interchange-newline"><div><div style="word-wrap:break-word"><br><div><blockquote type="cite"><div>Mehdi Amini <<a href="mailto:mehdi.amini@apple.com" target="_blank">mehdi.amini@apple.com</a>> 於 2016年10月19日 上午11:30 寫道:</div><br class="m_6890214005425039902Apple-interchange-newline"><div><div style="word-wrap:break-word"><br><div><blockquote type="cite"><div>On Oct 18, 2016, at 6:28 PM, Bekket McClane via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:</div><br class="m_6890214005425039902Apple-interchange-newline"><div><div dir="ltr">Hi,<div>The LLVM variant we're building now contains usage of a third-party threading library, and we would like to push our work upstream in the future.<span class="m_6890214005425039902Apple-converted-space"> </span></div></div></div></blockquote><div><br></div><div>What is the motivation?</div><div>For instance what is this doing that std::thread or llvm::ThreadPool is not providing? Why is it useful to have it in tree?</div></div></div></div></blockquote><div><br></div><div>The library we’re using is actually a routine library which provides extremely fast context switching similar to Go routine.</div></div></div></div></blockquote><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br></div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">That’s interesting, but are you intending to use this as a runtime to go with the code *generated by LLVM* or are you planning to use this to implement the compiler internals?</div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br></div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">This is a significant difference, as in the first case we have started a “parallel libs” subproject here: <a href="http://llvm.org/svn/llvm-project/parallel-libs/trunk/" target="_blank">http://llvm.org/svn/<wbr>llvm-project/parallel-libs/<wbr>trunk/</a></div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">I’m not sure we would take an external lib, but we would consider integrating as a new LLVM subproject if there was a motivation on both side to get there.</div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br></div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">For the second case (using it in the compiler itself), what kind of uses do you have for this in your “LLVM variant”?</div></div></blockquote><div><br></div></span><div>I think we’re the second case, since we are going to parallelize "compiler itself”. In short, we’re planning to parallelize the code generation process in aid of JIT compilation. </div><span class=""><br><blockquote type="cite"><div><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><blockquote type="cite" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div><div style="word-wrap:break-word"><div><div>I think neither standard library nor LLVM support library provide this functionality.</div></div></div></div></blockquote><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br></div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">We’re implementing C++ coroutine though: <a href="https://www.youtube.com/watch?v=8C8NnE1Dg4A" target="_blank">https://www.youtube.<wbr>com/watch?v=8C8NnE1Dg4A</a></div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">(Not sure how it relates to what you’re doing, but since you mentioned coroutines…)</div></div></blockquote><div><br></div></span><div>Yes, I think that resembles to what we want. Thanks for providing.</div><div><br></div><div>B.R.</div><span class="HOEnZb"><font color="#888888">McClane</font></span><span class=""><br><blockquote type="cite"><div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br></div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">— </div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Mehdi</div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br></div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br></div><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><blockquote type="cite" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div><div style="word-wrap:break-word"><div><br><blockquote type="cite"><div><div style="word-wrap:break-word"><div><div><br></div><div><br></div><blockquote type="cite"><div><div dir="ltr"><div>Are third-party libraries welcomed to be added in LLVM? If yes, what folder structure should we arrange? </div></div></div></blockquote><div><br></div><div>In general we avoid them as much as possible and need a really compelling justification to include one.</div><div>Chris reinstated this position recently: <a href="http://lists.llvm.org/pipermail/llvm-dev/2016-September/105166.html" target="_blank">http://lists.llvm.<wbr>org/pipermail/llvm-dev/2016-<wbr>September/105166.html</a></div></div></div></div></blockquote><div><br></div><div>Thanks, we would take this policy into our consideration.</div><div><br></div>B.R.</div><div>McClane<br><blockquote type="cite"><div><div style="word-wrap:break-word"><div><div><br></div><div>— </div><div>Mehdi</div></div></div></div></blockquote></div></div></div></blockquote></div></blockquote></span></div><br></div><br>______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
<br></blockquote></div><br></div>