<div><div><br></div><div><br><div class="gmail_quote"></div></div></div><div><div dir="ltr">On Wed, Jan 9, 2019 at 4:52 AM Alex Bradbury <<a href="mailto:asb@lowrisc.org" target="_blank">asb@lowrisc.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Mon, 7 Jan 2019 at 19:35, Chris Bieneman <<a href="mailto:chris.bieneman@me.com" target="_blank">chris.bieneman@me.com</a>> wrote:<br>
><br>
> Historically there was a request to make LLVM_OPTIMIZED_TABLEGEN On by default for debug builds, which I discouraged. At the time it was suggested that workflow was fairly new and untested in a lot of build configurations. Today I believe that situation is slightly better.<br>
><br>
> I believe there are still issues with it not working correctly in the Xcode generator, but I know people have used it successfully with Visual Studio.<br>
><br>
> I think that enabling it by default in Debug builds is probably reasonable for most generators, but anyone looking to make that change should expect some bumps in the road.<br>
<br>
Although it's super handy to have it available, IMHO the risks of<br>
writing, submitting, and ultimately committing incorrect .td<br>
modifications mean that making LLVM_OPTIMIZED_TABLEGEN the default<br>
would be unwise.</blockquote><div dir="auto"><br></div></div><div><div dir="auto">But modifying a .td is not necessarily part of the main routine of developing on LLVM.</div></div><div><div><div class="gmail_quote"><div dir="auto"><br></div><div dir="auto"><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> It might be more feasible if there were a 'check-td'<br>
target that put all the .td specified in the CMakeLists for each<br>
configured target through a debug+asserts or release+asserts tblgen.<br>
<br>
In fact maybe there should be a warning in the current CMake docs to<br>
indicate of using a no-asserts tblgen binary while hacking on LLVM.</blockquote><div dir="auto"><br></div><div dir="auto">How do you detect what is « hacking on LLVM » when running Cmake? Why do you single out tblgen assertions?</div><div dir="auto"><br></div><div dir="auto">I was using an « external » llvm-tblgen most of the time I was hacking on LLVM to avoid constantly rebuilding it.</div><div dir="auto"><br></div><div dir="auto">More importantly: assertions should catch internal issues with tblgen itself. Issues with invalid .td should not be implemented through assertions IMO but always-on checks.</div><div dir="auto"><br></div><div dir="auto">— </div><div dir="auto">Mehdi</div><div dir="auto"><br></div><div dir="auto"><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
Best,<br>
<br>
Alex<br>
</blockquote></div></div>
</div>