diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-12-22 18:51:24 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-12-22 18:51:24 +0000 |
commit | bc97b18f58bcfb95ae1f0bd395b95b55efec1c05 (patch) | |
tree | 0cb8336d9cec3f258c1db3f86494f5469b7908b8 /gcc/stor-layout.c | |
parent | dcce4b90c2469031bd32e8f050a33ec07b7e8f9d (diff) | |
download | gcc-bc97b18f58bcfb95ae1f0bd395b95b55efec1c05.tar.gz |
2004-12-22 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* trans.c (mark_visited): Set TYPE_SIZES_GIMPLIFIED.
2004-12-22 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* tree.h (TYPE_SIZES_GIMPLIFIED): New.
* function.c (gimplify_parm_type): Don't gimplify type if already done.
* gimplify.c (gimplify_decl_expr): Likewise.
(gimplify_type_sizes): Set TYPE_SIZES_GIMPLIFIED. Examine nested
array types.
2004-12-22 Richard Henderson <rth@redhat.com>
* gimplify.c (eval_save_expr): Remove.
(gimplify_one_sizepos): Unshare expr before gimplifying.
* stor-layout.c (variable_size): Revert 2004-12-19 change.
(layout_decl): Revert 2004-12-18 change.
(layout_type): Revert 2004-12-21 change.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@92495 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/stor-layout.c')
-rw-r--r-- | gcc/stor-layout.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c index 13fdb3cf14c..ac7fb744f66 100644 --- a/gcc/stor-layout.c +++ b/gcc/stor-layout.c @@ -125,19 +125,11 @@ variable_size (tree size) just return SIZE unchanged. Likewise for self-referential sizes and constant sizes. */ if (TREE_CONSTANT (size) - || TREE_CODE (size) == SAVE_EXPR || lang_hooks.decls.global_bindings_p () < 0 || CONTAINS_PLACEHOLDER_P (size)) return size; - /* Force creation of a SAVE_EXPR. This solves (1) code duplication - problems between parent and nested functions that occasionally can't - be cleaned up because of portions of the expression escaping the - parent function via the FRAME object, and (2) tree sharing problems - between the type system and the gimple code, which can leak SSA_NAME - objects into e.g. TYPE_SIZE, which cause heartburn when emitting - debug information. */ - size = build1 (SAVE_EXPR, TREE_TYPE (size), size); + size = save_expr (size); /* If an array with a variable number of elements is declared, and the elements require destruction, we will emit a cleanup for the @@ -333,8 +325,8 @@ layout_decl (tree decl, unsigned int known_align) if (DECL_SIZE (decl) == 0) { - DECL_SIZE (decl) = unshare_expr (TYPE_SIZE (type)); - DECL_SIZE_UNIT (decl) = unshare_expr (TYPE_SIZE_UNIT (type)); + DECL_SIZE (decl) = TYPE_SIZE (type); + DECL_SIZE_UNIT (decl) = TYPE_SIZE_UNIT (type); } else if (DECL_SIZE_UNIT (decl) == 0) DECL_SIZE_UNIT (decl) @@ -1644,8 +1636,8 @@ layout_type (tree type) if (index && TYPE_MAX_VALUE (index) && TYPE_MIN_VALUE (index) && TYPE_SIZE (element)) { - tree ub = unshare_expr (TYPE_MAX_VALUE (index)); - tree lb = unshare_expr (TYPE_MIN_VALUE (index)); + tree ub = TYPE_MAX_VALUE (index); + tree lb = TYPE_MIN_VALUE (index); tree length; tree element_size; |