https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116743
--- Comment #8 from Rama Malladi <rvmallad at amazon dot com> --- Here attached is a compilation unit extracted from `MySQL` repo (https://github.com/mysql/mysql-server/blob/trunk/storage/innobase/handler/ha_innodb.cc) which shows the impact of commit `3d9e6767939e` on function inlining. Could you please investigate @erozen? THanks Versions being compared: GCC 12.3.0 vs. GCC 12.3.0 w `3d9e6767939e` reverted. Compilation command: g++ ha_innodb.gcc12.i -O3 -fauto-profile=./mysqld.gcov -fopt-info-inline-optimized-missed -ffunction-sections -fdata-sections -std=c++17 -fno-omit-frame-pointer -ffp-contract=off -fno-tree-slp-vectorize -march=armv8.2-a -falign-jumps=32 -falign-loops=32 -falign-functions=32 GCC 12.3.0: ---------- ha_innodb.cc:8604:43: missed: not inlinable: void ha_innobase::build_template(bool)/15930 -> const Field* build_template_needs_field(bool, bool, bool, bool, dict_index_t*, const TABLE*, ulint, ulint)/15926, call is unlikely and code size would grow ha_innodb.cc:8547:45: missed: not inlinable: void ha_innobase::build_template(bool)/15930 -> const Field* build_template_needs_field(bool, bool, bool, bool, dict_index_t*, const TABLE*, ulint, ulint)/15926, call is unlikely and code size would grow ha_innodb.cc:8467:45: missed: not inlinable: void ha_innobase::build_template(bool)/15930 -> const Field* build_template_needs_field(bool, bool, bool, bool, dict_index_t*, const TABLE*, ulint, ulint)/15926, call is unlikely and code size would grow ---------- GCC 12.3.0 revert 3d9e6767939e: ------------------------------ ha_innodb.cc:8604:43: optimized: Inlined const Field* build_template_needs_field(bool, bool, bool, bool, dict_index_t*, const TABLE*, ulint, ulint)/32806 into void ha_innobase::build_template(bool)/15930 which now has time 5433698136.000000 and size 424, net change of +24. ha_innodb.cc:8467:45: optimized: Inlined const Field* build_template_needs_field(bool, bool, bool, bool, dict_index_t*, const TABLE*, ulint, ulint)/32823 into void ha_innobase::build_template(bool)/15930 which now has time 5491353480.000000 and size 448, net change of +24. ha_innodb.cc:8547:45: optimized: Inlined const Field* build_template_needs_field(bool, bool, bool, bool, dict_index_t*, const TABLE*, ulint, ulint)/15926 into void ha_innobase::build_template(bool)/15930 which now has time 5516318944.000000 and size 491, net change of -15. ------------------------------