mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-01-11 12:45:06 +08:00
re PR middle-end/34462 (tree check: expected ssa_name, have struct_field_tag in vuses_compare, at tree-vn.c:118)
2007-12-14 Richard Guenther <rguenther@suse.de> PR middle-end/34462 * tree-ssa-operands.h (create_ssa_artificial_load_stmt): Add parameter to say whether to unlink immediate uses. * tree-ssa-operands.c (create_ssa_artificial_load_stmt): Do not mark the artificial stmt as modified. Unlink immediate uses only if requested. * tree-ssa-dom.c (record_equivalences_from_stmt): Update caller. * tree-ssa-pre.c (insert_fake_stores): Likewise. * gcc.c-torture/compile/20071214-1.c: New testcase. From-SVN: r130931
This commit is contained in:
parent
2c9fd13e90
commit
ae4dbd44ba
@ -1,3 +1,14 @@
|
||||
2007-12-14 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR middle-end/34462
|
||||
* tree-ssa-operands.h (create_ssa_artificial_load_stmt): Add
|
||||
parameter to say whether to unlink immediate uses.
|
||||
* tree-ssa-operands.c (create_ssa_artificial_load_stmt): Do not
|
||||
mark the artificial stmt as modified. Unlink immediate uses
|
||||
only if requested.
|
||||
* tree-ssa-dom.c (record_equivalences_from_stmt): Update caller.
|
||||
* tree-ssa-pre.c (insert_fake_stores): Likewise.
|
||||
|
||||
2007-12-13 Eric Botcazou <ebotcazou@libertysurf.fr>
|
||||
|
||||
PR middle-end/33088
|
||||
|
@ -1,3 +1,8 @@
|
||||
2007-12-14 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR middle-end/34462
|
||||
* gcc.c-torture/compile/20071214-1.c: New testcase.
|
||||
|
||||
2007-12-14 Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
* gcc.target/i386/sse-14.c (test_1, test_2, test_2x, test_4): New
|
||||
|
15
gcc/testsuite/gcc.c-torture/compile/20071214-1.c
Normal file
15
gcc/testsuite/gcc.c-torture/compile/20071214-1.c
Normal file
@ -0,0 +1,15 @@
|
||||
typedef __builtin_va_list va_list;
|
||||
void gftp_config_parse_args (int numargs, char **first, ...)
|
||||
{
|
||||
char **dest = first;
|
||||
va_list argp;
|
||||
__builtin_va_start (argp, first);
|
||||
while (numargs-- > 0)
|
||||
{
|
||||
*dest = __builtin_malloc (1);
|
||||
dest = __builtin_va_arg(argp, char **);
|
||||
*dest = ((void *)0);
|
||||
}
|
||||
__builtin_va_end(argp);
|
||||
}
|
||||
|
@ -1618,7 +1618,7 @@ record_equivalences_from_stmt (tree stmt, int may_optimize_p, stmt_ann_t ann)
|
||||
/* Build a new statement with the RHS and LHS exchanged. */
|
||||
new_stmt = build_gimple_modify_stmt (rhs, lhs);
|
||||
|
||||
create_ssa_artificial_load_stmt (new_stmt, stmt);
|
||||
create_ssa_artificial_load_stmt (new_stmt, stmt, true);
|
||||
|
||||
/* Finally enter the statement into the available expression
|
||||
table. */
|
||||
|
@ -2647,17 +2647,23 @@ copy_virtual_operands (tree dest, tree src)
|
||||
create an artificial stmt which looks like a load from the store, this can
|
||||
be used to eliminate redundant loads. OLD_OPS are the operands from the
|
||||
store stmt, and NEW_STMT is the new load which represents a load of the
|
||||
values stored. */
|
||||
values stored. If DELINK_IMM_USES_P is specified, the immediate
|
||||
uses of this stmt will be de-linked. */
|
||||
|
||||
void
|
||||
create_ssa_artificial_load_stmt (tree new_stmt, tree old_stmt)
|
||||
create_ssa_artificial_load_stmt (tree new_stmt, tree old_stmt,
|
||||
bool delink_imm_uses_p)
|
||||
{
|
||||
tree op;
|
||||
ssa_op_iter iter;
|
||||
use_operand_p use_p;
|
||||
unsigned i;
|
||||
stmt_ann_t ann;
|
||||
|
||||
get_stmt_ann (new_stmt);
|
||||
/* Create the stmt annotation but make sure to not mark the stmt
|
||||
as modified as we will build operands ourselves. */
|
||||
ann = get_stmt_ann (new_stmt);
|
||||
ann->modified = 0;
|
||||
|
||||
/* Process NEW_STMT looking for operands. */
|
||||
start_ssa_stmt_operands ();
|
||||
@ -2687,8 +2693,9 @@ create_ssa_artificial_load_stmt (tree new_stmt, tree old_stmt)
|
||||
finalize_ssa_stmt_operands (new_stmt);
|
||||
|
||||
/* All uses in this fake stmt must not be in the immediate use lists. */
|
||||
FOR_EACH_SSA_USE_OPERAND (use_p, new_stmt, iter, SSA_OP_ALL_USES)
|
||||
delink_imm_use (use_p);
|
||||
if (delink_imm_uses_p)
|
||||
FOR_EACH_SSA_USE_OPERAND (use_p, new_stmt, iter, SSA_OP_ALL_USES)
|
||||
delink_imm_use (use_p);
|
||||
}
|
||||
|
||||
|
||||
|
@ -210,7 +210,7 @@ extern void free_stmt_operands (tree);
|
||||
extern bool verify_imm_links (FILE *f, tree var);
|
||||
|
||||
extern void copy_virtual_operands (tree, tree);
|
||||
extern void create_ssa_artificial_load_stmt (tree, tree);
|
||||
extern void create_ssa_artificial_load_stmt (tree, tree, bool);
|
||||
|
||||
extern void dump_immediate_uses (FILE *file);
|
||||
extern void dump_immediate_uses_for (FILE *file, tree var);
|
||||
|
@ -3171,7 +3171,7 @@ insert_fake_stores (void)
|
||||
|
||||
lhs = make_ssa_name (storetemp, new_tree);
|
||||
GIMPLE_STMT_OPERAND (new_tree, 0) = lhs;
|
||||
create_ssa_artificial_load_stmt (new_tree, stmt);
|
||||
create_ssa_artificial_load_stmt (new_tree, stmt, false);
|
||||
|
||||
NECESSARY (new_tree) = 0;
|
||||
VEC_safe_push (tree, heap, inserted_exprs, new_tree);
|
||||
|
Loading…
Reference in New Issue
Block a user