aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple-range-fold.cc
diff options
context:
space:
mode:
authorAndrew MacLeod <amacleod@redhat.com>2023-08-17 12:34:59 -0400
committerAndrew MacLeod <amacleod@redhat.com>2023-08-23 14:47:22 -0400
commit0cfc9c953d0221ec3971a25e6509ebe1041f142e (patch)
treee29b93984e0b0a6dbb98449ec8d46da607ba0d86 /gcc/gimple-range-fold.cc
parente5f83a200702466adbfdedd57aa2e9e5acb8953d (diff)
downloadgcc-0cfc9c953d0221ec3971a25e6509ebe1041f142e.zip
gcc-0cfc9c953d0221ec3971a25e6509ebe1041f142e.tar.gz
gcc-0cfc9c953d0221ec3971a25e6509ebe1041f142e.tar.bz2
Phi analyzer - Initialize with range instead of a tree.
Rangers PHI analyzer currently only allows a single initializer to a group. This patch changes that to use an inialization range, which is cumulative of all integer constants, plus a single symbolic value. There is no other change to group functionality. This patch also changes the way PHI groups are printed so they show up in the listing as they are encountered, rather than as a list at the end. It was more difficult to see what was going on previously. PR tree-optimization/110918 - Initialize with range instead of a tree. gcc/ * gimple-range-fold.cc (fold_using_range::range_of_phi): Tweak output. * gimple-range-phi.cc (phi_group::phi_group): Remove unused members. Initialize using a range instead of value and edge. (phi_group::calculate_using_modifier): Use initializer value and process for relations after trying for iteration convergence. (phi_group::refine_using_relation): Use initializer range. (phi_group::dump): Rework the dump output. (phi_analyzer::process_phi): Allow multiple constant initilizers. Dump groups immediately as created. (phi_analyzer::dump): Tweak output. * gimple-range-phi.h (phi_group::phi_group): Adjust prototype. (phi_group::initial_value): Delete. (phi_group::refine_using_relation): Adjust prototype. (phi_group::m_initial_value): Delete. (phi_group::m_initial_edge): Delete. (phi_group::m_vr): Use int_range_max. * tree-vrp.cc (execute_ranger_vrp): Don't dump phi groups. gcc/testsuite/ * gcc.dg/pr102983.c: Adjust output expectations. * gcc.dg/pr110918.c: New.
Diffstat (limited to 'gcc/gimple-range-fold.cc')
-rw-r--r--gcc/gimple-range-fold.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/gimple-range-fold.cc b/gcc/gimple-range-fold.cc
index 7fa5a27..8ebff7f 100644
--- a/gcc/gimple-range-fold.cc
+++ b/gcc/gimple-range-fold.cc
@@ -953,7 +953,7 @@ fold_using_range::range_of_phi (vrange &r, gphi *phi, fur_source &src)
{
if (dump_file && (dump_flags & TDF_DETAILS))
{
- fprintf (dump_file, " Loops range found for ");
+ fprintf (dump_file, "Loops range found for ");
print_generic_expr (dump_file, phi_def, TDF_SLIM);
fprintf (dump_file, ": ");
loop_range.dump (dump_file);
@@ -975,9 +975,9 @@ fold_using_range::range_of_phi (vrange &r, gphi *phi, fur_source &src)
{
if (dump_file && (dump_flags & TDF_DETAILS))
{
- fprintf (dump_file, " PHI group range found for ");
+ fprintf (dump_file, "PHI GROUP query for ");
print_generic_expr (dump_file, phi_def, TDF_SLIM);
- fprintf (dump_file, ": ");
+ fprintf (dump_file, " found : ");
g->range ().dump (dump_file);
fprintf (dump_file, " and adjusted original range from :");
r.dump (dump_file);