diff options
author | Andrew MacLeod <amacleod@redhat.com> | 2015-06-25 17:03:33 +0000 |
---|---|---|
committer | Andrew Macleod <amacleod@gcc.gnu.org> | 2015-06-25 17:03:33 +0000 |
commit | fbf196a2560584a0c71b7c44e6354eac93721888 (patch) | |
tree | 0ec323ad3253632e0ab13e7619c3a7de99413f1e | |
parent | 16a16ec7db0a5c626567b57ba49e09c4a5cccb76 (diff) | |
download | gcc-fbf196a2560584a0c71b7c44e6354eac93721888.zip gcc-fbf196a2560584a0c71b7c44e6354eac93721888.tar.gz gcc-fbf196a2560584a0c71b7c44e6354eac93721888.tar.bz2 |
tree-core.h (struct tree_optimization_option): Make opts a pointer to struct cl_optimization.
2015-06-25 Andrew MacLeod <amacleod@redhat.com>
* tree-core.h (struct tree_optimization_option): Make opts a pointer to
struct cl_optimization.
* tree.h (TREE_OPTIMIZATION): Return the pointer, not the address of it.
* tree.c (make_node_stat): Allocate cl_optimization struct.
(copy_node_stat): Allocate and copy cl_optimization struct.
From-SVN: r224952
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/tree-core.h | 2 | ||||
-rw-r--r-- | gcc/tree.c | 23 | ||||
-rw-r--r-- | gcc/tree.h | 2 |
4 files changed, 30 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a45adfd..202c3a7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,13 @@ 2015-06-25 Andrew MacLeod <amacleod@redhat.com> + * tree-core.h (struct tree_optimization_option): Make opts a pointer to + struct cl_optimization. + * tree.h (TREE_OPTIMIZATION): Return the pointer, not the address of it. + * tree.c (make_node_stat): Allocate cl_optimization struct. + (copy_node_stat): Allocate and copy cl_optimization struct. + +2015-06-25 Andrew MacLeod <amacleod@redhat.com> + * function.h (struct incoming_args): Move struct. (pass_by_reference, reference_callee_copied): Remove prototypes. * emit-rtl.h (struct incoming_args): Relocate struct here. diff --git a/gcc/tree-core.h b/gcc/tree-core.h index 58dc301..f23abe2 100644 --- a/gcc/tree-core.h +++ b/gcc/tree-core.h @@ -1652,7 +1652,7 @@ struct GTY(()) tree_optimization_option { struct tree_common common; /* The optimization options used by the user. */ - struct cl_optimization opts; + struct cl_optimization *opts; /* Target optabs for this set of optimization options. This is of type `struct target_optabs *'. */ @@ -1095,9 +1095,20 @@ make_node_stat (enum tree_code code MEM_STAT_DECL) break; case tcc_exceptional: - if (code == TARGET_OPTION_NODE) - { - TREE_TARGET_OPTION(t) = ggc_cleared_alloc<struct cl_target_option> (); + switch (code) + { + case TARGET_OPTION_NODE: + TREE_TARGET_OPTION(t) + = ggc_cleared_alloc<struct cl_target_option> (); + break; + + case OPTIMIZATION_NODE: + TREE_OPTIMIZATION (t) + = ggc_cleared_alloc<struct cl_optimization> (); + break; + + default: + break; } break; @@ -1188,6 +1199,12 @@ copy_node_stat (tree node MEM_STAT_DECL) memcpy (TREE_TARGET_OPTION (t), TREE_TARGET_OPTION (node), sizeof (struct cl_target_option)); } + else if (code == OPTIMIZATION_NODE) + { + TREE_OPTIMIZATION (t) = ggc_alloc<struct cl_optimization>(); + memcpy (TREE_OPTIMIZATION (t), TREE_OPTIMIZATION (node), + sizeof (struct cl_optimization)); + } return t; } @@ -2827,7 +2827,7 @@ extern vec<tree, va_gc> **decl_debug_args_insert (tree); (STATEMENT_LIST_CHECK (NODE)->stmt_list.tail) #define TREE_OPTIMIZATION(NODE) \ - (&OPTIMIZATION_NODE_CHECK (NODE)->optimization.opts) + (OPTIMIZATION_NODE_CHECK (NODE)->optimization.opts) #define TREE_OPTIMIZATION_OPTABS(NODE) \ (OPTIMIZATION_NODE_CHECK (NODE)->optimization.optabs) |