本文整理汇总了C++中ScalarEvolution::getUnknown方法的典型用法代码示例。如果您正苦于以下问题:C++ ScalarEvolution::getUnknown方法的具体用法?C++ ScalarEvolution::getUnknown怎么用?C++ ScalarEvolution::getUnknown使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ScalarEvolution
的用法示例。
在下文中一共展示了ScalarEvolution::getUnknown方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: createSubstitutions
void IslNodeBuilder::createSubstitutions(
__isl_take isl_pw_multi_aff *PMA, __isl_take isl_ast_build *Context,
ScopStmt *Stmt, ValueMapT &VMap, LoopToScevMapT <S) {
for (unsigned i = 0; i < isl_pw_multi_aff_dim(PMA, isl_dim_out); ++i) {
isl_pw_aff *Aff;
isl_ast_expr *Expr;
const Value *OldIV;
Value *V;
Aff = isl_pw_multi_aff_get_pw_aff(PMA, i);
Expr = isl_ast_build_expr_from_pw_aff(Context, Aff);
OldIV = Stmt->getInductionVariableForDimension(i);
V = ExprBuilder.create(Expr);
// CreateIntCast can introduce trunc expressions. This is correct, as the
// result will always fit into the type of the original induction variable
// (because we calculate a value of the original induction variable).
V = Builder.CreateIntCast(V, OldIV->getType(), true);
VMap[OldIV] = V;
ScalarEvolution *SE = Stmt->getParent()->getSE();
LTS[Stmt->getLoopForDimension(i)] = SE->getUnknown(V);
}
isl_pw_multi_aff_free(PMA);
isl_ast_build_free(Context);
}
示例2: createSubstitutions
void IslNodeBuilder::createSubstitutions(isl_ast_expr *Expr, ScopStmt *Stmt,
ValueMapT &VMap, LoopToScevMapT <S) {
assert(isl_ast_expr_get_type(Expr) == isl_ast_expr_op &&
"Expression of type 'op' expected");
assert(isl_ast_expr_get_op_type(Expr) == isl_ast_op_call &&
"Opertation of type 'call' expected");
for (int i = 0; i < isl_ast_expr_get_op_n_arg(Expr) - 1; ++i) {
isl_ast_expr *SubExpr;
Value *V;
SubExpr = isl_ast_expr_get_op_arg(Expr, i + 1);
V = ExprBuilder.create(SubExpr);
ScalarEvolution *SE = Stmt->getParent()->getSE();
LTS[Stmt->getLoopForDimension(i)] = SE->getUnknown(V);
// CreateIntCast can introduce trunc expressions. This is correct, as the
// result will always fit into the type of the original induction variable
// (because we calculate a value of the original induction variable).
const Value *OldIV = Stmt->getInductionVariableForDimension(i);
if (OldIV) {
V = Builder.CreateIntCast(V, OldIV->getType(), true);
VMap[OldIV] = V;
}
}
isl_ast_expr_free(Expr);
}