Lines Matching refs:expr
93 Value genSingleExpr(const ast::Expr *expr);
94 SmallVector<Value> genExpr(const ast::Expr *expr);
95 Value genExprImpl(const ast::AttributeExpr *expr);
96 SmallVector<Value> genExprImpl(const ast::CallExpr *expr);
97 SmallVector<Value> genExprImpl(const ast::DeclRefExpr *expr);
98 Value genExprImpl(const ast::MemberAccessExpr *expr);
99 Value genExprImpl(const ast::OperationExpr *expr);
100 SmallVector<Value> genExprImpl(const ast::TupleExpr *expr);
101 Value genExprImpl(const ast::TypeExpr *expr);
184 .Case([&](const ast::Expr *expr) { genExpr(expr); }); in gen() argument
377 Value CodeGen::genSingleExpr(const ast::Expr *expr) { in genSingleExpr() argument
378 return TypeSwitch<const ast::Expr *, Value>(expr) in genSingleExpr()
390 SmallVector<Value> CodeGen::genExpr(const ast::Expr *expr) { in genExpr() argument
391 return TypeSwitch<const ast::Expr *, SmallVector<Value>>(expr) in genExpr()
394 .Default([&](const ast::Expr *expr) -> SmallVector<Value> { in genExpr() argument
395 return {genSingleExpr(expr)}; in genExpr()
399 Value CodeGen::genExprImpl(const ast::AttributeExpr *expr) { in genExprImpl() argument
400 Attribute attr = parseAttribute(expr->getValue(), builder.getContext()); in genExprImpl()
402 return builder.create<pdl::AttributeOp>(genLoc(expr->getLoc()), attr); in genExprImpl()
405 SmallVector<Value> CodeGen::genExprImpl(const ast::CallExpr *expr) { in genExprImpl() argument
406 Location loc = genLoc(expr->getLoc()); in genExprImpl()
408 for (const ast::Expr *arg : expr->getArguments()) in genExprImpl()
412 auto *callableExpr = dyn_cast<ast::DeclRefExpr>(expr->getCallableExpr()); in genExprImpl()
424 SmallVector<Value> CodeGen::genExprImpl(const ast::DeclRefExpr *expr) { in genExprImpl() argument
425 if (const auto *varDecl = dyn_cast<ast::VariableDecl>(expr->getDecl())) in genExprImpl()
430 Value CodeGen::genExprImpl(const ast::MemberAccessExpr *expr) { in genExprImpl() argument
431 Location loc = genLoc(expr->getLoc()); in genExprImpl()
432 StringRef name = expr->getMemberName(); in genExprImpl()
433 SmallVector<Value> parentExprs = genExpr(expr->getParentExpr()); in genExprImpl()
434 ast::Type parentType = expr->getParentExpr()->getType(); in genExprImpl()
438 if (isa<ast::AllResultsMemberAccessExpr>(expr)) { in genExprImpl()
439 Type mlirType = genType(expr->getType()); in genExprImpl()
453 return builder.create<pdl::ResultOp>(loc, genType(expr->getType()), in genExprImpl()
472 return builder.create<pdl::ResultsOp>(loc, genType(expr->getType()), in genExprImpl()
494 Value CodeGen::genExprImpl(const ast::OperationExpr *expr) { in genExprImpl() argument
495 Location loc = genLoc(expr->getLoc()); in genExprImpl()
496 Optional<StringRef> opName = expr->getName(); in genExprImpl()
500 for (const ast::Expr *operand : expr->getOperands()) in genExprImpl()
506 for (const ast::NamedAttributeDecl *attr : expr->getAttributes()) { in genExprImpl()
513 for (const ast::Expr *result : expr->getResultTypes()) in genExprImpl()
520 SmallVector<Value> CodeGen::genExprImpl(const ast::TupleExpr *expr) { in genExprImpl() argument
522 for (const ast::Expr *element : expr->getElements()) in genExprImpl()
527 Value CodeGen::genExprImpl(const ast::TypeExpr *expr) { in genExprImpl() argument
528 Type type = parseType(expr->getValue(), builder.getContext()); in genExprImpl()
530 return builder.create<pdl::TypeOp>(genLoc(expr->getLoc()), in genExprImpl()