mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-02-07 07:29:42 +08:00
tree-ssa-pre.c (add_to_sets): s1 may be NULL.
2005-01-16 Daniel Berlin <dberlin@dberlin.org> * tree-ssa-pre.c (add_to_sets): s1 may be NULL. (compute_avail): Uses don't go in tmp_gen. From-SVN: r93749
This commit is contained in:
parent
15ce652006
commit
7f233d9f54
@ -1,3 +1,8 @@
|
||||
2005-01-16 Daniel Berlin <dberlin@dberlin.org>
|
||||
|
||||
* tree-ssa-pre.c (add_to_sets): s1 may be NULL.
|
||||
(compute_avail): Uses don't go in tmp_gen.
|
||||
|
||||
2005-01-16 Steven Bosscher <stevenb@suse.de>
|
||||
|
||||
* ggc-page.c (ggc_alloc_stat): Use __builtin_ctzl instead of a
|
||||
|
14
gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-3.c
Normal file
14
gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-3.c
Normal file
@ -0,0 +1,14 @@
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O2 -fdump-tree-pre-stats" } */
|
||||
unsigned foo1 (unsigned a, unsigned b)
|
||||
{
|
||||
unsigned i, j, k;
|
||||
for (i = 0; i != a; i++)
|
||||
{
|
||||
j += 4*b;
|
||||
k += 4*a;
|
||||
}
|
||||
return j + k;
|
||||
}
|
||||
/* We should eliminate both 4*b and 4*a from the main body of the loop */
|
||||
/* { dg-final { scan-tree-dump-times "Eliminated:2" 1 "pre"} } */
|
@ -23,7 +23,7 @@ load_lib gcc-dg.exp
|
||||
set DEFAULT_VECTCFLAGS ""
|
||||
|
||||
# These flags are used for all targets.
|
||||
lappend DEFAULT_VECTCFLAGS "-O2" "-ftree-vectorize" "-fdump-tree-vect-stats"
|
||||
lappend DEFAULT_VECTCFLAGS "-O2" "-ftree-vectorize" "-fdump-tree-vect-stats" "-fno-tree-pre"
|
||||
|
||||
# If the target system supports vector instructions, the default action
|
||||
# for a test is 'run', otherwise it's 'compile'. Save current default.
|
||||
|
@ -1695,7 +1695,8 @@ add_to_sets (tree var, tree expr, vuse_optype vuses, bitmap_set_t s1,
|
||||
if (var != expr)
|
||||
vn_add (var, val, NULL);
|
||||
|
||||
bitmap_insert_into_set (s1, var);
|
||||
if (s1)
|
||||
bitmap_insert_into_set (s1, var);
|
||||
bitmap_value_insert_into_set (s2, var);
|
||||
}
|
||||
|
||||
@ -1881,8 +1882,7 @@ compute_avail (void)
|
||||
for (j = 0; j < NUM_USES (STMT_USE_OPS (stmt)); j++)
|
||||
{
|
||||
tree use = USE_OP (STMT_USE_OPS (stmt), j);
|
||||
add_to_sets (use, use, NULL, TMP_GEN (block),
|
||||
AVAIL_OUT (block));
|
||||
add_to_sets (use, use, NULL, NULL, AVAIL_OUT (block));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user