Commit 5e5a504e by Jan Hubicka Committed by Jan Hubicka

tree-ssa-dom.c (thread_across_edge): Remove updating here.


	* tree-ssa-dom.c (thread_across_edge): Remove updating here.
	(thread_block): Add it here.
	* update-threading.c: New test.

From-SVN: r102648
parent 4dbdb061
2005-08-02 Jan Hubicka <jh@suse.cz>
* tree-ssa-dom.c (thread_across_edge): Remove updating here.
* tree-ssa-threadupdate.c (thread_block): Add it here.
2005-08-01 James E Wilson <wilson@specifix.com> 2005-08-01 James E Wilson <wilson@specifix.com>
* config/mips/mips.c (mips_encode_section_info, mips_attribute_table, * config/mips/mips.c (mips_encode_section_info, mips_attribute_table,
......
2005-08-02 Jan Hubicka <jh@suse.cz>
* update-threading.c: New test.
2005-08-01 Andrew Pinski <pinskia@physics.uc.edu> 2005-08-01 Andrew Pinski <pinskia@physics.uc.edu>
* gcc.c-torture/compile/20050801-1.c: New test. * gcc.c-torture/compile/20050801-1.c: New test.
......
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-optimized" } */
typedef struct { unsigned short a; } A;
extern void abort (void);
extern void exit (int);
void foo (unsigned int x)
{
if (x != 0x800 && x != 0x810)
abort ();
}
int
main (int argc, char **argv)
{
int i;
for (i = 0; i < 2; ++i)
foo (((A) { ((!(i >> 4) ? 8 : 64 + (i >> 4)) << 8) + (i << 4) } ).a);
exit (0);
}
/* { dg-final { scan-tree-dump-times ".optimized" 0 "Invalid sum"} } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
...@@ -848,8 +848,6 @@ thread_across_edge (struct dom_walk_data *walk_data, edge e) ...@@ -848,8 +848,6 @@ thread_across_edge (struct dom_walk_data *walk_data, edge e)
{ {
struct edge_info *edge_info; struct edge_info *edge_info;
update_bb_profile_for_threading (e->dest, EDGE_FREQUENCY (e),
e->count, taken_edge);
if (e->aux) if (e->aux)
edge_info = e->aux; edge_info = e->aux;
else else
......
...@@ -724,6 +724,8 @@ thread_block (basic_block bb) ...@@ -724,6 +724,8 @@ thread_block (basic_block bb)
else else
{ {
edge e2 = e->aux; edge e2 = e->aux;
update_bb_profile_for_threading (e->dest, EDGE_FREQUENCY (e),
e->count, e->aux);
/* If we thread to a loop exit edge, then we will need to /* If we thread to a loop exit edge, then we will need to
rediscover the loop exit edges. While it may seem that rediscover the loop exit edges. While it may seem that
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment