https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97445

--- Comment #17 from Jan Hubicka <hubicka at ucw dot cz> ---
> The following happens:
> 
> get_order is called by kmalloc_large which is called in kmalloc. And kmalloc
> calls the function for larger allocations. Problem is that we eliminate all
> calls to get_order late
> 
> pipe.i.108t.thread1:;; Function get_order (get_order, funcdef_no=295,
> decl_uid=4528, cgraph_uid=300, symbol_order=303)
> pipe.i.108t.thread1:get_order (long unsigned int size)
> pipe.i.108t.thread1:  _125 = get_order (_114);
> pipe.i.108t.thread1:  _67 = get_order (_56);
> pipe.i.109t.cdce:;; Function get_order (get_order, funcdef_no=295,
> decl_uid=4396, cgraph_uid=300, symbol_order=303)
> pipe.i.109t.cdce:get_order (long unsigned int size)
> 
> so remove_unreachable_nodes is not called any more.
Yep, that is by design - we are already outputting functions to
assembler file, so there is not much we can do at this moent. Option
wold be to do threading early of course.  How often this happen in
practice?

Also note that -Winline outputs reasons why the static inline is not
inlined (which is also by design a decision of the inliner heuristics).
I suppose here the inliner sees the function called multiple times and
since it is quite long it decides to keep it offline.  Opitmizing all
references late if of course unfortunate.

Honza

Reply via email to