//-------------------------- VALUE-BASED OPTIMIZATION------------------------// ExprVisitor::Action ArrayReadExprVisitor::visitConcat(const ConcatExpr &ce) { ReadExpr *base = ArrayExprHelper::hasOrderedReads(ce); if (base) { return inspectRead(ce.hash(), ce.getWidth(), *base); } return Action::doChildren(); }
ExprVisitor::Action ArrayValueOptReplaceVisitor::visitConcat(const ConcatExpr &ce) { auto found = optimized.find(ce.hash()); if (found != optimized.end()) { return Action::changeTo((*found).second.get()); } return Action::doChildren(); }