[llvm-dev] Removing LLVM_ALWAYS_INLINE from ADT classes

Jonas Devlieghere via llvm-dev llvm-dev at lists.llvm.org
Mon Jan 7 13:49:00 PST 2019


On Mon, Jan 7, 2019 at 1:47 PM Mehdi AMINI <joker.eph at gmail.com> wrote:

>
>
> On Mon, Jan 7, 2019 at 1:46 PM Jonas Devlieghere <jonas at devlieghere.com>
> wrote:
>
>>
>>
>> On Mon, Jan 7, 2019 at 8:33 AM via llvm-dev <llvm-dev at lists.llvm.org>
>> wrote:
>>
>>> IIRC the issues with defaulting to –DLLVM_OPTIMIZE_TABLEGEN=ON came up
>>> in two places:
>>>
>>> First, if it's not a Debug build, this actually slows down the build.
>>> The defaulting has to be for Debug config only.  This is arguably bad UI,
>>> because it makes the default modal, but there's a clear benefit in build
>>> time so I think we can live with that.
>>>
>>> Second, if it's a multi-config builder (e.g. MSBuild) then it gets a
>>> little weird, I don't remember exactly how.
>>>
>>> --paulr
>>>
>>
>> Out of curiosity, why does it slow down a non-debug build?
>>
>
> The way it is implemented is to create another build directory inside the
> build directory (called "native" IIRC) and call cmake into it and build
> llvm-tblgen there. However that means that a library like Support is built
> here before being rebuilt in the main build directory.
>

I see, thanks!


> --
> Mehdi
>
>
>>
>>
>>>
>>>
>>> *From:* llvm-dev [mailto:llvm-dev-bounces at lists.llvm.org] *On Behalf Of
>>> *Mehdi AMINI via llvm-dev
>>> *Sent:* Saturday, January 05, 2019 7:42 PM
>>> *To:* Paweł Bylica; Chris Bieneman
>>> *Cc:* LLVM Dev
>>> *Subject:* Re: [llvm-dev] Removing LLVM_ALWAYS_INLINE from ADT classes
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Fri, Jan 4, 2019 at 3:52 PM Paweł Bylica via llvm-dev <
>>> llvm-dev at lists.llvm.org> wrote:
>>>
>>> On Sat, Jan 5, 2019 at 12:38 AM Duncan P. N. Exon Smith via llvm-dev <
>>> llvm-dev at lists.llvm.org> wrote:
>>>
>>> This makes sense to me.
>>>
>>> One concern is that this in itself will slow down the build, since
>>> tablegen will get even slower.  Ideally, there would be some (perhaps
>>> default?) configuration where we build the tablegen binaries with
>>> optimizations on and then use them in the build, as if we were
>>> cross-compiling.
>>>
>>>
>>>
>>> Maybe something simple like -DLLVM_OPTIMIZE_TABLEGEN=ON (enabled by
>>> default for Debug builds). You would need to set it to off only if you want
>>> to debug tablegen.
>>>
>>>
>>>
>>> I proposed this a while back, but it think there were some problems with
>>> it, I don't remember what exactly but maybe related to bootstrapping /
>>> 2-stages builds?
>>>
>>>
>>>
>>> + Chris, maybe he remembers something?
>>>
>>>
>>>
>>> --
>>>
>>> Mehdi
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> > On Jan 4, 2019, at 15:14, Davide Italiano via llvm-dev <
>>> llvm-dev at lists.llvm.org> wrote:
>>> >
>>> > Hi,
>>> > I would like to propose, based on a previous discussion on llvm-dev,
>>> > the following change.
>>> > https://reviews.llvm.org/D56337
>>> >
>>> > The main motivation for annotating member functions of ADT clases with
>>> > LLVM_ALWAYS_INLINE  was that of speeding up `check-llvm` at `-O0`.
>>> > Turns out this significantly degrades the debuggability of fundamental
>>> > classes in llvm itself, e.g. StringRef or SmallVector.
>>> >
>>> > After discussing we agreed that it's reasonable to drop
>>> > LLVM_ALWYAS_INLINE from ADT classes  member functions and add a note
>>> > in the developer's manual.
>>> >
>>> > If you have any feedbacks or concerns, please speak up.
>>> > If nothing major arises, I'm going to commit this patch in a week (or
>>> such).
>>> >
>>> > Thanks for your time,
>>> >
>>> > --
>>> > Davide
>>> >
>>> > "There are no solved problems; there are only problems that are more
>>> > or less solved" -- Henri Poincare
>>> > _______________________________________________
>>> > LLVM Developers mailing list
>>> > llvm-dev at lists.llvm.org
>>> > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>>>
>>> _______________________________________________
>>> LLVM Developers mailing list
>>> llvm-dev at lists.llvm.org
>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>>>
>>> _______________________________________________
>>> LLVM Developers mailing list
>>> llvm-dev at lists.llvm.org
>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>>>
>>> _______________________________________________
>>> LLVM Developers mailing list
>>> llvm-dev at lists.llvm.org
>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190107/18f556a8/attachment-0001.html>


More information about the llvm-dev mailing list