Fix parenthesization bugs in cost estimates.

Also added the debugging print that helped find these issues.
Revert inlining some functions in examples
This commit is contained in:
Matt Pharr
2011-09-16 17:40:05 -07:00
parent cdc850f98c
commit a501ab1aa6
5 changed files with 22 additions and 19 deletions

View File

@@ -1455,8 +1455,8 @@ int
BinaryExpr::EstimateCost() const {
return ((arg0 ? arg0->EstimateCost() : 0) +
(arg1 ? arg1->EstimateCost() : 0) +
(op == Div || op == Mod) ? COST_COMPLEX_ARITH_OP :
COST_SIMPLE_ARITH_LOGIC_OP);
((op == Div || op == Mod) ? COST_COMPLEX_ARITH_OP :
COST_SIMPLE_ARITH_LOGIC_OP));
}