diff options
author | Aldy Hernandez <aldyh@redhat.com> | 2021-09-24 12:42:05 +0200 |
---|---|---|
committer | Aldy Hernandez <aldyh@redhat.com> | 2021-09-24 16:49:51 +0200 |
commit | 55b3299dcd1e863843079223967f20da5ff0af78 (patch) | |
tree | d3ba7bb9cd9c6a11bdade6ece6116eb1748cb7ae | |
parent | 9b11107ed72ca543af41dbb3226e16b61d31b098 (diff) | |
download | gcc-55b3299dcd1e863843079223967f20da5ff0af78.tar.gz |
path solver: Avoid further lookups when range is defined in block.
If an SSA is defined in the current block, there is no need to query
range_on_path_entry for additional information.
gcc/ChangeLog:
* gimple-range-path.cc (path_range_query::path_range_query):
Move debugging header...
(path_range_query::precompute_ranges): ...here.
(path_range_query::internal_range_of_expr): Do not call
range_on_path_entry if NAME is defined in the current block.
-rw-r--r-- | gcc/gimple-range-path.cc | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/gcc/gimple-range-path.cc b/gcc/gimple-range-path.cc index d9704c8f86b..0738a5ca159 100644 --- a/gcc/gimple-range-path.cc +++ b/gcc/gimple-range-path.cc @@ -39,9 +39,6 @@ along with GCC; see the file COPYING3. If not see path_range_query::path_range_query (gimple_ranger &ranger, bool resolve) : m_ranger (ranger) { - if (DEBUG_SOLVER) - fprintf (dump_file, "\n*********** path_range_query ******************\n"); - m_cache = new ssa_global_cache; m_has_cache_entry = BITMAP_ALLOC (NULL); m_path = NULL; @@ -173,9 +170,6 @@ path_range_query::internal_range_of_expr (irange &r, tree name, gimple *stmt) if (TREE_CODE (name) == SSA_NAME) r.intersect (gimple_range_global (name)); - if (m_resolve && r.varying_p ()) - range_on_path_entry (r, name); - set_cache (r, name); return true; } @@ -467,6 +461,9 @@ void path_range_query::precompute_ranges (const vec<basic_block> &path, const bitmap_head *imports) { + if (DEBUG_SOLVER) + fprintf (dump_file, "\n*********** path_range_query ******************\n"); + set_path (path); bitmap_copy (m_imports, imports); m_undefined_path = false; |