]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
fully populate the export list from range_cache, not gori_compute.
authorAndrew MacLeod <amacleod@redhat.com>
Tue, 25 May 2021 17:53:25 +0000 (13:53 -0400)
committerAndrew MacLeod <amacleod@redhat.com>
Tue, 25 May 2021 23:26:47 +0000 (19:26 -0400)
Ranger wants to prepopulate all the export blocks so that it has an initial
invariant set of names. GORI consumers shouldn't be penalized for ranger
requirements.  This way any gori client remains lightweight.

* gimple-range-cache.cc (ranger_cache::ranger_cache):  Move initial
export cache filling to here.
* gimple-range-gori.cc (gori_compute::gori_compute) : From Here.

gcc/gimple-range-cache.cc
gcc/gimple-range-gori.cc

index 2c922e32913ba4ab7e5441821b0b8d56db0350ba..8ad76048272fccce6d12c13034263f9e137d6c09 100644 (file)
@@ -618,6 +618,16 @@ ranger_cache::ranger_cache (gimple_ranger &q) : query (q)
   m_poor_value_list.safe_grow_cleared (20);
   m_poor_value_list.truncate (0);
   m_temporal = new temporal_cache;
+  unsigned x, lim = last_basic_block_for_fn (cfun);
+  // Calculate outgoing range info upfront.  This will fully populate the
+  // m_maybe_variant bitmap which will help eliminate processing of names
+  // which never have their ranges adjusted.
+  for (x = 0; x < lim ; x++)
+    {
+      basic_block bb = BASIC_BLOCK_FOR_FN (cfun, x);
+      if (bb)
+       exports (bb);
+    }
 }
 
 ranger_cache::~ranger_cache ()
index 074c025be370d107861b8041861ca2606133f554..e30049edfbd8c79035bf35d15c85e16cbc126812 100644 (file)
@@ -458,16 +458,6 @@ gori_compute::gori_compute ()
   // Create a boolean_type true and false range.
   m_bool_zero = int_range<2> (boolean_false_node, boolean_false_node);
   m_bool_one = int_range<2> (boolean_true_node, boolean_true_node);
-  unsigned x, lim = last_basic_block_for_fn (cfun);
-  // Calculate outgoing range info upfront.  This will fully populate the
-  // m_maybe_variant bitmap which will help eliminate processing of names
-  // which never have their ranges adjusted.
-  for (x = 0; x < lim ; x++)
-    {
-      basic_block bb = BASIC_BLOCK_FOR_FN (cfun, x);
-      if (bb)
-       exports (bb);
-    }
 }
 
 // Provide a default of VARYING for all incoming SSA names.