[llvm-dev] Removing LLVM_ALWAYS_INLINE from ADT classes
Mehdi AMINI via llvm-dev
llvm-dev at lists.llvm.org
Wed Jan 9 09:37:54 PST 2019
On Fri, Jan 4, 2019 at 3:15 PM Davide Italiano via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> I would like to propose, based on a previous discussion on llvm-dev,
> the following change.
> 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.
It seems that the issue is not a problem with the inlining these functions
but rather that they aren't emitted when inlined and so can't be called
from the debugger.
An alternative that preserves the inlining for the performance aspect *and*
still emit them in debug build so that they are available in debug builds
would be another macro that would expand to something like
> 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
> Thanks for your time,
> "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
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev