This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]