gcov: Add gen_counter_update()
commita350a74d6113e3a84943266eb691275951c109d9
authorSebastian Huber <sebastian.huber@embedded-brains.de>
Sat, 21 Oct 2023 13:52:15 +0000 (21 15:52 +0200)
committerSebastian Huber <sebastian.huber@embedded-brains.de>
Sat, 18 Nov 2023 11:45:06 +0000 (18 12:45 +0100)
tree6c21d34bb3f8c4266150b40feaeca89faeef9e53
parent3ef8882adcb1ab5fa535e9e1a2a28ea7c8eeca4f
gcov: Add gen_counter_update()

Move the counter update to the new gen_counter_update() helper function.  Use
it in gimple_gen_edge_profiler() and gimple_gen_time_profiler().  The resulting
gimple instructions should be identical with the exception of the removed
unshare_expr() call.  The unshare_expr() call was used in
gimple_gen_edge_profiler().

gcc/ChangeLog:

* tree-profile.cc (gen_assign_counter_update): New.
(gen_counter_update): Likewise.
(gimple_gen_edge_profiler): Use gen_counter_update().
(gimple_gen_time_profiler): Likewise.
gcc/tree-profile.cc