diff --git a/taichi/analysis/gen_offline_cache_key.cpp b/taichi/analysis/gen_offline_cache_key.cpp index 678076650e51a..bab660c68409b 100644 --- a/taichi/analysis/gen_offline_cache_key.cpp +++ b/taichi/analysis/gen_offline_cache_key.cpp @@ -236,6 +236,11 @@ class ASTSerializer : public IRVisitor, public ExpressionVisitor { emit(expr->conv_type); } + void visit(ReferenceExpression *expr) override { + emit(ExprOpCode::ReferenceExpression); + emit(expr->var); + } + void visit(Block *block) override { emit(StmtOpCode::EnterBlock); emit(static_cast(block->statements.size()));