Set discriminators for call stmts on the same line within the same basic block.
authorEugene Rozenfeld <erozen@microsoft.com>
Thu, 21 Apr 2022 23:43:24 +0000 (16:43 -0700)
committerEugene Rozenfeld <erozen@microsoft.com>
Fri, 7 Oct 2022 20:04:36 +0000 (13:04 -0700)
commitf30e9fd33e56a5a721346ea6140722e1b193db42
treec52d17b412b84ea2837099ab9efae088c31eae1c
parentb9ad850e86b863c24f6f4f5acf08d49944cc7bbe
Set discriminators for call stmts on the same line within the same basic block.

Call statements are possible split points of a basic block so they may end up
in different basic blocks by the time pass_ipa_auto_profile executes.

This change will also simplify call site lookups since now location with discriminator
will uniquely identify the call site (no callee function name is needed).

This change is based on commit 1e6c4a7a8fb8e20545bb9f9032d3854f3f794c18
by Dehao Chen in vendors/google/heads/gcc-4_8.

Tested on x86_64-pc-linux-gnu.

gcc/ChangeLog:
* tree-cfg.cc (assign_discriminators): Set discriminators for call stmts
on the same line within the same basic block.
gcc/tree-cfg.cc