From: Julian Seward Date: Mon, 4 Apr 2005 23:12:54 +0000 (+0000) Subject: #include . The recent change of denotation of no-op IR X-Git-Tag: svn/VALGRIND_3_0_1^2~216 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1199b9ccea705aa82f950fefca933663610f5efa;p=thirdparty%2Fvalgrind.git #include . The recent change of denotation of no-op IR statements from NULL to IRStmt_NoOp screwed up the how-much-to-unroll heuristics in iropt, resulting in iropt being significantly less enthusiastic about unrolling than it was before the change. Gaaah! This commit should fix it. git-svn-id: svn://svn.valgrind.org/vex/trunk@1118 --- diff --git a/VEX/priv/ir/iropt.c b/VEX/priv/ir/iropt.c index a84c48f2c0..724b8036e6 100644 --- a/VEX/priv/ir/iropt.c +++ b/VEX/priv/ir/iropt.c @@ -2756,9 +2756,10 @@ static Int calc_unroll_factor( IRBB* bb ) Int n_stmts, i; n_stmts = 0; - for (i = 0; i < bb->stmts_used; i++) - if (bb->stmts[i]) - n_stmts++; + for (i = 0; i < bb->stmts_used; i++) { + if (bb->stmts[i]->tag != Ist_NoOp) + n_stmts++; + } if (n_stmts <= vex_control.iropt_unroll_thresh/8) { if (vex_control.iropt_verbosity > 0)