diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-06-03 15:40:42 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-06-03 15:40:42 +0000 |
commit | 32461e170b16d2f6cbcd04830bf68ce2a6372db5 (patch) | |
tree | 59c8813624c9072d2ecd14526658d6751e5a9674 /lib/Solver/STPBuilder.cpp | |
parent | d55171601a0537506ddd05d37a1dabe372454a6d (diff) | |
download | klee-32461e170b16d2f6cbcd04830bf68ce2a6372db5.tar.gz |
Kill off specialized ref<> forwarding methods, in the interest of making it a
more standard reference counting wrapper. - The only interesting changes here are in Ref.h, everything else is just updating foo.method to use foo->method instead. git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@72777 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Solver/STPBuilder.cpp')
-rw-r--r-- | lib/Solver/STPBuilder.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/Solver/STPBuilder.cpp b/lib/Solver/STPBuilder.cpp index a1b6e99a..1d27c655 100644 --- a/lib/Solver/STPBuilder.cpp +++ b/lib/Solver/STPBuilder.cpp @@ -447,11 +447,10 @@ ExprHandle STPBuilder::constructActual(ref<Expr> e, int *width_out) { ++stats::queryConstructs; - switch(e.getKind()) { - + switch (e->getKind()) { case Expr::Constant: { - uint64_t asUInt64 = e.getConstantValue(); - *width_out = e.getWidth(); + uint64_t asUInt64 = e->getConstantValue(); + *width_out = e->getWidth(); if (*width_out > 64) assert(0 && "constructActual: width > 64"); @@ -557,7 +556,8 @@ ExprHandle STPBuilder::constructActual(ref<Expr> e, int *width_out) { assert(*width_out!=1 && "uncanonicalized mul"); if (me->left.isConstant()) { - return constructMulByConstant(right, *width_out, me->left.getConstantValue()); + return constructMulByConstant(right, *width_out, + me->left->getConstantValue()); } else { ExprHandle left = construct(me->left, width_out); return vc_bvMultExpr(vc, *width_out, left, right); @@ -570,7 +570,7 @@ ExprHandle STPBuilder::constructActual(ref<Expr> e, int *width_out) { assert(*width_out!=1 && "uncanonicalized udiv"); if (de->right.isConstant()) { - uint64_t divisor = de->right.getConstantValue(); + uint64_t divisor = de->right->getConstantValue(); if (bits64::isPowerOfTwo(divisor)) { return bvRightShift(left, @@ -592,7 +592,7 @@ ExprHandle STPBuilder::constructActual(ref<Expr> e, int *width_out) { assert(*width_out!=1 && "uncanonicalized sdiv"); if (de->right.isConstant()) { - uint64_t divisor = de->right.getConstantValue(); + uint64_t divisor = de->right->getConstantValue(); if (optimizeDivides) { if (*width_out == 32) //only works for 32-bit division @@ -612,7 +612,7 @@ ExprHandle STPBuilder::constructActual(ref<Expr> e, int *width_out) { assert(*width_out!=1 && "uncanonicalized urem"); if (de->right.isConstant()) { - uint64_t divisor = de->right.getConstantValue(); + uint64_t divisor = de->right->getConstantValue(); if (bits64::isPowerOfTwo(divisor)) { unsigned bits = bits64::indexOfSingleBit(divisor); @@ -711,7 +711,7 @@ ExprHandle STPBuilder::constructActual(ref<Expr> e, int *width_out) { assert(*width_out!=1 && "uncanonicalized shl"); if (se->right.isConstant()) { - return bvLeftShift(left, se->right.getConstantValue(), getShiftBits(*width_out)); + return bvLeftShift(left, se->right->getConstantValue(), getShiftBits(*width_out)); } else { int shiftWidth; ExprHandle amount = construct(se->right, &shiftWidth); @@ -726,7 +726,7 @@ ExprHandle STPBuilder::constructActual(ref<Expr> e, int *width_out) { assert(*width_out!=1 && "uncanonicalized lshr"); if (lse->right.isConstant()) { - return bvRightShift(left, (unsigned) lse->right.getConstantValue(), shiftBits); + return bvRightShift(left, (unsigned) lse->right->getConstantValue(), shiftBits); } else { int shiftWidth; ExprHandle amount = construct(lse->right, &shiftWidth); @@ -740,7 +740,7 @@ ExprHandle STPBuilder::constructActual(ref<Expr> e, int *width_out) { assert(*width_out!=1 && "uncanonicalized ashr"); if (ase->right.isConstant()) { - unsigned shift = (unsigned) ase->right.getConstantValue(); + unsigned shift = (unsigned) ase->right->getConstantValue(); ExprHandle signedBool = bvBoolExtract(left, *width_out-1); return constructAShrByConstant(left, shift, signedBool, getShiftBits(*width_out)); } else { @@ -758,7 +758,7 @@ ExprHandle STPBuilder::constructActual(ref<Expr> e, int *width_out) { ExprHandle right = construct(ee->right, width_out); if (*width_out==1) { if (ee->left.isConstant()) { - assert(!ee->left.getConstantValue() && "uncanonicalized eq"); + assert(!ee->left->getConstantValue() && "uncanonicalized eq"); return vc_notExpr(vc, right); } else { return vc_iffExpr(vc, left, right); |