tree-optimization/109304 - properly handle instrumented aliases
authorRichard Biener <rguenther@suse.de>
Tue, 28 Mar 2023 08:06:12 +0000 (08:06 +0000)
committerMartin Liska <mliska@suse.cz>
Tue, 4 Apr 2023 07:01:21 +0000 (09:01 +0200)
commitd0b961b802dd7d9d555ff4515835a479329326e9
tree283e029ba5921fde7ad6cf760cc5bb5d1cd84aa4
parentd634e6088f139ee700d79ec73b1ad6436096a6ff
tree-optimization/109304 - properly handle instrumented aliases

When adjusting calls to reflect instrumentation we failed to handle
calls to aliases since they appear to have no body.  Instead resort
to symtab node availability.  The patch also avoids touching
internal function calls in a more obvious way (builtins might
have a body available).

profiledbootstrap & regtest running on x86_64-unknown-linux-gnu.

Honza - does this look OK?

PR tree-optimization/109304
* tree-profile.cc (tree_profiling): Use symtab node
availability to decide whether to skip adjusting calls.
Do not adjust calls to internal functions.

* gcc.dg/pr109304.c: New testcase.
gcc/testsuite/gcc.dg/pr109304.c [new file with mode: 0644]
gcc/tree-profile.cc