Lines Matching refs:Expr
40 void apply(SetTheory &ST, DagInit *Expr, RecSet &Elts, in apply()
42 ST.evaluate(Expr->arg_begin(), Expr->arg_end(), Elts, Loc); in apply()
48 void apply(SetTheory &ST, DagInit *Expr, RecSet &Elts, in apply()
50 if (Expr->arg_size() < 2) in apply()
52 Expr->getAsString()); in apply()
54 ST.evaluate(*Expr->arg_begin(), Add, Loc); in apply()
55 ST.evaluate(Expr->arg_begin() + 1, Expr->arg_end(), Sub, Loc); in apply()
64 void apply(SetTheory &ST, DagInit *Expr, RecSet &Elts, in apply()
66 if (Expr->arg_size() != 2) in apply()
68 Expr->getAsString()); in apply()
70 ST.evaluate(Expr->arg_begin()[0], S1, Loc); in apply()
71 ST.evaluate(Expr->arg_begin()[1], S2, Loc); in apply()
80 virtual void apply2(SetTheory &ST, DagInit *Expr, RecSet &Set, int64_t N,
83 void apply(SetTheory &ST, DagInit *Expr, RecSet &Elts, in apply()
85 if (Expr->arg_size() != 2) in apply()
87 Expr->getAsString()); in apply()
89 ST.evaluate(Expr->arg_begin()[0], Set, Loc); in apply()
90 IntInit *II = dyn_cast<IntInit>(Expr->arg_begin()[1]); in apply()
93 Expr->getAsString()); in apply()
94 apply2(ST, Expr, Set, II->getValue(), Elts, Loc); in apply()
100 void apply2(SetTheory &ST, DagInit *Expr, RecSet &Set, int64_t N, in apply2()
104 Expr->getAsString()); in apply2()
112 void apply2(SetTheory &ST, DagInit *Expr, RecSet &Set, int64_t N, in apply2()
116 Expr->getAsString()); in apply2()
129 void apply2(SetTheory &ST, DagInit *Expr, RecSet &Set, int64_t N, in apply2()
147 void apply2(SetTheory &ST, DagInit *Expr, RecSet &Set, int64_t N, in apply2()
151 Expr->getAsString()); in apply2()
159 void apply(SetTheory &ST, DagInit *Expr, RecSet &Elts, in apply()
162 SmallVector<RecSet, 4> Args(Expr->getNumArgs()); in apply()
164 for (unsigned i = 0, e = Expr->getNumArgs(); i != e; ++i) { in apply()
165 ST.evaluate(Expr->getArg(i), Args[i], Loc); in apply()
170 for (unsigned i = 0, e = Expr->getNumArgs(); i != e; ++i) in apply()
178 void apply(SetTheory &ST, DagInit *Expr, RecSet &Elts, in apply()
181 if (Expr->arg_size() > 4) in apply()
183 Expr->getAsString()); in apply()
184 else if (Expr->arg_size() == 4) { in apply()
185 if (IntInit *II = dyn_cast<IntInit>(Expr->arg_begin()[3])) { in apply()
189 Expr->getAsString()); in apply()
193 if (StringInit *SI = dyn_cast<StringInit>(Expr->arg_begin()[0])) in apply()
196 PrintFatalError(Loc, "Format must be a string: " + Expr->getAsString()); in apply()
199 if (IntInit *II = dyn_cast<IntInit>(Expr->arg_begin()[1])) in apply()
202 PrintFatalError(Loc, "From must be an integer: " + Expr->getAsString()); in apply()
206 if (IntInit *II = dyn_cast<IntInit>(Expr->arg_begin()[2])) in apply()
209 PrintFatalError(Loc, "To must be an integer: " + Expr->getAsString()); in apply()
214 cast<DefInit>(Expr->getOperator())->getDef()->getRecords(); in apply()
228 Expr->getAsString()); in apply()
282 void SetTheory::evaluate(Init *Expr, RecSet &Elts, ArrayRef<SMLoc> Loc) { in evaluate() argument
284 if (DefInit *Def = dyn_cast<DefInit>(Expr)) { in evaluate()
292 if (ListInit *LI = dyn_cast<ListInit>(Expr)) in evaluate()
296 DagInit *DagExpr = dyn_cast<DagInit>(Expr); in evaluate()
298 PrintFatalError(Loc, "Invalid set element: " + Expr->getAsString()); in evaluate()
301 PrintFatalError(Loc, "Bad set expression: " + Expr->getAsString()); in evaluate()
304 PrintFatalError(Loc, "Unknown set operator: " + Expr->getAsString()); in evaluate()