diff options
author | Cristian Cadar <cristic@cs.stanford.edu> | 2009-07-10 04:15:25 +0000 |
---|---|---|
committer | Cristian Cadar <cristic@cs.stanford.edu> | 2009-07-10 04:15:25 +0000 |
commit | 7300bfbc2d0df000cd9ce3090eb6716c3be9f98d (patch) | |
tree | bad751cdf18a8e48ad7125d5d30148a9555a47c7 /lib/Expr/Expr.cpp | |
parent | 65319873a052826cbea5198815316f676bb86a84 (diff) | |
download | klee-7300bfbc2d0df000cd9ce3090eb6716c3be9f98d.tar.gz |
Replaced createNot() by createIsZero() and "Not" macro by "Nz".
Not will become bitwise not. git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@75224 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Expr/Expr.cpp')
-rw-r--r-- | lib/Expr/Expr.cpp | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/lib/Expr/Expr.cpp b/lib/Expr/Expr.cpp index fc450d76..2f9e04a0 100644 --- a/lib/Expr/Expr.cpp +++ b/lib/Expr/Expr.cpp @@ -289,7 +289,7 @@ Expr::Width Expr::getWidthForLLVMType(const llvm::Type *t) { } ref<Expr> Expr::createImplies(ref<Expr> hyp, ref<Expr> conc) { - return OrExpr::create(Expr::createNot(hyp), conc); + return OrExpr::create(Expr::createIsZero(hyp), conc); } ref<Expr> Expr::createIsZero(ref<Expr> e) { @@ -300,10 +300,6 @@ ref<Expr> Expr::createCoerceToPointerType(ref<Expr> e) { return ZExtExpr::create(e, kMachinePointerType); } -ref<Expr> Expr::createNot(ref<Expr> e) { - return createIsZero(e); -} - ref<ConstantExpr> Expr::createPointer(uint64_t v) { return ConstantExpr::create(v, kMachinePointerType); } @@ -527,11 +523,11 @@ ref<Expr> SelectExpr::create(ref<Expr> c, ref<Expr> t, ref<Expr> f) { if (CE->isTrue()) { return OrExpr::create(c, f); } else { - return AndExpr::create(Expr::createNot(c), f); + return AndExpr::create(Expr::createIsZero(c), f); } } else if (ConstantExpr *CE = dyn_cast<ConstantExpr>(f)) { if (CE->isTrue()) { - return OrExpr::create(Expr::createNot(c), t); + return OrExpr::create(Expr::createIsZero(c), t); } else { return AndExpr::create(c, t); } @@ -868,7 +864,7 @@ static ref<Expr> SRemExpr_create(const ref<Expr> &l, const ref<Expr> &r) { static ref<Expr> ShlExpr_create(const ref<Expr> &l, const ref<Expr> &r) { if (l->getWidth() == Expr::Bool) { // l & !r - return AndExpr::create(l, Expr::createNot(r)); + return AndExpr::create(l, Expr::createIsZero(r)); } else{ return ShlExpr::alloc(l, r); } @@ -876,7 +872,7 @@ static ref<Expr> ShlExpr_create(const ref<Expr> &l, const ref<Expr> &r) { static ref<Expr> LShrExpr_create(const ref<Expr> &l, const ref<Expr> &r) { if (l->getWidth() == Expr::Bool) { // l & !r - return AndExpr::create(l, Expr::createNot(r)); + return AndExpr::create(l, Expr::createIsZero(r)); } else{ return LShrExpr::alloc(l, r); } @@ -1014,8 +1010,8 @@ static ref<Expr> EqExpr_createPartialR(const ref<ConstantExpr> &cl, Expr *r) { const OrExpr *roe = cast<OrExpr>(r); // transform not(or(a,b)) to and(not a, not b) - return AndExpr::create(Expr::createNot(roe->left), - Expr::createNot(roe->right)); + return AndExpr::create(Expr::createIsZero(roe->left), + Expr::createIsZero(roe->right)); } } } else if (rk == Expr::SExt) { @@ -1093,7 +1089,7 @@ ref<Expr> SgeExpr::create(const ref<Expr> &l, const ref<Expr> &r) { static ref<Expr> UltExpr_create(const ref<Expr> &l, const ref<Expr> &r) { Expr::Width t = l->getWidth(); if (t == Expr::Bool) { // !l && r - return AndExpr::create(Expr::createNot(l), r); + return AndExpr::create(Expr::createIsZero(l), r); } else { return UltExpr::alloc(l, r); } @@ -1101,7 +1097,7 @@ static ref<Expr> UltExpr_create(const ref<Expr> &l, const ref<Expr> &r) { static ref<Expr> UleExpr_create(const ref<Expr> &l, const ref<Expr> &r) { if (l->getWidth() == Expr::Bool) { // !(l && !r) - return OrExpr::create(Expr::createNot(l), r); + return OrExpr::create(Expr::createIsZero(l), r); } else { return UleExpr::alloc(l, r); } @@ -1109,7 +1105,7 @@ static ref<Expr> UleExpr_create(const ref<Expr> &l, const ref<Expr> &r) { static ref<Expr> SltExpr_create(const ref<Expr> &l, const ref<Expr> &r) { if (l->getWidth() == Expr::Bool) { // l && !r - return AndExpr::create(l, Expr::createNot(r)); + return AndExpr::create(l, Expr::createIsZero(r)); } else { return SltExpr::alloc(l, r); } @@ -1117,7 +1113,7 @@ static ref<Expr> SltExpr_create(const ref<Expr> &l, const ref<Expr> &r) { static ref<Expr> SleExpr_create(const ref<Expr> &l, const ref<Expr> &r) { if (l->getWidth() == Expr::Bool) { // !(!l && r) - return OrExpr::create(l, Expr::createNot(r)); + return OrExpr::create(l, Expr::createIsZero(r)); } else { return SleExpr::alloc(l, r); } |