aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorAndrew Pinski <apinski@marvell.com>2021-07-05 20:13:48 -0700
committerAndrew Pinski <apinski@marvell.com>2021-07-09 00:17:46 -0700
commit5f2d3ff4e5e2ecd92f78467209ff266a8932acd7 (patch)
treee7a3d74601eb059592a4790658283542cadfa707 /gcc/ada
parent3b33b1136d5ba1903a56fa601a848accc3db46ef (diff)
downloadgcc-5f2d3ff4e5e2ecd92f78467209ff266a8932acd7.zip
gcc-5f2d3ff4e5e2ecd92f78467209ff266a8932acd7.tar.gz
gcc-5f2d3ff4e5e2ecd92f78467209ff266a8932acd7.tar.bz2
Improve early simplify and match for phiopt
Previously the idea was gimple_simplify_phiopt would call resimplify with a NULL sequence but that sometimes fails even if there was only one statement produced. The cases where it fails is when there are two simplifications happen. In the case of the min/max production, the first simplifcation produces: (convert (min @1 @2)) And then the convert is removed by a second one. The Min statement will be in the sequence while the op will be a SSA name. This was rejected before as could not produce something in the sequence. So this patch changes the way resimplify is called to always passing a pointer to the sequence and then decide based on if op is a SSA_NAME or not. OK? Bootstrapped and tested on x86_64-linux-gnu. gcc/ChangeLog: * tree-ssa-phiopt.c (phiopt_early_allow): Change arguments to take sequence and gimple_match_op. Accept the case where op is a SSA_NAME and one statement in the sequence. Also allow constants. (gimple_simplify_phiopt): Always pass a sequence to resimplify. Update call to phiopt_early_allow. Discard the sequence if not used.
Diffstat (limited to 'gcc/ada')
0 files changed, 0 insertions, 0 deletions