Lines Matching refs:Expr
73 bool IslExprBuilder::hasLargeInts(isl::ast_expr Expr) { in hasLargeInts() argument
74 enum isl_ast_expr_type Type = isl_ast_expr_get_type(Expr.get()); in hasLargeInts()
80 isl::val Val = Expr.get_val(); in hasLargeInts()
88 int NumArgs = isl_ast_expr_get_op_n_arg(Expr.get()); in hasLargeInts()
91 isl::ast_expr Operand = Expr.get_op_arg(i); in hasLargeInts()
173 Value *IslExprBuilder::createOpUnary(__isl_take isl_ast_expr *Expr) { in createOpUnary() argument
174 assert(isl_ast_expr_get_op_type(Expr) == isl_ast_op_minus && in createOpUnary()
178 Type *MaxType = getType(Expr); in createOpUnary()
182 V = create(isl_ast_expr_get_op_arg(Expr, 0)); in createOpUnary()
188 isl_ast_expr_free(Expr); in createOpUnary()
192 Value *IslExprBuilder::createOpNAry(__isl_take isl_ast_expr *Expr) { in createOpNAry() argument
193 assert(isl_ast_expr_get_type(Expr) == isl_ast_expr_op && in createOpNAry()
195 assert(isl_ast_expr_get_op_n_arg(Expr) >= 2 && in createOpNAry()
199 switch (isl_ast_expr_get_op_type(Expr)) { in createOpNAry()
210 Value *V = create(isl_ast_expr_get_op_arg(Expr, 0)); in createOpNAry()
212 for (int i = 1; i < isl_ast_expr_get_op_n_arg(Expr); ++i) { in createOpNAry()
213 Value *OpV = create(isl_ast_expr_get_op_arg(Expr, i)); in createOpNAry()
230 isl_ast_expr_free(Expr); in createOpNAry()
234 Value *IslExprBuilder::createAccessAddress(isl_ast_expr *Expr) { in createAccessAddress() argument
235 assert(isl_ast_expr_get_type(Expr) == isl_ast_expr_op && in createAccessAddress()
237 assert(isl_ast_expr_get_op_type(Expr) == isl_ast_op_access && in createAccessAddress()
239 assert(isl_ast_expr_get_op_n_arg(Expr) >= 1 && in createAccessAddress()
246 BaseExpr = isl_ast_expr_get_op_arg(Expr, 0); in createAccessAddress()
280 if (isl_ast_expr_get_op_n_arg(Expr) == 1) { in createAccessAddress()
281 isl_ast_expr_free(Expr); in createAccessAddress()
288 for (unsigned u = 1, e = isl_ast_expr_get_op_n_arg(Expr); u < e; u++) { in createAccessAddress()
289 Value *NextIndex = create(isl_ast_expr_get_op_arg(Expr, u)); in createAccessAddress()
340 isl_ast_expr_free(Expr); in createAccessAddress()
344 Value *IslExprBuilder::createOpAccess(isl_ast_expr *Expr) { in createOpAccess() argument
345 Value *Addr = createAccessAddress(Expr); in createOpAccess()
350 Value *IslExprBuilder::createOpBin(__isl_take isl_ast_expr *Expr) { in createOpBin() argument
355 assert(isl_ast_expr_get_type(Expr) == isl_ast_expr_op && in createOpBin()
357 assert(isl_ast_expr_get_op_n_arg(Expr) == 2 && in createOpBin()
360 OpType = isl_ast_expr_get_op_type(Expr); in createOpBin()
362 LHS = create(isl_ast_expr_get_op_arg(Expr, 0)); in createOpBin()
363 RHS = create(isl_ast_expr_get_op_arg(Expr, 1)); in createOpBin()
388 MaxType = getWidestType(MaxType, getType(Expr)); in createOpBin()
453 isl_ast_expr_free(Expr); in createOpBin()
457 Value *IslExprBuilder::createOpSelect(__isl_take isl_ast_expr *Expr) { in createOpSelect() argument
458 assert(isl_ast_expr_get_op_type(Expr) == isl_ast_op_select && in createOpSelect()
461 Type *MaxType = getType(Expr); in createOpSelect()
463 Cond = create(isl_ast_expr_get_op_arg(Expr, 0)); in createOpSelect()
467 LHS = create(isl_ast_expr_get_op_arg(Expr, 1)); in createOpSelect()
468 RHS = create(isl_ast_expr_get_op_arg(Expr, 2)); in createOpSelect()
480 isl_ast_expr_free(Expr); in createOpSelect()
484 Value *IslExprBuilder::createOpICmp(__isl_take isl_ast_expr *Expr) { in createOpICmp() argument
485 assert(isl_ast_expr_get_type(Expr) == isl_ast_expr_op && in createOpICmp()
490 auto *Op0 = isl_ast_expr_get_op_arg(Expr, 0); in createOpICmp()
491 auto *Op1 = isl_ast_expr_get_op_arg(Expr, 1); in createOpICmp()
523 isl_ast_op_type OpType = isl_ast_expr_get_op_type(Expr); in createOpICmp()
540 isl_ast_expr_free(Expr); in createOpICmp()
544 Value *IslExprBuilder::createOpBoolean(__isl_take isl_ast_expr *Expr) { in createOpBoolean() argument
545 assert(isl_ast_expr_get_type(Expr) == isl_ast_expr_op && in createOpBoolean()
551 OpType = isl_ast_expr_get_op_type(Expr); in createOpBoolean()
556 LHS = create(isl_ast_expr_get_op_arg(Expr, 0)); in createOpBoolean()
557 RHS = create(isl_ast_expr_get_op_arg(Expr, 1)); in createOpBoolean()
587 isl_ast_expr_free(Expr); in createOpBoolean()
592 IslExprBuilder::createOpBooleanConditional(__isl_take isl_ast_expr *Expr) { in createOpBooleanConditional() argument
593 assert(isl_ast_expr_get_type(Expr) == isl_ast_expr_op && in createOpBooleanConditional()
602 OpType = isl_ast_expr_get_op_type(Expr); in createOpBooleanConditional()
623 LHS = create(isl_ast_expr_get_op_arg(Expr, 0)); in createOpBooleanConditional()
634 RHS = create(isl_ast_expr_get_op_arg(Expr, 1)); in createOpBooleanConditional()
646 isl_ast_expr_free(Expr); in createOpBooleanConditional()
650 Value *IslExprBuilder::createOp(__isl_take isl_ast_expr *Expr) { in createOp() argument
651 assert(isl_ast_expr_get_type(Expr) == isl_ast_expr_op && in createOp()
653 switch (isl_ast_expr_get_op_type(Expr)) { in createOp()
660 return createOpAccess(Expr); in createOp()
663 return createOpNAry(Expr); in createOp()
672 return createOpBin(Expr); in createOp()
674 return createOpUnary(Expr); in createOp()
676 return createOpSelect(Expr); in createOp()
679 return createOpBoolean(Expr); in createOp()
682 return createOpBooleanConditional(Expr); in createOp()
688 return createOpICmp(Expr); in createOp()
690 return createOpAddressOf(Expr); in createOp()
696 Value *IslExprBuilder::createOpAddressOf(__isl_take isl_ast_expr *Expr) { in createOpAddressOf() argument
697 assert(isl_ast_expr_get_type(Expr) == isl_ast_expr_op && in createOpAddressOf()
699 assert(isl_ast_expr_get_op_n_arg(Expr) == 1 && "Address of should be unary."); in createOpAddressOf()
701 isl_ast_expr *Op = isl_ast_expr_get_op_arg(Expr, 0); in createOpAddressOf()
709 isl_ast_expr_free(Expr); in createOpAddressOf()
714 Value *IslExprBuilder::createId(__isl_take isl_ast_expr *Expr) { in createId() argument
715 assert(isl_ast_expr_get_type(Expr) == isl_ast_expr_id && in createId()
721 Id = isl_ast_expr_get_id(Expr); in createId()
727 V = UndefValue::get(getType(Expr)); in createId()
735 isl_ast_expr_free(Expr); in createId()
740 IntegerType *IslExprBuilder::getType(__isl_keep isl_ast_expr *Expr) { in getType() argument
748 Value *IslExprBuilder::createInt(__isl_take isl_ast_expr *Expr) { in createInt() argument
749 assert(isl_ast_expr_get_type(Expr) == isl_ast_expr_int && in createInt()
756 Val = isl_ast_expr_get_val(Expr); in createInt()
761 T = getType(Expr); in createInt()
768 isl_ast_expr_free(Expr); in createInt()
772 Value *IslExprBuilder::create(__isl_take isl_ast_expr *Expr) { in create() argument
773 switch (isl_ast_expr_get_type(Expr)) { in create()
777 return createOp(Expr); in create()
779 return createId(Expr); in create()
781 return createInt(Expr); in create()