diff options
author | Andrew MacLeod <amacleod@redhat.com> | 2024-05-30 09:40:46 -0400 |
---|---|---|
committer | Andrew MacLeod <amacleod@redhat.com> | 2024-06-11 08:26:08 -0400 |
commit | 2f0c09c00b8ccf41c27d4b7ba0cafdeb99242a29 (patch) | |
tree | d882acafbbf610ff0a2527c5543a300e2475d01d | |
parent | 84c87d1f43091c2e537182d029db9739de518096 (diff) | |
download | gcc-2f0c09c00b8ccf41c27d4b7ba0cafdeb99242a29.zip gcc-2f0c09c00b8ccf41c27d4b7ba0cafdeb99242a29.tar.gz gcc-2f0c09c00b8ccf41c27d4b7ba0cafdeb99242a29.tar.bz2 |
scev query mismatch message
Add a message to the listing if SCEV is not invoked because of a
range_query mismatch
* gimple-range-fold.cc (range_of_ssa_name_with_loop_info): Issue a
message if SCEV is not invoked due to a mismatch.
-rw-r--r-- | gcc/gimple-range-fold.cc | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/gcc/gimple-range-fold.cc b/gcc/gimple-range-fold.cc index 98a4877..6037c29 100644 --- a/gcc/gimple-range-fold.cc +++ b/gcc/gimple-range-fold.cc @@ -1267,9 +1267,18 @@ fold_using_range::range_of_ssa_name_with_loop_info (vrange &r, tree name, // SCEV currently invokes get_range_query () for values. If the query // being passed in is not the same SCEV will use, do not invoke SCEV. // This can be remove if/when SCEV uses a passed in range-query. - if (src.query () != get_range_query (cfun) - || !range_of_var_in_loop (r, name, l, phi, src.query ())) - r.set_varying (TREE_TYPE (name)); + if (src.query () != get_range_query (cfun)) + { + r.set_varying (TREE_TYPE (name)); + // Report the msmatch if SRC is not the global query. The cache + // uses a global query and would provide numerous false positives. + if (dump_file && (dump_flags & TDF_DETAILS) + && src.query () != get_global_range_query ()) + fprintf (dump_file, + "fold_using-range:: SCEV not invoked due to mismatched queries\n"); + } + else if (!range_of_var_in_loop (r, name, l, phi, src.query ())) + r.set_varying (TREE_TYPE (name)); } // ----------------------------------------------------------------------- |