summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2016-06-17 14:49:47 -0400
committerJason Merrill <jason@redhat.com>2016-06-21 21:50:22 +0300
commit9ca3f11916bf56f56a1d0ca3890caba52b1ec52a (patch)
tree1a1d000cd76fb6a2e9105cfc1a7dd0add4109516
parent38f39fe8cb908026fe67e5acf5e8f45167e292ff (diff)
downloadgcc-9ca3f11916bf56f56a1d0ca3890caba52b1ec52a.tar.gz
remove-assumptions
-rw-r--r--gcc/cp/constraint.cc17
-rw-r--r--gcc/cp/cp-tree.h16
-rw-r--r--gcc/cp/pt.c12
-rw-r--r--gcc/cp/ptree.c1
4 files changed, 1 insertions, 45 deletions
diff --git a/gcc/cp/constraint.cc b/gcc/cp/constraint.cc
index afa64a78bbf..1343b6a3104 100644
--- a/gcc/cp/constraint.cc
+++ b/gcc/cp/constraint.cc
@@ -1173,10 +1173,6 @@ build_constraints (tree tmpl_reqs, tree decl_reqs)
ci->declarator_reqs = decl_reqs;
ci->associated_constr = conjoin_constraints (tmpl_reqs, decl_reqs);
- /* FIXME: I'm not using these any more. */
- ci->normalized_constr = NULL_TREE;
- ci->assumptions = NULL_TREE;
-
return (tree)ci;
}
@@ -2200,10 +2196,6 @@ satisfy_associated_constraints (tree ci, tree args)
if (args && uses_template_parms (args))
return boolean_true_node;
- /* Don't memoize this kind of result. */
- if (!valid_constraints_p (ci))
- return boolean_false_node;
-
/* Check if we've seen a previous result. */
if (tree prev = lookup_constraint_satisfaction (ci, args))
return prev;
@@ -2994,15 +2986,8 @@ diagnose_declaration_constraints (location_t loc, tree decl, tree args)
args = TI_ARGS (ti);
}
- /* Check that the constraints are actually valid. */
- tree ci = get_constraints (decl);
- if (!valid_constraints_p (ci))
- {
- inform (loc, " invalid constraints");
- return;
- }
-
/* Recursively diagnose the associated constraints. */
+ tree ci = get_constraints (decl);
tree t = CI_ASSOCIATED_CONSTRAINTS (ci);
diagnose_constraint (loc, t, t, args);
}
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 1e5ec478d9f..56ffb39e0ab 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -893,10 +893,6 @@ struct GTY(()) tree_template_info {
// - a constraint expression introduced by a function declarator
// - the associated constraints, which are the conjunction of those,
// and used for declaration matching
-// - the cached normalized associated constraints which are used
-// to support satisfaction and subsumption.
-// - assumptions which is the result of decomposing the normalized
-// constraints.
//
// The template and declarator requirements are kept to support pretty
// printing constrained declarations.
@@ -905,8 +901,6 @@ struct GTY(()) tree_constraint_info {
tree template_reqs;
tree declarator_reqs;
tree associated_constr;
- tree normalized_constr;
- tree assumptions;
};
// Require that pointer P is non-null before returning.
@@ -945,14 +939,6 @@ check_constraint_info (tree t)
#define CI_ASSOCIATED_CONSTRAINTS(NODE) \
check_constraint_info (check_nonnull(NODE))->associated_constr
-// The normalized associated constraints.
-#define CI_NORMALIZED_CONSTRAINTS(NODE) \
- check_constraint_info (check_nonnull(NODE))->normalized_constr
-
-// Get the set of assumptions associated with the constraint info node.
-#define CI_ASSUMPTIONS(NODE) \
- check_constraint_info (check_nonnull(NODE))->assumptions
-
// Access the logical constraints on the template parameters introduced
// at a given template parameter list level indicated by NODE.
#define TEMPLATE_PARMS_CONSTRAINTS(NODE) \
@@ -6858,7 +6844,6 @@ extern void init_constraint_processing ();
extern bool constraint_p (tree);
extern tree conjoin_constraints (tree, tree);
extern tree conjoin_constraints (tree);
-extern bool valid_constraints_p (tree);
extern tree get_constraints (tree);
extern void set_constraints (tree, tree);
extern void remove_constraints (tree);
@@ -6916,7 +6901,6 @@ extern int more_constrained (tree, tree);
extern void diagnose_constraints (location_t, tree, tree);
/* in logic.cc */
-extern tree decompose_assumptions (tree);
extern tree decompose_conclusions (tree);
extern bool subsumes (tree, tree);
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index aeb333e6213..9749d0ced36 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -24479,18 +24479,6 @@ struct constr_hasher : ggc_ptr_hash<constr_entry>
static GTY (()) hash_table<constr_hasher> *decl_constraints;
-/* Returns true iff cinfo contains a valid set of constraints.
- This is the case when the associated requirements have been
- successfully decomposed into lists of atomic constraints.
- That is, when the saved assumptions are not error_mark_node. */
-
-bool
-valid_constraints_p (tree cinfo)
-{
- gcc_assert (cinfo);
- return CI_ASSUMPTIONS (cinfo) != error_mark_node;
-}
-
/* Returns the template constraints of declaration T. If T is not
constrained, return NULL_TREE. Note that T must be non-null. */
diff --git a/gcc/cp/ptree.c b/gcc/cp/ptree.c
index 8266e832a4c..5726f96b295 100644
--- a/gcc/cp/ptree.c
+++ b/gcc/cp/ptree.c
@@ -260,7 +260,6 @@ cxx_print_xnode (FILE *file, tree node, int indent)
indent+4);
print_node (file, "associated_constr",
cinfo->associated_constr, indent+4);
- print_node_brief (file, "assumptions", cinfo->assumptions, indent+4);
break;
}
case ARGUMENT_PACK_SELECT: