aboutsummaryrefslogtreecommitdiff
path: root/gcc/value-query.cc
diff options
context:
space:
mode:
authorAndrew MacLeod <amacleod@redhat.com>2023-07-16 12:46:00 -0400
committerAndrew MacLeod <amacleod@redhat.com>2023-07-28 16:28:20 -0400
commit619641397a558bf65c24b99a4c52878bd940fcbe (patch)
treef23d8e66d946c2e11a26a64563de8a8e300eaffc /gcc/value-query.cc
parent7905c071c35070fff3397b1e24f140c128c08e64 (diff)
downloadgcc-619641397a558bf65c24b99a4c52878bd940fcbe.zip
gcc-619641397a558bf65c24b99a4c52878bd940fcbe.tar.gz
gcc-619641397a558bf65c24b99a4c52878bd940fcbe.tar.bz2
Remove value_query, push into sub&fold class
* tree-ssa-propagate.cc (substitute_and_fold_engine::value_on_edge): Move from value-query.cc. (substitute_and_fold_engine::value_of_stmt): Ditto. (substitute_and_fold_engine::range_of_expr): New. * tree-ssa-propagate.h (substitute_and_fold_engine): Inherit from range_query. New prototypes. * value-query.cc (value_query::value_on_edge): Relocate. (value_query::value_of_stmt): Ditto. * value-query.h (class value_query): Remove. (class range_query): Remove base class. Adjust prototypes.
Diffstat (limited to 'gcc/value-query.cc')
-rw-r--r--gcc/value-query.cc21
1 files changed, 0 insertions, 21 deletions
diff --git a/gcc/value-query.cc b/gcc/value-query.cc
index adef934..0870d6c 100644
--- a/gcc/value-query.cc
+++ b/gcc/value-query.cc
@@ -33,27 +33,6 @@ along with GCC; see the file COPYING3. If not see
#include "gimple-range.h"
#include "value-range-storage.h"
-// value_query default methods.
-
-tree
-value_query::value_on_edge (edge, tree expr)
-{
- return value_of_expr (expr);
-}
-
-tree
-value_query::value_of_stmt (gimple *stmt, tree name)
-{
- if (!name)
- name = gimple_get_lhs (stmt);
-
- gcc_checking_assert (!name || name == gimple_get_lhs (stmt));
-
- if (name)
- return value_of_expr (name);
- return NULL_TREE;
-}
-
// range_query default methods.
bool