diff options
author | Martin Nowack <m.nowack@imperial.ac.uk> | 2018-10-17 23:13:53 +0100 |
---|---|---|
committer | Cristian Cadar <c.cadar@imperial.ac.uk> | 2018-10-23 18:53:46 +0300 |
commit | ece5e79dbc01b8f672799b22774ce73abd2721f3 (patch) | |
tree | 1f4f842081310f8212de8cec8c4c880ecee66fce /lib/Expr | |
parent | 713c1a3744aa8c0bfadf85a76377dd2c7dd63519 (diff) | |
download | klee-ece5e79dbc01b8f672799b22774ce73abd2721f3.tar.gz |
Move ConstantExpr check inside optimizeExpr function
Diffstat (limited to 'lib/Expr')
-rw-r--r-- | lib/Expr/ArrayExprOptimizer.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Expr/ArrayExprOptimizer.cpp b/lib/Expr/ArrayExprOptimizer.cpp index 2d817e83..fbaffc23 100644 --- a/lib/Expr/ArrayExprOptimizer.cpp +++ b/lib/Expr/ArrayExprOptimizer.cpp @@ -43,6 +43,10 @@ llvm::cl::opt<double> ArrayValueSymbRatio( }; ref<Expr> ExprOptimizer::optimizeExpr(const ref<Expr> &e, bool valueOnly) { + // Nothing to optimise for constant expressions + if (isa<ConstantExpr>(e)) + return e; + unsigned hash = e->hash(); if (cacheExprUnapplicable.find(hash) != cacheExprUnapplicable.end()) return e; |