]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fix profile of forwarders produced by cd-dce
authorJan Hubicka <jh@suse.cz>
Mon, 26 Jun 2023 16:29:39 +0000 (18:29 +0200)
committerJan Hubicka <jh@suse.cz>
Mon, 26 Jun 2023 16:29:39 +0000 (18:29 +0200)
commitc2ebccc97190a978a44e341516b488f02a78c598
treed8c84f139ea447949f08cdaa229b7faa1b93623c
parent6eeb51979df383166f607258b814f9930168a8cd
Fix profile of forwarders produced by cd-dce

compiling the testcase from PR109849 (which uses std:vector based stack to
drive a loop) with profile feedbakc leads to profile mismatches introduced by
tree-ssa-dce.  This is the new code to produce unified forwarder blocks for
PHIs.

I am not including the testcase itself since
checking it for Invalid sum is probably going to be too fragile and this should
show in our LNT testers. The patch however fixes the mismatch.

Bootstrapped/regtested x86_64-linux and plan to commit it shortly.

gcc/ChangeLog:

PR tree-optimization/109849
* tree-ssa-dce.cc (make_forwarders_with_degenerate_phis): Fix profile
count of newly constructed forwarder block.
gcc/tree-ssa-dce.cc