aboutsummaryrefslogtreecommitdiff
path: root/gcc/go/go-lang.c
diff options
context:
space:
mode:
authorAndrew MacLeod <amacleod@redhat.com>2020-11-04 12:59:15 -0500
committerAndrew MacLeod <amacleod@redhat.com>2020-11-04 13:07:53 -0500
commite86fd6a17cdb26710d1f13c9a47a3878c76028f9 (patch)
tree28e836b34524e1129f1ceb70527d301c8483fe53 /gcc/go/go-lang.c
parent9c1125c121423a9948fa39e71ef89ba4059a2fad (diff)
downloadgcc-e86fd6a17cdb26710d1f13c9a47a3878c76028f9.zip
gcc-e86fd6a17cdb26710d1f13c9a47a3878c76028f9.tar.gz
gcc-e86fd6a17cdb26710d1f13c9a47a3878c76028f9.tar.bz2
Add Ranger temporal cache
Add a timestamp to supplement the global range cache to detect when a value may become stale. gcc/ PR tree-optimization/97515 * gimple-range-cache.h (class ranger_cache): New prototypes plus temporal cache pointer. * gimple-range-cache.cc (struct range_timestamp): New. (class temporal_cache): New. (temporal_cache::temporal_cache): New. (temporal_cache::~temporal_cache): New. (temporal_cache::get_timestamp): New. (temporal_cache::set_dependency): New. (temporal_cache::temporal_value): New. (temporal_cache::current_p): New. (temporal_cache::set_timestamp): New. (temporal_cache::set_always_current): New. (ranger_cache::ranger_cache): Allocate the temporal cache. (ranger_cache::~ranger_cache): Free temporal cache. (ranger_cache::get_non_stale_global_range): New. (ranger_cache::set_global_range): Add a timestamp. (ranger_cache::register_dependency): New. Add timestamp dependency. * gimple-range.cc (gimple_ranger::range_of_range_op): Add operand dependencies. (gimple_ranger::range_of_phi): Ditto. (gimple_ranger::range_of_stmt): Check if global range is stale, and recalculate if so. gcc/testsuite/ * gcc.dg/pr97515.c: Check listing for folding of entire function.
Diffstat (limited to 'gcc/go/go-lang.c')
0 files changed, 0 insertions, 0 deletions