]> gcc.gnu.org Git - gcc.git/blobdiff - gcc/gimple-range-cache.h
Bind(C): Fix type encodings in ISO_Fortran_binding.h
[gcc.git] / gcc / gimple-range-cache.h
index 599a2926b53598251ac4d95a7ca621e513264f9f..f842e9c092aa4b8cc9e517228c5877639cd4f0c2 100644 (file)
@@ -1,5 +1,5 @@
 /* Header file for gimple ranger SSA cache.
-   Copyright (C) 2017-2020 Free Software Foundation, Inc.
+   Copyright (C) 2017-2021 Free Software Foundation, Inc.
    Contributed by Andrew MacLeod <amacleod@redhat.com>.
 
 This file is part of GCC.
@@ -33,7 +33,9 @@ class non_null_ref
 public:
   non_null_ref ();
   ~non_null_ref ();
-  bool non_null_deref_p (tree name, basic_block bb);
+  bool non_null_deref_p (tree name, basic_block bb, bool search_dom = true);
+  bool adjust_range (irange &r, tree name, basic_block bb,
+                    bool search_dom = true);
 private:
   vec <bitmap> m_nn;
   void process_name (tree name);
@@ -50,8 +52,7 @@ public:
   block_range_cache ();
   ~block_range_cache ();
 
-  void set_bb_range (tree name, const basic_block bb, const irange &r);
-  void set_bb_varying (tree name, const basic_block bb);
+  bool set_bb_range (tree name, const basic_block bb, const irange &r);
   bool get_bb_range (irange &r, tree name, const basic_block bb);
   bool bb_range_p (tree name, const basic_block bb);
 
@@ -62,6 +63,7 @@ private:
   ssa_block_ranges &get_block_ranges (tree name);
   ssa_block_ranges *query_block_ranges (tree name);
   irange_allocator *m_irange_allocator;
+  bitmap_obstack m_bitmaps;
 };
 
 // This global cache is used with the range engine as markers for what
@@ -74,7 +76,7 @@ public:
   ssa_global_cache ();
   ~ssa_global_cache ();
   bool get_global_range (irange &r, tree name) const;
-  void set_global_range (tree name, const irange &r);
+  bool set_global_range (tree name, const irange &r);
   void clear_global_range (tree name);
   void clear ();
   void dump (FILE *f = stderr);
@@ -87,41 +89,43 @@ private:
 // them available for gori-computes to query so outgoing edges can be
 // properly calculated.
 
-class ranger_cache : public gori_compute_cache
+class ranger_cache : public range_query
 {
 public:
-  ranger_cache (class range_query &q);
+  ranger_cache ();
   ~ranger_cache ();
 
-  virtual void ssa_range_in_bb (irange &r, tree name, basic_block bb);
+  virtual bool range_of_expr (irange &r, tree name, gimple *stmt);
+  virtual bool range_on_edge (irange &r, edge e, tree expr);
   bool block_range (irange &r, basic_block bb, tree name, bool calc = true);
 
   bool get_global_range (irange &r, tree name) const;
+  bool get_non_stale_global_range (irange &r, tree name);
   void set_global_range (tree name, const irange &r);
 
+  bool enable_new_values (bool state);
   non_null_ref m_non_null;
+  gori_compute m_gori;
 
-  void dump (FILE *f, bool dump_gori = true);
-  void dump (FILE *f, basic_block bb);
+  void dump_bb (FILE *f, basic_block bb);
+  virtual void dump (FILE *f) OVERRIDE;
 private:
   ssa_global_cache m_globals;
   block_range_cache m_on_entry;
+  class temporal_cache *m_temporal;
   void add_to_update (basic_block bb);
   void fill_block_cache (tree name, basic_block bb, basic_block def_bb);
-  void iterative_cache_update (tree name);
+  void propagate_cache (tree name);
+
+  void range_of_def (irange &r, tree name, basic_block bb = NULL);
+  void entry_range (irange &r, tree expr, basic_block bb);
+  void exit_range (irange &r, tree expr, basic_block bb);
 
+  void propagate_updated_value (tree name, basic_block bb);
+
+  bitmap m_propfail;
   vec<basic_block> m_workback;
   vec<basic_block> m_update_list;
-
-  // Iterative "poor value" calculations.
-  struct update_record
-  {
-    basic_block bb;    // Block which value needs to be calculated in.
-    tree calc;         // SSA_NAME which needs its value calculated.
-  };
-  bool push_poor_value (basic_block bb, tree name);
-  vec<update_record> m_poor_value_list;
-  class range_query &query;
 };
 
 #endif // GCC_SSA_RANGE_CACHE_H
This page took 0.03685 seconds and 5 git commands to generate.