From: Julian Seward Date: Tue, 30 Nov 2004 13:40:29 +0000 (+0000) Subject: Loop unroller: do not unroll loops in which the conditional branch is X-Git-Tag: svn/VALGRIND_3_0_1^2~734 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0e29835d760074d108c0c8fdf4308760029f207d;p=thirdparty%2Fvalgrind.git Loop unroller: do not unroll loops in which the conditional branch is not Ijk_Boring, as that will cause events that should be passed to the caller's scheduler, not to be. git-svn-id: svn://svn.valgrind.org/vex/trunk@600 --- diff --git a/VEX/priv/ir/iropt.c b/VEX/priv/ir/iropt.c index 4e76d65a05..56073f86eb 100644 --- a/VEX/priv/ir/iropt.c +++ b/VEX/priv/ir/iropt.c @@ -2968,7 +2968,8 @@ static void deltaIRStmt ( IRStmt* st, Int delta ) /* The two schemas considered are: X: BODY; goto X - --> X: BODY;BODY; goto X + + which unrolls to (eg) X: BODY;BODY; goto X and @@ -3086,6 +3087,8 @@ static IRBB* maybe_loop_unroll_BB ( IRBB* bb0, Addr64 my_addr ) st = bb0->stmts[i]; if (st->tag != Ist_Exit) return NULL; + if (st->Ist.Exit.jk != Ijk_Boring) + return NULL; con = st->Ist.Exit.dst; vassert(con->tag == Ico_U32 || con->tag == Ico_U64);