public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r11-8747] Don't process lookups for debug statements in Ranger.
@ 2021-07-14 21:58 Andrew Macleod
  0 siblings, 0 replies; only message in thread
From: Andrew Macleod @ 2021-07-14 21:58 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:263a7e20c88a35bdfaebfac3c9abb313c5867590

commit r11-8747-g263a7e20c88a35bdfaebfac3c9abb313c5867590
Author: Andrew MacLeod <amacleod@redhat.com>
Date:   Tue Jun 8 09:43:17 2021 -0400

    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:
---
 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);


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-07-14 21:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-14 21:58 [gcc r11-8747] Don't process lookups for debug statements in Ranger Andrew Macleod

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).