[Bug tree-optimization/95565] [Feature request] add a flag to only instrument function entry.
hiraditya at msn dot com
gcc-bugzilla@gcc.gnu.org
Sat Jun 6 23:16:14 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95565
--- Comment #1 from AK <hiraditya at msn dot com> ---
I believe we need to conditionally disable the following code, but I'm not sure
of all the implications. If someone can implement it that'd be great.
```
gcc/gimplify.c Around Line:14997
x = builtin_decl_implicit (BUILT_IN_RETURN_ADDRESS);
call = gimple_build_call (x, 1, integer_zero_node);
tmp_var = create_tmp_var (ptr_type_node, "return_addr");
gimple_call_set_lhs (call, tmp_var);
gimplify_seq_add_stmt (&cleanup, call);
x = builtin_decl_implicit (BUILT_IN_PROFILE_FUNC_EXIT);
call = gimple_build_call (x, 2, this_fn_addr, tmp_var);
gimplify_seq_add_stmt (&cleanup, call);
tf = gimple_build_try (seq, cleanup, GIMPLE_TRY_FINALLY);
```
More information about the Gcc-bugs
mailing list