From: Andrew MacLeod Date: Tue, 8 Jun 2021 13:43:17 +0000 (-0400) Subject: Don't process lookups for debug statements in Ranger. X-Git-Tag: releases/gcc-11.2.0~55 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=263a7e20c88a35bdfaebfac3c9abb313c5867590;p=thirdparty%2Fgcc.git 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. --- diff --git a/gcc/gimple-range.cc b/gcc/gimple-range.cc index 6158a754dd66..fd7fa5e3dbbf 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);