]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
#include <rude_words.h>. The recent change of denotation of no-op IR
authorJulian Seward <jseward@acm.org>
Mon, 4 Apr 2005 23:12:54 +0000 (23:12 +0000)
committerJulian Seward <jseward@acm.org>
Mon, 4 Apr 2005 23:12:54 +0000 (23:12 +0000)
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

VEX/priv/ir/iropt.c

index a84c48f2c0d80f1c283eaa335ecf5c2cdc499526..724b8036e6df55c95839e46b11af8acdc605adc5 100644 (file)
@@ -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)