This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Auto inlining with only -O2?


Hi all,

I'm using gcc-4.1.1 to compile glibc. In the nptl threads library, the
static function "allocate_stack" (in allocatestack.c which is #included
into pthread_create.c) is being integrated into "__pthread_create_2_1"
when pthread_create.c is compiled. In the build log, it's clear that the
optimization is -O2, and no -f... option is specified to request
inlining. Neither function has any special attributes. The object file
has no allocatestack symbol, and it's obvious that the code is in the
middle of pthread_create.

Does this kind of integration happen when a static function has but a
single caller, even if inlining isn't requested? If so, is this
documented somewhere?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]