From 14dc5b71d7e845be4ac21b16e849d6689df81b67 Mon Sep 17 00:00:00 2001 From: Andrew MacLeod Date: Fri, 3 Dec 2021 11:02:19 -0500 Subject: 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. --- gcc/gimple-range-cache.h | 1 + 1 file changed, 1 insertion(+) (limited to 'gcc/gimple-range-cache.h') 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); -- cgit v1.1