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-me.c | |
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-me.c')
-rw-r--r-- | gcc/gimplify-me.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/gcc/gimplify-me.c b/gcc/gimplify-me.c index a7e9387..92542a9 100644 --- a/gcc/gimplify-me.c +++ b/gcc/gimplify-me.c @@ -45,7 +45,6 @@ force_gimple_operand_1 (tree expr, gimple_seq *stmts, gimple_predicate gimple_test_f, tree var) { enum gimplify_status ret; - struct gimplify_ctx gctx; location_t saved_location; *stmts = NULL; @@ -57,16 +56,13 @@ force_gimple_operand_1 (tree expr, gimple_seq *stmts, && (*gimple_test_f) (expr)) return expr; - push_gimplify_context (&gctx); - gimplify_ctxp->into_ssa = gimple_in_ssa_p (cfun); - gimplify_ctxp->allow_rhs_cond_expr = true; + push_gimplify_context (gimple_in_ssa_p (cfun), true); saved_location = input_location; input_location = UNKNOWN_LOCATION; if (var) { - if (gimplify_ctxp->into_ssa - && is_gimple_reg (var)) + if (gimple_in_ssa_p (cfun) && is_gimple_reg (var)) var = make_ssa_name (var, NULL); expr = build2 (MODIFY_EXPR, TREE_TYPE (var), var, expr); } @@ -160,10 +156,8 @@ gimple_regimplify_operands (gimple stmt, gimple_stmt_iterator *gsi_p) tree lhs; gimple_seq pre = NULL; gimple post_stmt = NULL; - struct gimplify_ctx gctx; - push_gimplify_context (&gctx); - gimplify_ctxp->into_ssa = gimple_in_ssa_p (cfun); + push_gimplify_context (gimple_in_ssa_p (cfun)); switch (gimple_code (stmt)) { |