diff options
author | amacleod <amacleod@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-11-21 00:06:23 +0000 |
---|---|---|
committer | amacleod <amacleod@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-11-21 00:06:23 +0000 |
commit | 8a4a28a8474c6c4141b786863e699bba440edc1e (patch) | |
tree | 81dc78fd50ade92c05f83300f4d84fc625f8d50d /gcc/gimplify.h | |
parent | 62776fa2f34fc239ad60e5c99ea53271dca2045e (diff) | |
download | gcc-8a4a28a8474c6c4141b786863e699bba440edc1e.tar.gz |
* gimplify.h (gimplify_hasher : typed_free_remove, struct gimplify_ctx):
Move to gimplify.c.
(free_gimplify_stack): Add prototype.
* gimplify.c (gimplify_hasher:typed_free_remove): Relocate here.
(struct gimplify_ctx): Relocate here.
(gimplify_ctxp): Make static.
(ctx_pool, ctx_alloc, ctx_free, free_gimplify_stack): New. Manage a
list of struct gimplify_ctx.
(push_gimplify_context): Add default parameters and allocate a struct
from the pool.
(pop_gimplify_context): Free a struct back to the pool.
(gimplify_scan_omp_clauses, gimplify_omp_parallel, gimplify_omp_task,
gimplify_omp_workshare, gimplify_transaction, gimplify_body): Don't
use a local 'struct gimplify_ctx'.
* cgraphunit.c (expand_all_functions): call free_gimplify_stack.
* gimplify-me.c (force_gimple_operand_1, gimple_regimplify_operands):
Likewise.
* omp-low.c (lower_omp_sections, lower_omp_single, lower_omp_master,
lower_omp_ordered, lower_omp_critical, lower_omp_for,
create_task_copyfn, lower_omp_taskreg, lower_omp_target,
lower_omp_teams, execute_lower_omp): Likewise.
* gimple-fold.c (gimplify_and_update_call_from_tree): Likewise.
* tree-inline.c (optimize_inline_calls): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@205168 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gimplify.h')
-rw-r--r-- | gcc/gimplify.h | 35 |
1 files changed, 3 insertions, 32 deletions
diff --git a/gcc/gimplify.h b/gcc/gimplify.h index 3f7e1b327a9..91000d1e6b7 100644 --- a/gcc/gimplify.h +++ b/gcc/gimplify.h @@ -48,39 +48,10 @@ enum gimplify_status { 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 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 gimple gimple_current_bind_expr (void); extern vec<gimple> gimple_bind_expr_stack (void); |