diff options
Diffstat (limited to 'lib/Expr/ArrayExprOptimizer.cpp')
-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 fbaffc23..0929efb5 100644 --- a/lib/Expr/ArrayExprOptimizer.cpp +++ b/lib/Expr/ArrayExprOptimizer.cpp @@ -47,6 +47,10 @@ ref<Expr> ExprOptimizer::optimizeExpr(const ref<Expr> &e, bool valueOnly) { if (isa<ConstantExpr>(e)) return e; + // If no is optimization enabled, return early avoid cache lookup + if (OptimizeArray == NONE) + return e; + unsigned hash = e->hash(); if (cacheExprUnapplicable.find(hash) != cacheExprUnapplicable.end()) return e; |