aboutsummaryrefslogtreecommitdiff
path: root/gcc/function.cc
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2024-02-26 08:38:58 -0800
committerH.J. Lu <(no_default)>2024-04-03 06:49:45 -0700
commitcab32bacaea268ec062b1fb4fc662d90c9d1cfce (patch)
tree240030e282f60ff9bf545f1e2052a77d9ef7873a /gcc/function.cc
parent6f91cce9a314cd4bce16fe52a2ffbeb93d59320b (diff)
downloadgcc-cab32bacaea268ec062b1fb4fc662d90c9d1cfce.zip
gcc-cab32bacaea268ec062b1fb4fc662d90c9d1cfce.tar.gz
gcc-cab32bacaea268ec062b1fb4fc662d90c9d1cfce.tar.bz2
tree-profile: Disable indirect call profiling for IFUNC resolvers
We can't profile indirect calls to IFUNC resolvers nor their callees as it requires TLS which hasn't been set up yet when the dynamic linker is resolving IFUNC symbols. Add an IFUNC resolver caller marker to cgraph_node and set it if the function is called by an IFUNC resolver. Disable indirect call profiling for IFUNC resolvers and their callees. Tested with profiledbootstrap on Fedora 39/x86-64. gcc/ChangeLog: PR tree-optimization/114115 * cgraph.h (symtab_node): Add check_ifunc_callee_symtab_nodes. (cgraph_node): Add called_by_ifunc_resolver. * cgraphunit.cc (symbol_table::compile): Call symtab_node::check_ifunc_callee_symtab_nodes. * symtab.cc (check_ifunc_resolver): New. (ifunc_ref_map): Likewise. (is_caller_ifunc_resolver): Likewise. (symtab_node::check_ifunc_callee_symtab_nodes): Likewise. * tree-profile.cc (gimple_gen_ic_func_profiler): Disable indirect call profiling for IFUNC resolvers and their callees. gcc/testsuite/ChangeLog: PR tree-optimization/114115 * gcc.dg/pr114115.c: New test.
Diffstat (limited to 'gcc/function.cc')
0 files changed, 0 insertions, 0 deletions