diff options
author | Andrew MacLeod <amacleod@redhat.com> | 2013-11-21 00:06:23 +0000 |
---|---|---|
committer | Andrew Macleod <amacleod@gcc.gnu.org> | 2013-11-21 00:06:23 +0000 |
commit | 45852dcc91142eb73dc2b12ca939cce842d37daf (patch) | |
tree | 81dc78fd50ade92c05f83300f4d84fc625f8d50d /gcc/gimplify.h | |
parent | 41fd66597107279af9794ef7570c0fcca80e8348 (diff) | |
download | gcc-45852dcc91142eb73dc2b12ca939cce842d37daf.zip gcc-45852dcc91142eb73dc2b12ca939cce842d37daf.tar.gz gcc-45852dcc91142eb73dc2b12ca939cce842d37daf.tar.bz2 |
gimplify.h (gimplify_hasher : typed_free_remove, [...]): Move to gimplify.c.
* 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.
From-SVN: r205168
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 3f7e1b3..91000d1 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); |