<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">On Feb 29, 2020, at 2:08 PM, David Blaikie <<a href="mailto:dblaikie@gmail.com" class="">dblaikie@gmail.com</a>> wrote:<div><blockquote type="cite" class=""><div class=""><blockquote class="gmail_quote" style="caret-color: rgb(0, 0, 0); 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; -webkit-text-stroke-width: 0px; text-decoration: none; margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;">I've<span class="Apple-converted-space"> </span><br class="">curious as<br class="">to how MLIR deals with IPO as that's the problem I was running into.<span class="Apple-converted-space"> </span><br class=""></blockquote><div style="caret-color: rgb(0, 0, 0); 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; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br class="">FWIW I believe LLVM's new pass manager (NPM) was designed with parallelism and the ability to support this situation (that MLIR doesn't? Or doesn't to the degree/way in which the NPM does). I'll leave it to folks (Chandler probably has the most context here) to provide some more detail there if they can/have time.<br class=""></div></div></blockquote></div><br class=""><div class="">Historically speaking, all of the LLVM pass managers have been designed to support multithreaded compilation (check out the ancient history of the <a href="http://llvm.org/docs/WritingAnLLVMPass.html" class="">WritingAnLLVMPass</a> doc if curious).</div><div class=""><br class=""></div><div class="">The problem is that LLVM has global use-def chains on constants, functions and globals, etc, so it is impractical to do this.  Every “inst->setOperand” would have to be able to take locks or use something like software transactional memory techniques in their implementation.  This would be very complicated and very slow.</div><div class=""><br class=""></div><div class="">MLIR defines this away from the beginning.  This is a result of the core IR design, not the pass manager design itself.</div><div class=""><br class=""></div><div class="">-Chris</div></body></html>