From: Julian Seward Date: Thu, 14 Oct 2004 19:33:25 +0000 (+0000) Subject: Make loop unrolling less verbose. X-Git-Tag: svn/VALGRIND_3_0_1^2~992 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=23aa1e43442ea03a092ed01937f8f64501ce1725;p=thirdparty%2Fvalgrind.git Make loop unrolling less verbose. git-svn-id: svn://svn.valgrind.org/vex/trunk@342 --- diff --git a/VEX/priv/ir/iropt.c b/VEX/priv/ir/iropt.c index bc2f7ca664..45b9909240 100644 --- a/VEX/priv/ir/iropt.c +++ b/VEX/priv/ir/iropt.c @@ -24,6 +24,9 @@ #define UNROLL_TARGET 120 //#define UNROLL_TARGET 0 +/* Set to 1 to get details of loop unrolling. */ +#define UNROLL_VERBOSE 0 + /* Implementation notes, 12 Oct 04. @@ -385,6 +388,10 @@ static IRExpr* fold_Expr ( IRExpr* e ) e2 = IRExpr_Const(IRConst_U32( 0xFFFF & e->Iex.Unop.arg->Iex.Const.con->Ico.U16)); break; + case Iop_32to16: + e2 = IRExpr_Const(IRConst_U16( + 0xFFFF & e->Iex.Unop.arg->Iex.Const.con->Ico.U32)); + break; case Iop_32to8: e2 = IRExpr_Const(IRConst_U8( 0xFF & e->Iex.Unop.arg->Iex.Const.con->Ico.U32)); @@ -2733,23 +2740,28 @@ static Int calc_unroll_factor( IRBB* bb ) n_stmts++; if (n_stmts <= UNROLL_TARGET/8) { - vex_printf("vex iropt: 8 x unrolling (%d sts -> %d sts)\n", - n_stmts, 8* n_stmts); + if (UNROLL_VERBOSE) + vex_printf("vex iropt: 8 x unrolling (%d sts -> %d sts)\n", + n_stmts, 8* n_stmts); return 8; } if (n_stmts <= UNROLL_TARGET/4) { - vex_printf("vex iropt: 4 x unrolling (%d sts -> %d sts)\n", - n_stmts, 4* n_stmts); + if (UNROLL_VERBOSE) + vex_printf("vex iropt: 4 x unrolling (%d sts -> %d sts)\n", + n_stmts, 4* n_stmts); return 4; } if (n_stmts <= UNROLL_TARGET/2) { - vex_printf("vex iropt: 2 x unrolling (%d sts -> %d sts)\n", - n_stmts, 2* n_stmts); + if (UNROLL_VERBOSE) + vex_printf("vex iropt: 2 x unrolling (%d sts -> %d sts)\n", + n_stmts, 2* n_stmts); return 2; } - vex_printf("vex iropt: not unrolling (%d sts)\n", n_stmts); + if (UNROLL_VERBOSE) + vex_printf("vex iropt: not unrolling (%d sts)\n", n_stmts); + return 1; }