]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fix discriminators of gimple PHI arguments
authorJan Hubicka <hubicka@ucw.cz>
Tue, 30 Sep 2025 12:51:39 +0000 (14:51 +0200)
committerJan Hubicka <hubicka@ucw.cz>
Tue, 30 Sep 2025 12:51:39 +0000 (14:51 +0200)
commitab015c2a0ce2c33f1963bf47d2d437affdf264ff
tree53962f22cf9719f6238b90e3b0622a7cdb7c5d55
parent69ac957ea56ad4b98baa8a6ca52ad0729b3358e0
Fix discriminators of gimple PHI arguments

while gimple PHI itself does not have locations, the arguments does and they
can be used to determine count of edges in CFG.  Assign_discriminators already
knows how to handle goto_locus and PHI args should be handled same way as
done by this patch.

Bootstrapped/regtested x86_64-linux, comitted.

gcc/ChangeLog:

* auto-profile.cc (function_instance::match): Sanity check
that gimple PHI has no location.
* tree-cfg.cc (assign_discriminators): Also remap locations
of gimple PHI arguments.
gcc/auto-profile.cc
gcc/tree-cfg.cc