/* Header file for gimplification.
- Copyright (C) 2013 Free Software Foundation, Inc.
+ Copyright (C) 2013-2020 Free Software Foundation, Inc.
This file is part of GCC.
GS_OK = 0, /* We did something, maybe more to do. */
GS_ALL_DONE = 1 /* The expression is fully gimplified. */
};
-/* Gimplify hashtable helper. */
-
-struct gimplify_hasher : typed_free_remove <elt_t>
-{
- typedef elt_t value_type;
- typedef elt_t compare_type;
- static inline hashval_t hash (const value_type *);
- static inline bool equal (const value_type *, const compare_type *);
-};
-
-struct gimplify_ctx
-{
- struct gimplify_ctx *prev_context;
-
- vec<gimple> bind_expr_stack;
- tree temps;
- gimple_seq conditional_cleanups;
- tree exit_label;
- tree return_temp;
-
- vec<tree> case_labels;
- /* The formal temporary table. Should this be persistent? */
- hash_table <gimplify_hasher> temp_htab;
-
- int conditions;
- bool save_stack;
- bool into_ssa;
- bool allow_rhs_cond_expr;
- bool in_cleanup_point_expr;
-};
-extern struct gimplify_ctx *gimplify_ctxp;
-extern void push_gimplify_context (struct gimplify_ctx *);
-extern void pop_gimplify_context (gimple);
-extern gimple gimple_current_bind_expr (void);
-extern vec<gimple> gimple_bind_expr_stack (void);
+extern void free_gimplify_stack (void);
+extern void push_gimplify_context (bool in_ssa = false,
+ bool rhs_cond_ok = false);
+extern void pop_gimplify_context (gimple *);
+extern gbind *gimple_current_bind_expr (void);
+extern vec<gbind *> gimple_bind_expr_stack (void);
extern void gimplify_and_add (tree, gimple_seq *);
extern tree get_formal_tmp_var (tree, gimple_seq *);
-extern tree get_initialized_tmp_var (tree, gimple_seq *, gimple_seq *);
-extern void declare_vars (tree, gimple, bool);
+extern tree get_initialized_tmp_var (tree, gimple_seq *, gimple_seq * = NULL,
+ bool = true);
+extern void declare_vars (tree, gimple *, bool);
extern void gimple_add_tmp_var (tree);
+extern void gimple_add_tmp_var_fn (struct function *, tree);
extern tree unshare_expr (tree);
extern tree unshare_expr_without_location (tree);
extern tree voidify_wrapper_expr (tree, tree);
extern enum gimplify_status gimplify_expr (tree *, gimple_seq *, gimple_seq *,
bool (*) (tree), fallback_t);
+int omp_construct_selector_matches (enum tree_code *, int, int *);
+
extern void gimplify_type_sizes (tree, gimple_seq *);
extern void gimplify_one_sizepos (tree *, gimple_seq *);
-extern gimple gimplify_body (tree, bool);
+extern gbind *gimplify_body (tree, bool);
+extern enum gimplify_status gimplify_arg (tree *, gimple_seq *, location_t,
+ bool = true);
extern void gimplify_function_tree (tree);
extern enum gimplify_status gimplify_va_arg_expr (tree *, gimple_seq *,
gimple_seq *);
-gimple gimplify_assign (tree, tree, gimple_seq *);
-
-/* Return true if gimplify_one_sizepos doesn't need to gimplify
- expr (when in TYPE_SIZE{,_UNIT} and similar type/decl size/bitsize
- fields). */
-
-static inline bool
-is_gimple_sizepos (tree expr)
-{
- /* gimplify_one_sizepos doesn't need to do anything if the value isn't there,
- is constant, or contains A PLACEHOLDER_EXPR. We also don't want to do
- anything if it's already a VAR_DECL. If it's a VAR_DECL from another
- function, the gimplifier will want to replace it with a new variable,
- but that will cause problems if this type is from outside the function.
- It's OK to have that here. */
- return (expr == NULL_TREE
- || TREE_CONSTANT (expr)
- || TREE_CODE (expr) == VAR_DECL
- || CONTAINS_PLACEHOLDER_P (expr));
-}
+extern bool generic_expr_could_trap_p (tree expr);
+gimple *gimplify_assign (tree, tree, gimple_seq *);
#endif /* GCC_GIMPLIFY_H */