diff options
author | Andrew MacLeod <amacleod@redhat.com> | 2020-06-26 10:18:52 -0400 |
---|---|---|
committer | Andrew MacLeod <amacleod@redhat.com> | 2020-06-26 10:18:52 -0400 |
commit | f69ab586f69b0a3a73af12bdd71e18f81bc5ba4a (patch) | |
tree | 7f61f7f18dd5b7197cfbd15cff91312a2369bec1 /gcc/gimple-range-cache.h | |
parent | f67c1bddaf9f855a7d03d8c078fd734de96f7ade (diff) | |
download | gcc-devel/ranger.zip gcc-devel/ranger.tar.gz gcc-devel/ranger.tar.bz2 |
ranger restructuringdevel/ranger
Diffstat (limited to 'gcc/gimple-range-cache.h')
-rw-r--r-- | gcc/gimple-range-cache.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/gcc/gimple-range-cache.h b/gcc/gimple-range-cache.h index 7dfaf8f..39c7a99 100644 --- a/gcc/gimple-range-cache.h +++ b/gcc/gimple-range-cache.h @@ -21,6 +21,8 @@ along with GCC; see the file COPYING3. If not see #ifndef GCC_SSA_RANGE_CACHE_H #define GCC_SSA_RANGE_CACHE_H +#include "gimple-range-gori.h" + // This global cache is used with the range engine as markers for what // has been visited during this incarnation. Once the ranger evaluates // a name, it is typically not re-evaluated again. @@ -79,4 +81,30 @@ private: void process_name (tree name); }; +// THis class provides all the caches a global ranger may needs, and makes +// them available for gori-computes to query so outgoing edges can be +// properly calculated. +// +class ranger_cache : public gori_compute_cache +{ +public: + ranger_cache (); + ~ranger_cache (); + + virtual void ssa_range_in_bb (irange &r, tree name, basic_block bb); + bool block_range (irange &r, basic_block bb, tree name, bool calc = true); + + ssa_global_cache m_globals; + block_range_cache m_on_entry; + non_null_ref m_non_null; +private: + 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); + + vec<basic_block> m_workback; + vec<basic_block> m_update_list; + +}; + #endif // GCC_SSA_RANGE_CACHE_H |