This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] fix loop updating in jump threading
- From: Zdenek Dvorak <rakdver at kam dot mff dot cuni dot cz>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 25 Jul 2007 13:58:35 +0200
- Subject: [patch] fix loop updating in jump threading
Hello,
to keep track of loop exits in jump threading, we need to scan the newly
created edge in create_edge_and_update_destination_phis. Bootstrapped &
regtested on i686.
Zdenek
* tree-ssa-threadupdate.c (create_edge_and_update_destination_phis):
Scan the new edge for loop exit info.
Index: tree-ssa-threadupdate.c
===================================================================
*** tree-ssa-threadupdate.c (revision 126869)
--- tree-ssa-threadupdate.c (working copy)
*************** create_edge_and_update_destination_phis
*** 313,318 ****
--- 313,319 ----
edge e = make_edge (rd->dup_block, rd->outgoing_edge->dest, EDGE_FALLTHRU);
tree phi;
+ rescan_loop_exit (e, true, false);
e->probability = REG_BR_PROB_BASE;
e->count = rd->dup_block->count;
e->aux = rd->outgoing_edge->aux;