about summary refs log tree commit diff homepage
path: root/lib/Expr/Expr.cpp
AgeCommit message (Collapse)Author
2009-06-25Switch to using APInt math operations.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@74148 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-22Remove unnecessary width field, the width is part of the APInt.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@73872 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-22Store ConstantExpr's value as an APInt.Daniel Dunbar
- In anticipation of supporting large constant values. git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@73871 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-22Add ConstantExpr::toString (instead of using getConstantValue()).Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@73870 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-15Support partial folding for Add in new constant folding builder.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@73363 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-14Kill off ExtractExpr::createByteOff.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@73348 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-14Remove the (A < constant) => (A == 0 || A == 1 ... || A == constant - 1)Daniel Dunbar
optimization, its not the kind of thing we should always be performing. git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@73340 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-14More ConstantExpr cleanup.Daniel Dunbar
- Change Executor::evalConstant to return ConstantExpr. git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@73337 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-14Add ConstantExpr::{getLimitedValue,getZExtValue}.Daniel Dunbar
- For use in situations where the range of the constant is known to fit in a uint64 (or smaller), or the extra bits don't matter. - No (intended) functionality change. git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@73326 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-14Rewrite ImpliedValue to use ConstantExpr operations.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@73325 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-14Add several ConstantExpr utility functions and move clients over.Daniel Dunbar
- Reducing uses of getConstantValue() so we can move to arbitrary precision constants. - No (intended) functionality change. git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@73324 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-14Add constant folding operations to ConstantExpr.Daniel Dunbar
- No (intended) functionality change. git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@73322 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-13Reverted last change that added createIff. Since we only handleCristian Cadar
bitvectors, we can just use Eq. The parser can distinguish between boolean formulas and bitvector terms. git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@73309 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-13Added a helper function to construct IFF expressions.Cristian Cadar
git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@73283 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-10Move declaration of vc_DeleteExpr outside of function.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@73173 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-10(Missed save) Move Array construction out of MemoryObject into ObjectState.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@73163 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-10Move Array construction out of MemoryObject into ObjectState.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@73162 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-09Add initial support for constant Arrays.Daniel Dunbar
- This doesn't actually start using them, it just attempts to update all clients to do the right thing in the presence of them. git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@73130 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-09Kill off UpdateList::isRooted flag.Daniel Dunbar
- The right way to handle this is by using constant arrays, where the semantics are easier to define and implement. git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@73124 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-05Clean up a number of unused variable warnings when building w/oDaniel Dunbar
asserts. git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@72924 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-05Expr::print shouldn't introduce line breaks or extra formatting.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@72921 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-04Make ConstantExpr's value and constructor private.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@72863 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-04Sink getConstantValue into ConstantExpr.Daniel Dunbar
- Propogate ConstantExpr to various places, or cast as appropriate. git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@72862 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-04Finish removing uses of Expr::isConstant.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@72859 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-04Start removing uses of Expr::isConstant.Daniel Dunbar
- These should use cast<>, isa<>, or dyn_cast<> as appropriate (or better yet, changed to use ref<ConstantExpr> when the type is known). git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@72857 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-04Use dyn_cast<> instead of dyn_ref_cast.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@72847 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-04Use cast<> instead of static_ref_cast.Daniel Dunbar
git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@72845 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-04Move isConstant from ref<> to Expr::Daniel Dunbar
- Ref.h is now freestanding. git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@72824 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-03Kill off specialized ref<> forwarding methods, in the interest of making it aDaniel Dunbar
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
2009-06-03Fix bug I just introduced, ConstantExpr::computeHash needs to update theDaniel Dunbar
hashValue. git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@72752 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-03Update ConstantExpr::fromMemory to return a ref<Expr>.Daniel Dunbar
- This function should go away... git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@72751 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-03Inline Expr::hashConstant into callers.Daniel Dunbar
(Extraneous uses are going away shortly) git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@72749 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-02Use ConstantExpr::alloc instead of ref<Expr> directlyDaniel Dunbar
- The "constant optimization" embedded inside ref<Expr> is going away. - No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@72730 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-21Initial KLEE checkin.Daniel Dunbar
- Lots more tweaks, documentation, and web page content is needed, but this should compile & work on OS X & Linux. git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@72205 91177308-0d34-0410-b5e6-96231b3b80d8