/* Struct-reorg optimization.
- Copyright (C) 2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
Contributed by Olga Golovanevsky <olga@il.ibm.com>
(Initial version of this code was developed
by Caroline Tice and Mostafa Hagog.)
GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 2, or (at your option) any later
+Software Foundation; either version 3, or (at your option) any later
version.
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
for more details.
You should have received a copy of the GNU General Public License
-along with GCC; see the file COPYING. If not, write to the Free
-Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA. */
+along with GCC; see the file COPYING3. If not see
+<http://www.gnu.org/licenses/>. */
#include "config.h"
#include "system.h"
finalize_var_creation (tree new_decl)
{
add_referenced_var (new_decl);
- if (is_global_var (new_decl))
- mark_call_clobbered (new_decl, ESCAPE_UNKNOWN);
mark_sym_for_renaming (new_decl);
}
gimple new_stmt = gimple_copy (old_stmt);
unsigned i;
+ /* We are really building a new stmt, clear the virtual operands. */
+ if (gimple_has_mem_ops (new_stmt))
+ {
+ gimple_set_vuse (new_stmt, NULL_TREE);
+ gimple_set_vdef (new_stmt, NULL_TREE);
+ }
+
for (i = 0; VEC_iterate (tree, acc->vars, i, var); i++)
{
tree *pos;
tree new_var = find_new_var_of_type (var, new_type);
- tree lhs, rhs;
+ tree lhs, rhs = NULL_TREE;
gcc_assert (new_var);
finalize_var_creation (new_var);
wr.wrap = 0;
wr.domain = NULL_TREE;
}
- else if (TREE_CODE (type_orig) == ARRAY_TYPE)
+ else
{
+ gcc_assert (TREE_CODE (type_orig) == ARRAY_TYPE);
wr.wrap = 1;
wr.domain = TYPE_DOMAIN (type_orig);
}