aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth Zadeck <zadeck@naturalbridge.com>2007-11-13 20:11:00 +0000
committerKenneth Zadeck <zadeck@naturalbridge.com>2007-11-13 20:11:00 +0000
commit6aa89885b4f5080d2dd1dddaf432dc8b97b94e26 (patch)
tree0dd7be359207a079d9c3f36922da06e8a9bc9487
parentcc3461eefc6222d777105ef9af97bb27d5ca3d5e (diff)
2007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
* lto-function-out.c (output_expr_operand): Get the types correct for vector-cst. * tree-cfg.c (dump_function_to_file): Print the function_decl in verbose mode. 2007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com> * lto-read.c (input_type_ref): Renamed from get_type_ref. (input_expr_operand, input_local_var): Renamed get_type_ref to input_type_ref. (input_expr_operand): Get the types correct for vector-cst. Get SSA_NAME_DEF_STMT correct for return_exprs. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/lto@130156 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog.lto6
-rw-r--r--gcc/lto-function-out.c9
-rw-r--r--gcc/lto/ChangeLog8
-rw-r--r--gcc/lto/lto-read.c25
-rw-r--r--gcc/tree-cfg.c3
5 files changed, 37 insertions, 14 deletions
diff --git a/gcc/ChangeLog.lto b/gcc/ChangeLog.lto
index 2ab944fc63d..120de8e522f 100644
--- a/gcc/ChangeLog.lto
+++ b/gcc/ChangeLog.lto
@@ -1,3 +1,9 @@
+2007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
+
+ * lto-function-out.c (output_expr_operand): Get the types correct for
+ vector-cst.
+ * tree-cfg.c (dump_function_to_file): Print the function_decl in verbose mode.
+
2007-11-13 Diego Novillo <dnovillo@google.com>
* lto-tags.h: Call #error if BITS_PER_LTO_FLAGS_TYPE is
diff --git a/gcc/lto-function-out.c b/gcc/lto-function-out.c
index c12b09f665d..c140c2fd2d1 100644
--- a/gcc/lto-function-out.c
+++ b/gcc/lto-function-out.c
@@ -1302,23 +1302,24 @@ output_expr_operand (struct output_block *ob, tree expr)
{
tree t = TREE_VECTOR_CST_ELTS (expr);
int len = 1;
+
while ((t = TREE_CHAIN (t)) != NULL)
len++;
t = TREE_VECTOR_CST_ELTS (expr);
if (TREE_CODE (TREE_VALUE(t)) == REAL_CST)
{
- output_record_start (ob, expr, TREE_VALUE (t),
- LTO_vector_cst1);
+ output_record_start (ob, expr, expr, LTO_vector_cst1);
output_uleb128 (ob, len);
+ output_type_ref (ob, TREE_TYPE (TREE_VALUE (t)));
output_real (ob, TREE_VALUE (t));
while ((t = TREE_CHAIN (t)) != NULL)
output_real (ob, TREE_VALUE (t));
}
else
{
- output_record_start (ob, expr, TREE_VALUE (t),
- LTO_vector_cst0);
+ output_record_start (ob, expr, expr, LTO_vector_cst0);
output_uleb128 (ob, len);
+ output_type_ref (ob, TREE_TYPE (TREE_VALUE (t)));
output_integer (ob, TREE_VALUE (t));
while ((t = TREE_CHAIN (t)) != NULL)
output_integer (ob, TREE_VALUE (t));
diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog
index cd6b7eaaee1..1f0b56c7b10 100644
--- a/gcc/lto/ChangeLog
+++ b/gcc/lto/ChangeLog
@@ -1,3 +1,11 @@
+2007-11-13 Kenneth Zadeck <zadeck@naturalbridge.com>
+
+ * lto-read.c (input_type_ref): Renamed from get_type_ref.
+ (input_expr_operand, input_local_var): Renamed get_type_ref to
+ input_type_ref.
+ (input_expr_operand): Get the types correct for
+ vector-cst. Get SSA_NAME_DEF_STMT correct for return_exprs.
+
2007-11-13 Doug Kwan <dougkwan@google.com>
* lto-read.c (input_widest_uint_uleb128): New function.
diff --git a/gcc/lto/lto-read.c b/gcc/lto/lto-read.c
index b03a6ebced1..8b2cd081efc 100644
--- a/gcc/lto/lto-read.c
+++ b/gcc/lto/lto-read.c
@@ -363,7 +363,7 @@ get_label_decl (struct data_in *data_in, struct input_block *ib)
/* Get the type referenced by the next token in IB. */
static tree
-get_type_ref (struct data_in *data_in, struct input_block *ib)
+input_type_ref (struct data_in *data_in, struct input_block *ib)
{
int index;
@@ -602,7 +602,7 @@ input_expr_operand (struct input_block *ib, struct data_in *data_in,
tree result = NULL_TREE;
if (TEST_BIT (lto_types_needed_for, code))
- type = get_type_ref (data_in, ib);
+ type = input_type_ref (data_in, ib);
flags = input_tree_flags (ib, code, false);
@@ -653,17 +653,18 @@ input_expr_operand (struct input_block *ib, struct data_in *data_in,
{
tree chain = NULL_TREE;
int len = input_uleb128 (ib);
+ tree elt_type = input_type_ref (data_in, ib);
if (len && tag == LTO_vector_cst1)
{
int i;
tree last
- = build_tree_list (NULL_TREE, input_real (ib, data_in, type));
+ = build_tree_list (NULL_TREE, input_real (ib, data_in, elt_type));
chain = last;
for (i = 1; i < len; i++)
{
tree t
- = build_tree_list (NULL_TREE, input_real (ib, data_in, type));
+ = build_tree_list (NULL_TREE, input_real (ib, data_in, elt_type));
TREE_CHAIN (last) = t;
last = t;
}
@@ -671,12 +672,12 @@ input_expr_operand (struct input_block *ib, struct data_in *data_in,
else
{
int i;
- tree last = build_tree_list (NULL_TREE, input_integer (ib, type));
+ tree last = build_tree_list (NULL_TREE, input_integer (ib, elt_type));
chain = last;
for (i = 1; i < len; i++)
{
tree t
- = build_tree_list (NULL_TREE, input_integer (ib, type));
+ = build_tree_list (NULL_TREE, input_integer (ib, elt_type));
TREE_CHAIN (last) = t;
last = t;
}
@@ -963,6 +964,10 @@ input_expr_operand (struct input_block *ib, struct data_in *data_in,
op0 = DECL_RESULT (current_function_decl);
result = build1 (code, type, op0);
+
+ if ((TREE_CODE (op0) == GIMPLE_MODIFY_STMT)
+ && (TREE_CODE (GIMPLE_STMT_OPERAND (op0, 0)) == SSA_NAME))
+ SSA_NAME_DEF_STMT (GIMPLE_STMT_OPERAND (op0, 0)) = result;
}
break;
@@ -984,8 +989,8 @@ input_expr_operand (struct input_block *ib, struct data_in *data_in,
case RANGE_EXPR:
{
- tree op0 = input_integer (ib, get_type_ref (data_in, ib));
- tree op1 = input_integer (ib, get_type_ref (data_in, ib));
+ tree op0 = input_integer (ib, input_type_ref (data_in, ib));
+ tree op1 = input_integer (ib, input_type_ref (data_in, ib));
result = build2 (RANGE_EXPR, sizetype, op0, op1);
}
break;
@@ -1276,7 +1281,7 @@ input_local_var (struct input_block *ib, struct data_in *data_in,
else
name = NULL_TREE;
- type = get_type_ref (data_in, ib);
+ type = input_type_ref (data_in, ib);
gcc_assert (type);
if (is_var)
@@ -1287,7 +1292,7 @@ input_local_var (struct input_block *ib, struct data_in *data_in,
data_in->local_decls[i] = result;
if (!is_var)
- DECL_ARG_TYPE (result) = get_type_ref (data_in, ib);
+ DECL_ARG_TYPE (result) = input_type_ref (data_in, ib);
flags = input_tree_flags (ib, 0, true);
input_line_info (ib, data_in, flags);
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index 60dfbb15b21..b4f4c1ae370 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -6043,6 +6043,9 @@ dump_function_to_file (tree fn, FILE *file, int flags)
}
fprintf (file, ")\n");
+ if (flags && TDF_VERBOSE)
+ print_node (file, "", fn, 2);
+
dsf = DECL_STRUCT_FUNCTION (fn);
if (dsf && (flags & TDF_DETAILS))
dump_eh_tree (file, dsf);