escape: Implement tag phase.
[gcc.git] / gcc / gimple-match.h
index 9e58755defb521f948e342b647d723eb0c6b7d5e..2b8f4b968889cd47ea135b2a5c839ef3fea2f56f 100644 (file)
@@ -1,6 +1,6 @@
 /* Gimple simplify definitions.
 
-   Copyright (C) 2011-2015 Free Software Foundation, Inc.
+   Copyright (C) 2011-2016 Free Software Foundation, Inc.
    Contributed by Richard Guenther <rguenther@suse.de>
 
 This file is part of GCC.
@@ -30,9 +30,9 @@ class code_helper
 public:
   code_helper () {}
   code_helper (tree_code code) : rep ((int) code) {}
-  code_helper (built_in_function fn) : rep (-(int) fn) {}
+  code_helper (combined_fn fn) : rep (-(int) fn) {}
   operator tree_code () const { return (tree_code) rep; }
-  operator built_in_function () const { return (built_in_function) -rep; }
+  operator combined_fn () const { return (combined_fn) -rep; }
   bool is_tree_code () const { return rep > 0; }
   bool is_fn_code () const { return rep < 0; }
   int get_rep () const { return rep; }
@@ -40,11 +40,31 @@ private:
   int rep;
 };
 
+/* Return whether OPS[0] with CODE is a non-expression result and
+   a gimple value.  */
+
+inline bool
+gimple_simplified_result_is_gimple_val (code_helper code, tree *ops)
+{
+  return (code.is_tree_code ()
+         && (TREE_CODE_LENGTH ((tree_code) code) == 0
+             || ((tree_code) code) == ADDR_EXPR)
+         && is_gimple_val (ops[0]));
+}
+
+extern tree (*mprts_hook) (code_helper, tree, tree *);
+
 bool gimple_simplify (gimple *, code_helper *, tree *, gimple_seq *,
                      tree (*)(tree), tree (*)(tree));
+bool gimple_resimplify1 (gimple_seq *, code_helper *, tree, tree *,
+                        tree (*)(tree));
+bool gimple_resimplify2 (gimple_seq *, code_helper *, tree, tree *,
+                        tree (*)(tree));
+bool gimple_resimplify3 (gimple_seq *, code_helper *, tree, tree *,
+                        tree (*)(tree));
 tree maybe_push_res_to_seq (code_helper, tree, tree *,
                            gimple_seq *, tree res = NULL_TREE);
-void maybe_build_generic_op (enum tree_code, tree, tree *, tree, tree);
+void maybe_build_generic_op (enum tree_code, tree, tree *);
 
 
 #endif  /* GCC_GIMPLE_MATCH_H */