Short cut version to disable processing of debug statements by ranger in
GCC 11.
Although PR 100781 is not an issue in GCC11, its possible that a similar
situation may arise. The identical fix cannot be easily introduced.
With EVRP always running in hybrid mode, there is no need for ranger to
spawn a lookup for a debug statement in this release.
bootstrapped with no regressions on x86_64-pc-linux-gnu. pushed.
Andrew
>From 263a7e20c88a35bdfaebfac3c9abb313c5867590 Mon Sep 17 00:00:00 2001
From: Andrew MacLeod <amacl...@redhat.com>
Date: Tue, 8 Jun 2021 09:43:17 -0400
Subject: [PATCH 4/8] Don't process lookups for debug statements in Ranger.
Although PR 100781 is not an issue in GCC11, its possible that a similar
situation may arise. The identical fix cannot be easily introduced.
With EVRP always running in hybrid mode, there is no need for ranger to
spawn a lookup for a debug statement in this release.
* gimple-range.cc (gimple_ranger::range_of_expr): Treat debug statments
as contextless queries to avoid additional lookups.
---
gcc/gimple-range.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/gimple-range.cc b/gcc/gimple-range.cc
index 6158a754dd6..fd7fa5e3dbb 100644
--- a/gcc/gimple-range.cc
+++ b/gcc/gimple-range.cc
@@ -945,7 +945,7 @@ gimple_ranger::range_of_expr (irange &r, tree expr, gimple *stmt)
return get_tree_range (r, expr);
// If there is no statement, just get the global value.
- if (!stmt)
+ if (!stmt || is_gimple_debug (stmt))
{
if (!m_cache.get_global_range (r, expr))
r = gimple_range_global (expr);
--
2.17.2