aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple-range.h
diff options
context:
space:
mode:
authorAndrew MacLeod <amacleod@redhat.com>2021-11-01 13:32:11 -0400
committerAndrew MacLeod <amacleod@redhat.com>2021-11-03 10:01:21 -0400
commitfc4076752067fb400b43adbd629081df658da246 (patch)
tree4df0890738e8abd42d6e29e743b072c880135572 /gcc/gimple-range.h
parent1967fd8f2197f2b0334ab0fbc26abc3d9efe56c9 (diff)
downloadgcc-fc4076752067fb400b43adbd629081df658da246.zip
gcc-fc4076752067fb400b43adbd629081df658da246.tar.gz
gcc-fc4076752067fb400b43adbd629081df658da246.tar.bz2
Provide some context to folding via ranger.
Provide an internal mechanism to supply context to range_of_expr for calls to ::fold_stmt. * gimple-range.cc (gimple_ranger::gimple_ranger): Initialize current_bb. (gimple_ranger::range_of_expr): Pick up range_on_entry when there is no explcit context and current_bb is set. (gimple_ranger::fold_stmt): New. * gimple-range.h (current_bb, fold_stmt): New. * tree-vrp.c (rvrp_folder::fold_stmt): Call ranger's fold_stmt.
Diffstat (limited to 'gcc/gimple-range.h')
-rw-r--r--gcc/gimple-range.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/gimple-range.h b/gcc/gimple-range.h
index 0713af4..615496e 100644
--- a/gcc/gimple-range.h
+++ b/gcc/gimple-range.h
@@ -58,10 +58,12 @@ public:
void debug ();
void dump_bb (FILE *f, basic_block bb);
auto_edge_flag non_executable_edge_flag;
+ bool fold_stmt (gimple_stmt_iterator *gsi, tree (*) (tree));
protected:
bool fold_range_internal (irange &r, gimple *s, tree name);
ranger_cache m_cache;
range_tracer tracer;
+ basic_block current_bb;
};
/* Create a new ranger instance and associate it with a function.