<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2017-05-30 14:31 GMT-07:00 Zachary Turner <span dir="ltr"><<a href="mailto:zturner@google.com" target="_blank">zturner@google.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">But it will still re-write the output files, updating their timestamps and trigger rebuild of all dependencies (at worst) or a diff-and-noop (at best), no?  </div></blockquote><div><br></div><div>Why would this happen? What would trigger that in the dependency tree?</div><div>The llvm-tblgen binary used to generate the output files cannot change...</div><div>(I may be missing something)<br></div><div><br></div><div>-- </div><div>Mehdi</div><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Since the original proposal was about reducing the number of situations in which tablegen runs at all, I would think that the best comparison would be one in which tablegen doesn't run at all.</div><div class="HOEnZb"><div class="h5"><br><div class="gmail_quote"><div dir="ltr">On Tue, May 30, 2017 at 2:29 PM Mehdi AMINI <<a href="mailto:joker.eph@gmail.com" target="_blank">joker.eph@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2017-05-30 14:28 GMT-07:00 Zachary Turner <span dir="ltr"><<a href="mailto:zturner@google.com" target="_blank">zturner@google.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Doesn't that just tell it what tablegen to use?  I was looking for an option to make it not run *anything*, and just assume that all tablegen definitions were up to date</div></blockquote><div><br></div></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>If you tell it to run an external llvm-tblgen, this external tablegen becomes the producers of all the generated file. And since this external tablegen binary is not produced by your CMake, it does not depends on any source file.</div></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div>-- </div><div>Mehdi</div></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="m_-2163333999983486463m_8144622446733310721HOEnZb"><div class="m_-2163333999983486463m_8144622446733310721h5"><br><div class="gmail_quote"><div dir="ltr">On Tue, May 30, 2017 at 2:27 PM Mehdi AMINI <<a href="mailto:joker.eph@gmail.com" target="_blank">joker.eph@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2017-05-30 13:50 GMT-07:00 Zachary Turner via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><br><br><div class="gmail_quote"><span class="m_-2163333999983486463m_8144622446733310721m_8432657276389858105m_-7801518822525073322gmail-"><div dir="ltr">On Tue, May 30, 2017 at 12:52 PM Bob Haarman <<a href="mailto:llvm@inglorion.net" target="_blank">llvm@inglorion.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><u></u><div><div style="font-size:10pt;font-family:Verdana,Arial,Helvetica,sans-serif"><div>I would like to better understand how you came to conclude that the tablegen re-runs based on changes in Support are what's causing your build to be slow and what part specifically is taking all that time. I can do a clean release + assertions build of LLVM, Clang, compiler-rt and lld in about 5 minutes, plus 40 seconds to run cmake, on what I think is similar hardware to what Zach is using. If I swap Ptr += ret and Size -= Ret in raw_fd_ostream::write_impl so that Support changes, I can do an incremental build in about 10 seconds, including the regeneration of various .inc files. How do we get from there to 10 minutes for an incremental build?</div></div></div></blockquote><div><br></div></span><div>For the sake of comparison, I made the same change and it took  1:58.39.  A slightly different but more intrusive change to Format.h in format_object_base::print() took 5:6.54.  A clean build on the same machine takes about 12 minutes.</div><div><br></div><div>I tried a few hacks to the CMake to say "don't run tablegen, no matter what, and don't make anything depend on tablegen's output", but I couldn't come up with the right magic.  If anyone knows, I can test a side-by-side comparison without tablegen.</div></div></div></blockquote><div><br></div></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>I mentioned earlier in the thread that there is already a CMake option for this: -DLLVM_TABLEGEN=path/to/llvm-<wbr>tblgen</div></div></div></div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div><br></div><div>-- </div><div>Mehdi</div></div></div></div></blockquote></div>
</div></div></blockquote></div></div></div></blockquote></div>
</div></div></blockquote></div><br></div></div>