<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Jan 15, 2019 at 3:44 PM Davide Italiano <<a href="mailto:davide@freebsd.org">davide@freebsd.org</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">On Mon, Jan 14, 2019 at 1:52 PM Reid Kleckner <<a href="mailto:rnk@google.com" target="_blank">rnk@google.com</a>> wrote:<br>
><br>
> On Fri, Jan 11, 2019 at 11:18 AM Davide Italiano via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br>
>><br>
>> After yet another round of discussions, the plan is that of trying not<br>
>> to slap another attribute on the members, instead going for making<br>
>> OPTIMIZED_TLBGEN the default and removing always_inline.<br>
>> I'll do some testing locally (for the Ninja and the Xcode build<br>
>> generator). Pawel volunteered to take a look at the Visual Studio<br>
>> situation.<br>
>> I assume this is going to be the final plan we'll deploy unless<br>
>> somebody comes with any fundamental objections or there are technical<br>
>> hurdles down the road.<br>
><br>
><br>
> So, personally I feel strongly that LLVM_OPTIMIZED_TABLEGEN should be off by default, since the it splits up the ninja build graph. We've also run into issues with it with VS: <a href="https://reviews.llvm.org/D54153" rel="noreferrer" target="_blank">https://reviews.llvm.org/D54153</a>  Shelling out to `cmake --build` as part of a build action doesn't seem to work very well for many generators.<br>
><br>
> What actually blocks us from removing these always_inline attributes? When I read this thread, I didn't get the sense that debug build tablegen performance was actually important to anyone, but maybe I skimmed too much.<br>
><br>
<br>
The only complain I heard was from somebody with a proprietary<br>
backend, but I contacted them again and they said it wasn't a problem<br>
for them anymore.<br>
You're right that nobody had fundamental objections to just drop the attributes.<br></blockquote><div><br></div><div>I don't have anything against removing the attributes, but I'm curious about the "optimized builds" story (I hope it is OK to continue to hijack this thread for this?).</div><div><br></div><div>I wonder if there is a solution for having the ability to call these inline functions in an optimized build? Would modules solve this (with the right debugger support)?</div><div><br></div><div>The `__attribute__(used)` could be used to produce "release" build with "debug library support" (strawman wording), or better, without source modification: a compiler flag could be used to automatically add the "used" semantic to every inline function (and force emit all the inline function for all class template instantiation, but that may be too costly).</div><div><br></div><div>I wonder if anyone thought about this?</div><div><br></div><div>-- </div><div>Mehdi</div><div><br></div><div><br></div><div><br></div><div><br></div></div></div>