[llvm-dev] Removing LLVM_ALWAYS_INLINE from ADT classes (original) (raw)

Davide Italiano via llvm-dev llvm-dev at lists.llvm.org
Wed Jan 9 14🔞10 PST 2019


On Wed, Jan 9, 2019 at 9:38 AM Mehdi AMINI <joker.eph at gmail.com> wrote:

On Fri, Jan 4, 2019 at 3:15 PM 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 LLVMALWAYSINLINE 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 attribute((used)).

I need to sort out the details, but I like your idea (also, nullifies some of the raised objections). I'll try and let you know how it works out.

Thanks,

-- Davide



More information about the llvm-dev mailing list