diff options
author | Andrew MacLeod <amacleod@redhat.com> | 2021-12-03 11:02:19 -0500 |
---|---|---|
committer | Andrew MacLeod <amacleod@redhat.com> | 2021-12-06 13:27:10 -0500 |
commit | 14dc5b71d7e845be4ac21b16e849d6689df81b67 (patch) | |
tree | 5fbb2fe9eca38e8c1debb1f0909876668d36da30 /gcc/gimple-range-cache.h | |
parent | ed4a5f571bd3a49c495d1b08b42c8c01833061e6 (diff) | |
download | gcc-14dc5b71d7e845be4ac21b16e849d6689df81b67.zip gcc-14dc5b71d7e845be4ac21b16e849d6689df81b67.tar.gz gcc-14dc5b71d7e845be4ac21b16e849d6689df81b67.tar.bz2 |
Use dominators to reduce cache-flling.
Before walking the CFG and filling all cache entries, check if the
same information is available in a dominator.
* gimple-range-cache.cc (ranger_cache::fill_block_cache): Check for
a range from dominators before filling the cache.
(ranger_cache::range_from_dom): New.
* gimple-range-cache.h (ranger_cache::range_from_dom): Add prototype.
Diffstat (limited to 'gcc/gimple-range-cache.h')
-rw-r--r-- | gcc/gimple-range-cache.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/gimple-range-cache.h b/gcc/gimple-range-cache.h index eb7a875..2c52a0b 100644 --- a/gcc/gimple-range-cache.h +++ b/gcc/gimple-range-cache.h @@ -98,6 +98,7 @@ public: 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 range_from_dom (irange &r, tree name, basic_block bb); bool get_global_range (irange &r, tree name) const; bool get_global_range (irange &r, tree name, bool ¤t_p); |