expr 39 python_bindings/python/Expr.cpp std::string expr_repr(const h::Expr &expr) { expr 43 python_bindings/python/Expr.cpp const h::Type &t = expr.type(); expr 26 python_bindings/python/Function.cpp .def_readwrite("expr", &ExternFuncArgument::expr) expr 113 src/AlignLoads.cpp expr = Shuffle::make_slice(dense, shift, stride, lanes); expr 125 src/AlignLoads.cpp expr = Shuffle::make_slice(native_load, 0, 1, lanes); expr 138 src/AlignLoads.cpp expr = Shuffle::make_concat(slices); expr 149 src/AlignLoads.cpp expr = Shuffle::make_slice(aligned_load, aligned_offset, 1, lanes); expr 176 src/AlignLoads.cpp void visit(const Let *op) { visit_let(expr, op); } expr 55 src/Associativity.cpp op = expr.as<Call>(); expr 75 src/Associativity.cpp expr = Variable::make(op->type, op_x_names[op->value_index]); expr 418 src/Associativity.cpp if (assoc_op.xs[index].expr.defined()) { expr 424 src/Associativity.cpp if (assoc_op.ys[index].expr.defined()) { expr 487 src/Associativity.cpp internal_assert(equal(result.xs[i].expr, assoc_op.xs[i].expr)) expr 490 src/Associativity.cpp << " Expect x: " << assoc_op.xs[i].expr << "\n" expr 491 src/Associativity.cpp << " instead of " << result.xs[i].expr << "\n"; expr 492 src/Associativity.cpp internal_assert(equal(result.ys[i].expr, assoc_op.ys[i].expr)) expr 495 src/Associativity.cpp << " Expect y: " << assoc_op.ys[i].expr << "\n" expr 496 src/Associativity.cpp << " instead of " << result.ys[i].expr << "\n"; expr 498 src/Associativity.cpp if (result.xs[i].expr.defined()) { expr 499 src/Associativity.cpp replacement.emplace(assoc_op.xs[i].var, Variable::make(result.xs[i].expr.type(), result.xs[i].var)); expr 501 src/Associativity.cpp internal_assert(result.ys[i].expr.defined()); expr 502 src/Associativity.cpp replacement.emplace(assoc_op.ys[i].var, Variable::make(result.ys[i].expr.type(), result.ys[i].var)); expr 516 src/Associativity.cpp debug(5) << " x: " << result.xs[i].var << " -> " << result.xs[i].expr << "\n"; expr 517 src/Associativity.cpp debug(5) << " y: " << result.ys[i].var << " -> " << result.ys[i].expr << "\n"; expr 56 src/Associativity.h Expr expr; expr 59 src/Associativity.h Replacement(const std::string &var, Expr expr) : var(var), expr(expr) {} expr 62 src/Associativity.h return (var == other.var) && equal(expr, other.expr); expr 783 src/Bounds.cpp Interval bounds_of_expr_in_scope(Expr expr, const Scope<Interval> &scope, const FuncValueBounds &fb) { expr 786 src/Bounds.cpp expr.accept(&b); expr 790 src/Bounds.cpp << "Min of " << expr expr 795 src/Bounds.cpp << "Max of " << expr expr 30 src/Bounds.h Interval bounds_of_expr_in_scope(Expr expr, expr 492 src/BoundsInference.cpp bounds_inference_args.push_back(args[j].expr); expr 295 src/CPlusPlusMangle.cpp result += prev_decls.check_and_enter_type(mangle_type(arg.is_expr() ? arg.expr.type() : type_of<struct halide_buffer_t *>(), target, prev_decls)); expr 588 src/CPlusPlusMangle.cpp result += mangle_type(arg.is_expr() ? arg.expr.type() : type_of<struct halide_buffer_t *>(), target, prevs); expr 69 src/CSE.cpp Expr expr; expr 101 src/CSE.cpp internal_assert(entries[number].expr.type() == e.type()); expr 102 src/CSE.cpp return entries[number].expr; expr 110 src/CSE.cpp internal_assert(entries[number].expr.type() == e.type()); expr 111 src/CSE.cpp return entries[number].expr; expr 120 src/CSE.cpp internal_assert(entries[number].expr.type() == e.type()); expr 121 src/CSE.cpp return entries[number].expr; expr 134 src/CSE.cpp internal_assert(entries[number].expr.type() == old_e.type()); expr 135 src/CSE.cpp return entries[number].expr; expr 164 src/CSE.cpp expr = body; expr 175 src/CSE.cpp expr = op; expr 177 src/CSE.cpp expr = Load::make(op->type, op->name, index, op->image, op->param, predicate); expr 287 src/CSE.cpp Expr old = e.expr; expr 290 src/CSE.cpp lets.push_back({ name, e.expr }); expr 292 src/CSE.cpp replacements[e.expr] = Variable::make(e.expr.type(), name); expr 294 src/CSE.cpp debug(4) << i << ": " << e.expr << ", " << e.use_count << "\n"; expr 339 src/CSE.cpp expr = var; expr 341 src/CSE.cpp expr = Variable::make(var->type, iter->second); expr 350 src/CSE.cpp expr = Let::make(new_name, value, body); expr 49 src/CodeGen_GPU_Dev.cpp bool CodeGen_GPU_Dev::is_block_uniform(Expr expr) { expr 51 src/CodeGen_GPU_Dev.cpp expr.accept(&v); expr 53 src/CodeGen_GPU_Dev.h static bool is_block_uniform(Expr expr); expr 168 src/CodeGen_Hexagon.cpp expr = Load::make(op->type, op->name, index, op->image, op->param, predicate); expr 287 src/CodeGen_Internal.cpp expr = Call::make(op->type, Call::if_then_else, {scalar_pred->value, unpredicated_load, make_zero(op->type)}, expr 306 src/CodeGen_Internal.cpp expr = Shuffle::make(lanes, ramp); expr 307 src/CodeGen_Internal.cpp expr = Let::make(predicate_name, predicate, expr); expr 308 src/CodeGen_Internal.cpp expr = Let::make(index_name, index, expr); expr 94 src/CodeGen_Metal_Dev.cpp string expr = print_expr(e); expr 96 src/CodeGen_Metal_Dev.cpp stream << print_type(e.type()) << " " << temp << " = " << expr << ";\n"; expr 300 src/CodeGen_OpenGL_Dev.cpp string expr = print_expr(op->vectors[0]); expr 310 src/CodeGen_OpenGL_Dev.cpp print_assignment(op->type, expr + "." + swizzle); expr 122 src/CodeGen_OpenGL_Dev.h std::vector<std::string> print_lanes(Expr expr); expr 47 src/Deinterleave.cpp expr = op; expr 56 src/Deinterleave.cpp expr = op; expr 163 src/Deinterleave.cpp expr = op->value; expr 165 src/Deinterleave.cpp expr = Broadcast::make(op->value, new_lanes); expr 171 src/Deinterleave.cpp expr = op; expr 174 src/Deinterleave.cpp expr = Load::make(t, op->name, mutate(op->index), op->image, op->param, mutate(op->predicate)); expr 179 src/Deinterleave.cpp expr = op->base + starting_lane * op->stride; expr 180 src/Deinterleave.cpp internal_assert(expr.type() == op->base.type()); expr 182 src/Deinterleave.cpp expr = Ramp::make(expr, op->stride * lane_stride, new_lanes); expr 188 src/Deinterleave.cpp expr = op; expr 193 src/Deinterleave.cpp expr = internal.get(op->name); expr 197 src/Deinterleave.cpp expr = Variable::make(t, op->name + ".even_lanes", op->image, op->param, op->reduction_domain); expr 201 src/Deinterleave.cpp expr = Variable::make(t, op->name + ".odd_lanes", op->image, op->param, op->reduction_domain); expr 205 src/Deinterleave.cpp expr = Variable::make(t, op->name + ".lanes_0_of_3", op->image, op->param, op->reduction_domain); expr 209 src/Deinterleave.cpp expr = Variable::make(t, op->name + ".lanes_1_of_3", op->image, op->param, op->reduction_domain); expr 213 src/Deinterleave.cpp expr = Variable::make(t, op->name + ".lanes_2_of_3", op->image, op->param, op->reduction_domain); expr 221 src/Deinterleave.cpp expr = Shuffle::make({op}, indices); expr 228 src/Deinterleave.cpp expr = op; expr 231 src/Deinterleave.cpp expr = Cast::make(t, mutate(op->value)); expr 240 src/Deinterleave.cpp expr = op; expr 248 src/Deinterleave.cpp expr = Shuffle::make({op}, indices); expr 263 src/Deinterleave.cpp expr = Call::make(t, op->name, args, op->call_type, expr 279 src/Deinterleave.cpp expr = Let::make(new_name, new_value, body); expr 282 src/Deinterleave.cpp expr = Let::make(op->name, op->value, expr); expr 292 src/Deinterleave.cpp expr = op->vectors[starting_lane]; expr 299 src/Deinterleave.cpp expr = Shuffle::make_interleave(new_vectors); expr 307 src/Deinterleave.cpp expr = Shuffle::make({op}, indices); expr 316 src/Deinterleave.cpp expr = Shuffle::make({op}, indices); expr 452 src/Deinterleave.cpp expr = visit_let<Let, Expr>(op); expr 503 src/Deinterleave.cpp expr = Load::make(op->type, op->name, idx, op->image, op->param, predicate); expr 504 src/Deinterleave.cpp expr = deinterleave_expr(expr); expr 509 src/Deinterleave.cpp expr = Load::make(op->type, op->name, idx, op->image, op->param, predicate); expr 514 src/Deinterleave.cpp expr = Load::make(op->type, op->name, idx, op->image, op->param, predicate); expr 516 src/Deinterleave.cpp expr = Load::make(op->type, op->name, idx, op->image, op->param, predicate); expr 518 src/Deinterleave.cpp expr = op; expr 17 src/EliminateBoolVectors.cpp expr = Variable::make(lets.get(op->name), op->name); expr 19 src/EliminateBoolVectors.cpp expr = op; expr 45 src/EliminateBoolVectors.cpp expr = T::make(a, b); expr 47 src/EliminateBoolVectors.cpp expr = op; expr 53 src/EliminateBoolVectors.cpp expr = Call::make(t.with_code(Type::Int), Call::bool_to_mask, {expr}, Call::PureIntrinsic); expr 81 src/EliminateBoolVectors.cpp expr = Call::make(t, bitwise_op, {a, b}, Call::PureIntrinsic); expr 83 src/EliminateBoolVectors.cpp expr = T::make(a, b); expr 85 src/EliminateBoolVectors.cpp expr = op; expr 101 src/EliminateBoolVectors.cpp expr = Call::make(a.type(), Call::bitwise_not, {a}, Call::PureIntrinsic); expr 103 src/EliminateBoolVectors.cpp expr = Not::make(a); expr 105 src/EliminateBoolVectors.cpp expr = op; expr 112 src/EliminateBoolVectors.cpp expr = mutate(Select::make(op->value, expr 117 src/EliminateBoolVectors.cpp expr = mutate(op->value != make_zero(op->value.type())); expr 160 src/EliminateBoolVectors.cpp expr = Call::make(true_value.type(), Call::select_mask, {cond, true_value, false_value}, Call::PureIntrinsic); expr 164 src/EliminateBoolVectors.cpp expr = Select::make(cond, true_value, false_value); expr 166 src/EliminateBoolVectors.cpp expr = op; expr 173 src/EliminateBoolVectors.cpp expr = Broadcast::make(Call::make(Int(8), Call::bool_to_mask, {value}, Call::PureIntrinsic), op->lanes); expr 175 src/EliminateBoolVectors.cpp expr = Broadcast::make(value, op->lanes); expr 177 src/EliminateBoolVectors.cpp expr = op; expr 184 src/EliminateBoolVectors.cpp op = expr.as<Shuffle>(); expr 188 src/EliminateBoolVectors.cpp expr = Call::make(Bool(), Call::extract_mask_element, {Shuffle::make_concat(op->vectors), op->indices[0]}, Call::PureIntrinsic); expr 216 src/EliminateBoolVectors.cpp void visit(const Let *op) { expr = visit_let<Expr>(op); } expr 363 src/Func.cpp c = expr.as<Call>(); expr 374 src/Func.cpp expr = Call::make(substitute, args, c->value_index); expr 397 src/Func.cpp for (auto &expr : exprs) { expr 398 src/Func.cpp expr = substitute(name, value, expr); expr 73 src/Function.cpp i.expr.accept(visitor); expr 105 src/Function.cpp i.expr = mutator->mutate(i.expr); expr 209 src/Function.cpp c = expr.as<Call>(); expr 212 src/Function.cpp expr = Call::make(c->type, c->name, c->args, c->call_type, expr 268 src/Function.cpp copy.expr = src.expr; expr 899 src/Function.cpp c = expr.as<Call>(); expr 906 src/Function.cpp expr = Call::make(subs, c->args, c->value_index); expr 920 src/Function.cpp expr = mutate(v->param.get_scalar_expr()); expr 31 src/Function.h Expr expr; expr 38 src/Function.h ExternFuncArgument(Expr e): arg_type(ExprArg), expr(e) {} expr 39 src/Function.h ExternFuncArgument(int e): arg_type(ExprArg), expr(e) {} expr 40 src/Function.h ExternFuncArgument(float e): arg_type(ExprArg), expr(e) {} expr 361 src/FuseGPUThreadLoops.cpp expr = Load::make(op->type, shared_mem_name + "_" + op->name, expr 365 src/FuseGPUThreadLoops.cpp expr = Load::make(op->type, shared_mem_name, base + index, expr 1707 src/Generator.cpp auto e = in.expr(); expr 1040 src/Generator.h Expr expr() const { expr 579 src/HexagonOffload.cpp expr = Load::make(op->type, op->name, mutate(op->index), op->image, expr 77 src/HexagonOptimize.cpp expr = Cast::make(with_lanes(op->type), mutate(op->value)); expr 85 src/HexagonOptimize.cpp expr = Variable::make(with_lanes(op->type), op->name); expr 87 src/HexagonOptimize.cpp expr = op; expr 93 src/HexagonOptimize.cpp expr = Broadcast::make(op->value, lanes); expr 345 src/HexagonOptimize.cpp expr = new_expr; expr 351 src/HexagonOptimize.cpp expr = new_expr; expr 508 src/HexagonOptimize.cpp expr = mutate(new_expr); expr 547 src/HexagonOptimize.cpp expr = mutate(new_expr); expr 592 src/HexagonOptimize.cpp expr = mutate(new_expr); expr 666 src/HexagonOptimize.cpp expr = new_expr; expr 678 src/HexagonOptimize.cpp expr = mutate(op->a + neg_b); expr 691 src/HexagonOptimize.cpp expr = new_expr; expr 712 src/HexagonOptimize.cpp if (expr_match(i.second, expr, matches) && equal(matches[0], matches[1])) { expr 713 src/HexagonOptimize.cpp expr = Call::make(op->type, i.first, {matches[0]}, Call::PureExtern) + 1; expr 859 src/HexagonOptimize.cpp expr = new_expr; expr 870 src/HexagonOptimize.cpp expr = substitute("*", matches[0], replacement); expr 871 src/HexagonOptimize.cpp expr = mutate(expr); expr 884 src/HexagonOptimize.cpp expr = mutate(lower_lerp(op->args[0], op->args[1], op->args[2])); expr 891 src/HexagonOptimize.cpp expr = mutate(Cast::make(dst_type, op->args[0])); expr 901 src/HexagonOptimize.cpp expr = mutate(e); expr 1028 src/HexagonOptimize.cpp expr = T::make(a, b); expr 1029 src/HexagonOptimize.cpp if (expr.type().bits() == 1) { expr 1033 src/HexagonOptimize.cpp expr = native_interleave(expr); expr 1036 src/HexagonOptimize.cpp expr = T::make(a, b); expr 1038 src/HexagonOptimize.cpp expr = op; expr 1084 src/HexagonOptimize.cpp expr = native_interleave(Select::make(cond, true_value, false_value)); expr 1088 src/HexagonOptimize.cpp expr = Select::make(cond, true_value, false_value); expr 1090 src/HexagonOptimize.cpp expr = op; expr 1170 src/HexagonOptimize.cpp visit_let(expr, op); expr 1173 src/HexagonOptimize.cpp const Let *let = expr.as<Let>(); expr 1175 src/HexagonOptimize.cpp expr = native_interleave(Let::make(let->name, let->value, remove_interleave(let->body))); expr 1188 src/HexagonOptimize.cpp expr = native_interleave(Cast::make(op->type, value)); expr 1190 src/HexagonOptimize.cpp expr = Cast::make(op->type, value); expr 1192 src/HexagonOptimize.cpp expr = op; expr 1248 src/HexagonOptimize.cpp expr = Call::make(op->type, Call::bool_to_mask, {arg}, Call::PureIntrinsic); expr 1250 src/HexagonOptimize.cpp expr = native_interleave(expr); expr 1254 src/HexagonOptimize.cpp expr = op; expr 1305 src/HexagonOptimize.cpp expr = remove_interleave(args[0]); expr 1313 src/HexagonOptimize.cpp expr = Call::make(op->type, op->name, args, op->call_type, expr 1316 src/HexagonOptimize.cpp expr = native_interleave(expr); expr 1325 src/HexagonOptimize.cpp expr = Call::make(op->type, deinterleaving_alts[op->name], args, op->call_type); expr 1332 src/HexagonOptimize.cpp expr = Call::make(op->type, interleaving_alts[op->name], { arg }, op->call_type, expr 1335 src/HexagonOptimize.cpp expr = Call::make(op->type, op->name, args, op->call_type, expr 1338 src/HexagonOptimize.cpp expr = op; expr 1443 src/HexagonOptimize.cpp expr = native_interleave(expr); expr 1478 src/HexagonOptimize.cpp expr = Call::make(op->type, i.second, args, Call::PureExtern); expr 1593 src/HexagonOptimize.cpp expr = Call::make(op->type, "dynamic_shuffle", {lut, index, 0, const_extent - 1}, Call::PureIntrinsic); expr 1599 src/HexagonOptimize.cpp expr = Load::make(op->type, op->name, index, op->image, op->param, op->predicate); expr 1601 src/HexagonOptimize.cpp expr = op; expr 39 src/IREquality.cpp Expr expr; expr 153 src/IREquality.cpp expr = a; expr 235 src/IREquality.cpp const IntImm *e = expr.as<IntImm>(); expr 240 src/IREquality.cpp const UIntImm *e = expr.as<UIntImm>(); expr 245 src/IREquality.cpp const FloatImm *e = expr.as<FloatImm>(); expr 250 src/IREquality.cpp const StringImm *e = expr.as<StringImm>(); expr 255 src/IREquality.cpp compare_expr(expr.as<Cast>()->value, op->value); expr 259 src/IREquality.cpp const Variable *e = expr.as<Variable>(); expr 265 src/IREquality.cpp void visit_binary_operator(IRComparer *cmp, const T *op, Expr expr) { expr 266 src/IREquality.cpp const T *e = expr.as<T>(); expr 272 src/IREquality.cpp void IRComparer::visit(const Add *op) {visit_binary_operator(this, op, expr);} expr 273 src/IREquality.cpp void IRComparer::visit(const Sub *op) {visit_binary_operator(this, op, expr);} expr 274 src/IREquality.cpp void IRComparer::visit(const Mul *op) {visit_binary_operator(this, op, expr);} expr 275 src/IREquality.cpp void IRComparer::visit(const Div *op) {visit_binary_operator(this, op, expr);} expr 276 src/IREquality.cpp void IRComparer::visit(const Mod *op) {visit_binary_operator(this, op, expr);} expr 277 src/IREquality.cpp void IRComparer::visit(const Min *op) {visit_binary_operator(this, op, expr);} expr 278 src/IREquality.cpp void IRComparer::visit(const Max *op) {visit_binary_operator(this, op, expr);} expr 279 src/IREquality.cpp void IRComparer::visit(const EQ *op) {visit_binary_operator(this, op, expr);} expr 280 src/IREquality.cpp void IRComparer::visit(const NE *op) {visit_binary_operator(this, op, expr);} expr 281 src/IREquality.cpp void IRComparer::visit(const LT *op) {visit_binary_operator(this, op, expr);} expr 282 src/IREquality.cpp void IRComparer::visit(const LE *op) {visit_binary_operator(this, op, expr);} expr 283 src/IREquality.cpp void IRComparer::visit(const GT *op) {visit_binary_operator(this, op, expr);} expr 284 src/IREquality.cpp void IRComparer::visit(const GE *op) {visit_binary_operator(this, op, expr);} expr 285 src/IREquality.cpp void IRComparer::visit(const And *op) {visit_binary_operator(this, op, expr);} expr 286 src/IREquality.cpp void IRComparer::visit(const Or *op) {visit_binary_operator(this, op, expr);} expr 289 src/IREquality.cpp const Not *e = expr.as<Not>(); expr 294 src/IREquality.cpp const Select *e = expr.as<Select>(); expr 302 src/IREquality.cpp const Load *e = expr.as<Load>(); expr 309 src/IREquality.cpp const Ramp *e = expr.as<Ramp>(); expr 316 src/IREquality.cpp const Broadcast *e = expr.as<Broadcast>(); expr 321 src/IREquality.cpp const Call *e = expr.as<Call>(); expr 330 src/IREquality.cpp const Let *e = expr.as<Let>(); expr 444 src/IREquality.cpp const Shuffle *e = expr.as<Shuffle>(); expr 455 src/IREquality.cpp const Prefetch *s = expr.as<Prefetch>(); expr 501 src/IREquality.cpp cmp.compare_expr(expr, other.expr); expr 94 src/IREquality.h Expr expr; expr 98 src/IREquality.h ExprWithCompareCache(const Expr &e, IRCompareCache *c) : expr(e), cache(c) {} expr 57 src/IRMatch.cpp Expr expr; expr 74 src/IRMatch.cpp const IntImm *e = expr.as<IntImm>(); expr 83 src/IRMatch.cpp const UIntImm *e = expr.as<UIntImm>(); expr 92 src/IRMatch.cpp const FloatImm *e = expr.as<FloatImm>(); expr 104 src/IRMatch.cpp const Cast *e = expr.as<Cast>(); expr 106 src/IRMatch.cpp expr = e->value; expr 118 src/IRMatch.cpp if (!types_match(op->type, expr.type())) { expr 122 src/IRMatch.cpp matches->push_back(expr); expr 124 src/IRMatch.cpp const Variable *e = expr.as<Variable>(); expr 130 src/IRMatch.cpp result = equal(match, expr); expr 132 src/IRMatch.cpp match = expr; expr 139 src/IRMatch.cpp const T *e = expr.as<T>(); expr 141 src/IRMatch.cpp expr = e->a; expr 143 src/IRMatch.cpp expr = e->b; expr 167 src/IRMatch.cpp const Not *e = expr.as<Not>(); expr 169 src/IRMatch.cpp expr = e->a; expr 177 src/IRMatch.cpp const Select *e = expr.as<Select>(); expr 179 src/IRMatch.cpp expr = e->condition; expr 181 src/IRMatch.cpp expr = e->true_value; expr 183 src/IRMatch.cpp expr = e->false_value; expr 191 src/IRMatch.cpp const Load *e = expr.as<Load>(); expr 193 src/IRMatch.cpp expr = e->predicate; expr 195 src/IRMatch.cpp expr = e->index; expr 203 src/IRMatch.cpp const Ramp *e = expr.as<Ramp>(); expr 205 src/IRMatch.cpp expr = e->base; expr 207 src/IRMatch.cpp expr = e->stride; expr 215 src/IRMatch.cpp const Broadcast *e = expr.as<Broadcast>(); expr 217 src/IRMatch.cpp expr = e->value; expr 225 src/IRMatch.cpp const Call *e = expr.as<Call>(); expr 233 src/IRMatch.cpp expr = e->args[i]; expr 242 src/IRMatch.cpp const Let *e = expr.as<Let>(); expr 244 src/IRMatch.cpp expr = e->value; expr 246 src/IRMatch.cpp expr = e->body; expr 254 src/IRMatch.cpp bool expr_match(Expr pattern, Expr expr, vector<Expr> &matches) { expr 256 src/IRMatch.cpp if (!pattern.defined() && !expr.defined()) return true; expr 257 src/IRMatch.cpp if (!pattern.defined() || !expr.defined()) return false; expr 259 src/IRMatch.cpp IRMatch eq(expr, matches); expr 269 src/IRMatch.cpp bool expr_match(Expr pattern, Expr expr, map<string, Expr> &matches) { expr 273 src/IRMatch.cpp if (!pattern.defined() && !expr.defined()) return true; expr 274 src/IRMatch.cpp if (!pattern.defined() || !expr.defined()) return false; expr 276 src/IRMatch.cpp IRMatch eq(expr, matches); expr 30 src/IRMatch.h EXPORT bool expr_match(Expr pattern, Expr expr, std::vector<Expr> &result); expr 44 src/IRMatch.h EXPORT bool expr_match(Expr pattern, Expr expr, std::map<std::string, Expr> &result); expr 13 src/IRMutator.cpp expr = Expr(); expr 16 src/IRMutator.cpp return expr; expr 25 src/IRMutator.cpp expr = Expr(); expr 31 src/IRMutator.cpp void mutate_binary_operator(IRMutator *mutator, const T *op, Expr *expr, Stmt *stmt) { expr 36 src/IRMutator.cpp *expr = op; expr 38 src/IRMutator.cpp *expr = T::make(a, b); expr 65 src/IRMutator.cpp void IRMutator::visit(const IntImm *op) {expr = op;} expr 66 src/IRMutator.cpp void IRMutator::visit(const UIntImm *op) {expr = op;} expr 67 src/IRMutator.cpp void IRMutator::visit(const FloatImm *op) {expr = op;} expr 68 src/IRMutator.cpp void IRMutator::visit(const StringImm *op) {expr = op;} expr 69 src/IRMutator.cpp void IRMutator::visit(const Variable *op) {expr = op;} expr 74 src/IRMutator.cpp expr = op; expr 76 src/IRMutator.cpp expr = Cast::make(op->type, value); expr 80 src/IRMutator.cpp void IRMutator::visit(const Add *op) {mutate_binary_operator(this, op, &expr, &stmt);} expr 81 src/IRMutator.cpp void IRMutator::visit(const Sub *op) {mutate_binary_operator(this, op, &expr, &stmt);} expr 82 src/IRMutator.cpp void IRMutator::visit(const Mul *op) {mutate_binary_operator(this, op, &expr, &stmt);} expr 83 src/IRMutator.cpp void IRMutator::visit(const Div *op) {mutate_binary_operator(this, op, &expr, &stmt);} expr 84 src/IRMutator.cpp void IRMutator::visit(const Mod *op) {mutate_binary_operator(this, op, &expr, &stmt);} expr 85 src/IRMutator.cpp void IRMutator::visit(const Min *op) {mutate_binary_operator(this, op, &expr, &stmt);} expr 86 src/IRMutator.cpp void IRMutator::visit(const Max *op) {mutate_binary_operator(this, op, &expr, &stmt);} expr 87 src/IRMutator.cpp void IRMutator::visit(const EQ *op) {mutate_binary_operator(this, op, &expr, &stmt);} expr 88 src/IRMutator.cpp void IRMutator::visit(const NE *op) {mutate_binary_operator(this, op, &expr, &stmt);} expr 89 src/IRMutator.cpp void IRMutator::visit(const LT *op) {mutate_binary_operator(this, op, &expr, &stmt);} expr 90 src/IRMutator.cpp void IRMutator::visit(const LE *op) {mutate_binary_operator(this, op, &expr, &stmt);} expr 91 src/IRMutator.cpp void IRMutator::visit(const GT *op) {mutate_binary_operator(this, op, &expr, &stmt);} expr 92 src/IRMutator.cpp void IRMutator::visit(const GE *op) {mutate_binary_operator(this, op, &expr, &stmt);} expr 93 src/IRMutator.cpp void IRMutator::visit(const And *op) {mutate_binary_operator(this, op, &expr, &stmt);} expr 94 src/IRMutator.cpp void IRMutator::visit(const Or *op) {mutate_binary_operator(this, op, &expr, &stmt);} expr 98 src/IRMutator.cpp if (a.same_as(op->a)) expr = op; expr 99 src/IRMutator.cpp else expr = Not::make(a); expr 109 src/IRMutator.cpp expr = op; expr 111 src/IRMutator.cpp expr = Select::make(cond, t, f); expr 119 src/IRMutator.cpp expr = op; expr 121 src/IRMutator.cpp expr = Load::make(op->type, op->name, index, op->image, op->param, predicate); expr 130 src/IRMutator.cpp expr = op; expr 132 src/IRMutator.cpp expr = Ramp::make(base, stride, op->lanes); expr 138 src/IRMutator.cpp if (value.same_as(op->value)) expr = op; expr 139 src/IRMutator.cpp else expr = Broadcast::make(value, op->lanes); expr 155 src/IRMutator.cpp expr = op; expr 157 src/IRMutator.cpp expr = Call::make(op->type, op->name, new_args, op->call_type, expr 167 src/IRMutator.cpp expr = op; expr 169 src/IRMutator.cpp expr = Let::make(op->name, value, body); expr 360 src/IRMutator.cpp expr = op; expr 362 src/IRMutator.cpp expr = Shuffle::make(new_vectors, op->indices); expr 31 src/IRMutator.h EXPORT virtual Expr mutate(Expr expr); expr 38 src/IRMutator.h Expr expr; expr 163 src/IRPrinter.cpp stream << " " << op.xs[i].var << " -> " << op.xs[i].expr << "\n"; expr 164 src/IRPrinter.cpp stream << " " << op.ys[i].var << " -> " << op.ys[i].expr << "\n"; expr 139 src/IRVisitor.cpp arg.expr.accept(this); expr 133 src/InjectHostDevBufferCopies.cpp expr = make_zero(Handle()); expr 135 src/InjectHostDevBufferCopies.cpp expr = op; expr 127 src/InjectImageIntrinsics.cpp expr = load_call; expr 72 src/InjectOpenGLIntrinsics.cpp expr = Call::make(call->type, Call::glsl_texture_load, expr 86 src/InjectOpenGLIntrinsics.cpp expr = Call::make(call->type, Call::glsl_texture_store, expr 118 src/Inline.cpp expr = body; expr 42 src/InlineReductions.cpp expr = op; expr 44 src/InlineReductions.cpp expr = Let::make(op->name, value, body); expr 51 src/InlineReductions.cpp expr = v; expr 68 src/InlineReductions.cpp expr = Variable::make(v->type, var_name); expr 149 src/LoopCarry.cpp expr = op; expr 152 src/LoopCarry.cpp expr = op; expr 155 src/LoopCarry.cpp expr = Expr(op) + step; expr 159 src/LoopCarry.cpp expr = op; expr 107 src/Memoization.cpp void record(const Expr &expr) { expr 109 src/Memoization.cpp info.type = expr.type(); expr 111 src/Memoization.cpp info.value_expr = expr; expr 491 src/Memoization.cpp expr = Call::make(type_of<struct halide_buffer_t *>(), Call::buffer_init, expr 78 src/ModulusRemainder.cpp bool reduce_expr_modulo(Expr expr, int modulus, int *remainder) { expr 79 src/ModulusRemainder.cpp ModulusRemainder result = modulus_remainder(expr); expr 95 src/ModulusRemainder.cpp bool reduce_expr_modulo(Expr expr, int modulus, int *remainder, const Scope<ModulusRemainder> &scope) { expr 96 src/ModulusRemainder.cpp ModulusRemainder result = modulus_remainder(expr, scope); expr 56 src/ParallelRVar.cpp expr = Variable::make(op->type, get_new_name(op->name)); expr 58 src/ParallelRVar.cpp expr = op; expr 84 src/ParallelRVar.cpp expr = substitute(op->name, mutate(op->value), mutate(op->body)); expr 37 src/PartitionLoops.cpp expr = min(likely(op->a), mutate(op->b)); expr 39 src/PartitionLoops.cpp expr = min(mutate(op->a), likely(op->b)); expr 47 src/PartitionLoops.cpp expr = max(likely(op->a), mutate(op->b)); expr 49 src/PartitionLoops.cpp expr = max(mutate(op->a), likely(op->b)); expr 86 src/PartitionLoops.cpp expr = mutate(op->args[0]); expr 898 src/PartitionLoops.cpp expr = mutate(Select::make(o->a, true_value, Select::make(o->b, true_value, false_value))); expr 902 src/PartitionLoops.cpp expr = mutate(Select::make(o->a, var, Select::make(o->b, var, false_value))); expr 903 src/PartitionLoops.cpp expr = Let::make(var_name, true_value, expr); expr 907 src/PartitionLoops.cpp expr = mutate(Select::make(a->a, Select::make(a->b, true_value, false_value), false_value)); expr 911 src/PartitionLoops.cpp expr = mutate(Select::make(a->a, Select::make(a->b, true_value, var), var)); expr 912 src/PartitionLoops.cpp expr = Let::make(var_name, false_value, expr); expr 915 src/PartitionLoops.cpp expr = mutate(Select::make(n->a, false_value, true_value)); expr 919 src/PartitionLoops.cpp expr = op; expr 921 src/PartitionLoops.cpp expr = Select::make(condition, true_value, false_value); expr 936 src/PartitionLoops.cpp expr = mutate(select(op->condition && t->condition, t->true_value, op->false_value)); expr 939 src/PartitionLoops.cpp expr = mutate(select(op->condition || f->condition, op->true_value, f->false_value)); expr 964 src/PartitionLoops.cpp expr = Call::make(op->type, Call::likely, {mutate(op->args[0])}, Call::PureIntrinsic); expr 966 src/PartitionLoops.cpp expr = mutate(op->args[0]); expr 135 src/Prefetch.cpp op = is_stmt ? stmt.as<LetOrLetStmt>() : expr.as<LetOrLetStmt>(); expr 155 src/Prefetch.cpp expr = let; expr 17 src/Qualify.cpp expr = v; expr 19 src/Qualify.cpp expr = Variable::make(v->type, prefix + v->name, v->reduction_domain); expr 25 src/Qualify.cpp expr = Let::make(prefix + op->name, value, body); expr 104 src/Random.cpp expr = random_float(args); expr 106 src/Random.cpp expr = cast<int32_t>(random_int(args)); expr 108 src/Random.cpp expr = random_int(args); expr 167 src/Reduction.cpp expr = Variable::make(op->type, op->name); expr 169 src/Reduction.cpp expr = op; expr 23 src/RemoveUndef.cpp expr = Expr(); expr 25 src/RemoveUndef.cpp expr = op; expr 32 src/RemoveUndef.cpp if (!expr.defined()) return; expr 34 src/RemoveUndef.cpp if (!expr.defined()) return; expr 37 src/RemoveUndef.cpp expr = op; expr 39 src/RemoveUndef.cpp expr = T::make(a, b); expr 46 src/RemoveUndef.cpp if (!expr.defined()) return; expr 48 src/RemoveUndef.cpp expr = op; expr 50 src/RemoveUndef.cpp expr = Cast::make(op->type, value); expr 72 src/RemoveUndef.cpp if (!expr.defined()) return; expr 74 src/RemoveUndef.cpp expr = op; expr 76 src/RemoveUndef.cpp else expr = Not::make(a); expr 85 src/RemoveUndef.cpp expr = Expr(); expr 90 src/RemoveUndef.cpp expr = Expr(); expr 109 src/RemoveUndef.cpp expr = t; expr 113 src/RemoveUndef.cpp expr = op; expr 115 src/RemoveUndef.cpp expr = Select::make(cond, t, f); expr 122 src/RemoveUndef.cpp if (!expr.defined()) return; expr 124 src/RemoveUndef.cpp expr = op; expr 126 src/RemoveUndef.cpp expr = Load::make(op->type, op->name, index, op->image, op->param, pred); expr 132 src/RemoveUndef.cpp if (!expr.defined()) return; expr 134 src/RemoveUndef.cpp if (!expr.defined()) return; expr 137 src/RemoveUndef.cpp expr = op; expr 139 src/RemoveUndef.cpp expr = Ramp::make(base, stride, op->lanes); expr 145 src/RemoveUndef.cpp if (!expr.defined()) return; expr 146 src/RemoveUndef.cpp if (value.same_as(op->value)) expr = op; expr 147 src/RemoveUndef.cpp else expr = Broadcast::make(value, op->lanes); expr 152 src/RemoveUndef.cpp expr = Expr(); expr 163 src/RemoveUndef.cpp if (!expr.defined()) return; expr 169 src/RemoveUndef.cpp expr = op; expr 171 src/RemoveUndef.cpp expr = Call::make(op->type, op->name, new_args, op->call_type, expr 185 src/RemoveUndef.cpp if (!expr.defined()) return; expr 188 src/RemoveUndef.cpp expr = op; expr 190 src/RemoveUndef.cpp expr = body; expr 192 src/RemoveUndef.cpp expr = Let::make(op->name, value, body); expr 219 src/RemoveUndef.cpp if (!expr.defined()) { expr 225 src/RemoveUndef.cpp if (!expr.defined()) { expr 249 src/RemoveUndef.cpp if (!expr.defined()) { expr 254 src/RemoveUndef.cpp if (!expr.defined()) { expr 312 src/RemoveUndef.cpp if (!expr.defined()) { expr 333 src/RemoveUndef.cpp if (!expr.defined()) { expr 370 src/RemoveUndef.cpp if (!expr.defined()) { expr 410 src/RemoveUndef.cpp if (!expr.defined()) { expr 415 src/RemoveUndef.cpp if (!expr.defined()) { expr 456 src/RemoveUndef.cpp if (!expr.defined()) { expr 485 src/RemoveUndef.cpp if (!expr.defined()) { expr 55 src/ScheduleFunctions.cpp bool contains_impure_call(const Expr &expr) { expr 57 src/ScheduleFunctions.cpp expr.accept(&is_not_pure); expr 346 src/ScheduleFunctions.cpp extern_call_args.push_back(arg.expr); expr 114 src/Simplify.cpp bool propagate_indeterminate_expression(const Expr &e, Type t, Expr *expr) { expr 118 src/Simplify.cpp *expr = indeterminate_expression_error(t); expr 120 src/Simplify.cpp *expr = e; expr 127 src/Simplify.cpp bool propagate_indeterminate_expression(const Expr &e0, const Expr &e1, Type t, Expr *expr) { expr 128 src/Simplify.cpp return propagate_indeterminate_expression(e0, t, expr) || expr 129 src/Simplify.cpp propagate_indeterminate_expression(e1, t, expr); expr 132 src/Simplify.cpp bool propagate_indeterminate_expression(const Expr &e0, const Expr &e1, const Expr &e2, Type t, Expr *expr) { expr 133 src/Simplify.cpp return propagate_indeterminate_expression(e0, t, expr) || expr 134 src/Simplify.cpp propagate_indeterminate_expression(e1, t, expr) || expr 135 src/Simplify.cpp propagate_indeterminate_expression(e2, t, expr); expr 469 src/Simplify.cpp if (propagate_indeterminate_expression(value, op->type, &expr)) { expr 480 src/Simplify.cpp expr = value; expr 484 src/Simplify.cpp expr = IntImm::make(op->type, (int64_t)f); expr 488 src/Simplify.cpp expr = UIntImm::make(op->type, (uint64_t)f); expr 492 src/Simplify.cpp expr = FloatImm::make(op->type, f); expr 496 src/Simplify.cpp expr = IntImm::make(op->type, i); expr 500 src/Simplify.cpp expr = UIntImm::make(op->type, (uint64_t)i); expr 504 src/Simplify.cpp expr = FloatImm::make(op->type, (double)i); expr 508 src/Simplify.cpp expr = IntImm::make(op->type, (int64_t)u); expr 512 src/Simplify.cpp expr = UIntImm::make(op->type, u); expr 516 src/Simplify.cpp expr = FloatImm::make(op->type, (double)u); expr 523 src/Simplify.cpp expr = mutate(Cast::make(op->type, cast->value)); expr 534 src/Simplify.cpp expr = mutate(Cast::make(op->type, cast->value)); expr 537 src/Simplify.cpp expr = mutate(Broadcast::make(Cast::make(op->type.element_of(), broadcast_value->value), broadcast_value->lanes)); expr 542 src/Simplify.cpp expr = mutate(Ramp::make(Cast::make(op->type.element_of(), ramp_value->base), expr 551 src/Simplify.cpp expr = mutate(Cast::make(op->type, add->a) + add->b); expr 553 src/Simplify.cpp expr = op; expr 555 src/Simplify.cpp expr = Cast::make(op->type, value); expr 568 src/Simplify.cpp expr = info.replacement; expr 573 src/Simplify.cpp expr = op; expr 579 src/Simplify.cpp expr = op; expr 590 src/Simplify.cpp if (propagate_indeterminate_expression(a, b, op->type, &expr)) { expr 655 src/Simplify.cpp expr = signed_integer_overflow_error(a.type()); expr 657 src/Simplify.cpp expr = IntImm::make(a.type(), ia + ib); expr 662 src/Simplify.cpp expr = UIntImm::make(a.type(), ua + ub); expr 666 src/Simplify.cpp expr = FloatImm::make(a.type(), fa + fb); expr 668 src/Simplify.cpp expr = a; expr 670 src/Simplify.cpp expr = b; expr 673 src/Simplify.cpp expr = mutate(a * make_const(op->type, 2)); expr 676 src/Simplify.cpp expr = a; expr 679 src/Simplify.cpp expr = b; expr 684 src/Simplify.cpp expr = hoist_slice_vector<Add>(op); expr 686 src/Simplify.cpp expr = hoist_slice_vector<Add>(Add::make(a, b)); expr 691 src/Simplify.cpp expr = mutate(Ramp::make(ramp_a->base + ramp_b->base, expr 696 src/Simplify.cpp expr = mutate(Ramp::make(ramp_a->base + broadcast_b->value, expr 701 src/Simplify.cpp expr = mutate(Ramp::make(broadcast_a->value + ramp_b->base, expr 706 src/Simplify.cpp expr = Broadcast::make(mutate(broadcast_a->value + broadcast_b->value), expr 713 src/Simplify.cpp expr = mutate(Select::make(select_a->condition, expr 721 src/Simplify.cpp expr = mutate(Select::make(select_a->condition, expr 728 src/Simplify.cpp expr = mutate(add_a->a + (add_a->b + b)); expr 730 src/Simplify.cpp expr = mutate((add_a->a + b) + add_a->b); expr 734 src/Simplify.cpp expr = mutate((a + add_b->a) + add_b->b); expr 738 src/Simplify.cpp expr = mutate((sub_a->a + b) - sub_a->b); expr 740 src/Simplify.cpp expr = mutate((b - sub_a->b) + sub_a->a); expr 747 src/Simplify.cpp expr = sub_a->a; expr 750 src/Simplify.cpp expr = mutate(b - sub_a->b); expr 753 src/Simplify.cpp expr = sub_b->a; expr 757 src/Simplify.cpp expr = mutate((a - sub_b->b) + sub_b->a); expr 762 src/Simplify.cpp expr = mutate(sub_a->a - sub_b->b); expr 767 src/Simplify.cpp expr = mutate(sub_b->a - sub_a->b); expr 771 src/Simplify.cpp expr = mutate(a - mul_b->a * (-mul_b->b)); expr 775 src/Simplify.cpp expr = mutate(b - mul_a->a * (-mul_a->b)); expr 781 src/Simplify.cpp expr = mutate(a * (make_one(op->type) + mul_b->b)); expr 787 src/Simplify.cpp expr = mutate((make_one(op->type) + mul_b->a) * a); expr 793 src/Simplify.cpp expr = mutate(mul_a->a * (mul_a->b + make_one(op->type))); expr 799 src/Simplify.cpp expr = mutate((mul_a->a + make_one(op->type)) * b); expr 805 src/Simplify.cpp expr = mutate(Min::make(Add::make(min_a->a, b), sub_a_b->a)); expr 811 src/Simplify.cpp expr = mutate(Min::make(sub_a_a->a, Add::make(min_a->b, b))); expr 817 src/Simplify.cpp expr = mutate(Max::make(Add::make(max_a->a, b), sub_a_b->a)); expr 823 src/Simplify.cpp expr = mutate(Max::make(sub_a_a->a, Add::make(max_a->b, b))); expr 832 src/Simplify.cpp expr = mutate(Min::make(Add::make(min_a->a, b), add_a_b->a)); expr 840 src/Simplify.cpp expr = mutate(Min::make(add_a_a->a, Add::make(min_a->b, b))); expr 848 src/Simplify.cpp expr = mutate(Max::make(Add::make(max_a->a, b), add_a_b->a)); expr 856 src/Simplify.cpp expr = mutate(Max::make(add_a_a->a, Add::make(max_a->b, b))); expr 862 src/Simplify.cpp expr = mutate(min_a->a + min_a->b); expr 868 src/Simplify.cpp expr = mutate(min_a->a + min_a->b); expr 876 src/Simplify.cpp expr = mutate((add_a_a->a + IntImm::make(op->type, ia + ib*ic)) / div_a->b); expr 881 src/Simplify.cpp expr = mutate(mul_a->a * (mul_a->b + mul_b->b)); expr 885 src/Simplify.cpp expr = mutate(mul_a->b * (mul_a->a + mul_b->b)); expr 889 src/Simplify.cpp expr = mutate(mul_a->b * (mul_a->a + mul_b->a)); expr 893 src/Simplify.cpp expr = mutate(mul_a->a * (mul_a->b + mul_b->a)); expr 898 src/Simplify.cpp expr = mutate(b + a); expr 907 src/Simplify.cpp expr = div_a_a->a; expr 915 src/Simplify.cpp expr = mutate((add_a->a + b) + add_a->b); expr 923 src/Simplify.cpp expr = mutate((b + add_a->a) + add_a->b); expr 931 src/Simplify.cpp expr = mutate(add_a->a + (add_a->b + b)); expr 939 src/Simplify.cpp expr = mutate(add_a->a + (b + add_a->b)); expr 946 src/Simplify.cpp expr = mutate((mul_a->a * ratio + mul_b->a) * mul_b->b); expr 949 src/Simplify.cpp expr = op; expr 951 src/Simplify.cpp expr = Add::make(a, b); expr 958 src/Simplify.cpp if (propagate_indeterminate_expression(a, b, op->type, &expr)) { expr 1013 src/Simplify.cpp expr = a; expr 1015 src/Simplify.cpp expr = make_zero(op->type); expr 1019 src/Simplify.cpp expr = signed_integer_overflow_error(a.type()); expr 1021 src/Simplify.cpp expr = IntImm::make(a.type(), ia - ib); expr 1024 src/Simplify.cpp expr = UIntImm::make(a.type(), ua - ub); expr 1026 src/Simplify.cpp expr = FloatImm::make(a.type(), fa - fb); expr 1028 src/Simplify.cpp expr = mutate(a + IntImm::make(a.type(), (-ib))); expr 1030 src/Simplify.cpp expr = mutate(a + FloatImm::make(a.type(), (-fb))); expr 1033 src/Simplify.cpp expr = a; expr 1036 src/Simplify.cpp expr = b; expr 1039 src/Simplify.cpp expr = mutate(Ramp::make(ramp_a->base - ramp_b->base, expr 1043 src/Simplify.cpp expr = mutate(Ramp::make(ramp_a->base - broadcast_b->value, expr 1047 src/Simplify.cpp expr = mutate(Ramp::make(broadcast_a->value - ramp_b->base, expr 1052 src/Simplify.cpp expr = Broadcast::make(mutate(broadcast_a->value - broadcast_b->value), expr 1057 src/Simplify.cpp expr = mutate(Select::make(select_a->condition, expr 1063 src/Simplify.cpp expr = mutate(Select::make(select_a->condition, expr 1069 src/Simplify.cpp expr = mutate(Select::make(select_a->condition, expr 1075 src/Simplify.cpp expr = mutate(Select::make(select_b->condition, expr 1081 src/Simplify.cpp expr = mutate(Select::make(select_b->condition, expr 1086 src/Simplify.cpp expr = add_a->a; expr 1089 src/Simplify.cpp expr = add_a->b; expr 1092 src/Simplify.cpp expr = mutate(make_zero(add_b->a.type()) - add_b->a); expr 1095 src/Simplify.cpp expr = mutate(make_zero(add_b->a.type()) - add_b->b); expr 1102 src/Simplify.cpp expr = mutate(Max::make(make_zero(op->type), max_a->b - max_a->a)); expr 1108 src/Simplify.cpp expr = mutate(Min::make(make_zero(op->type), min_a->b - min_a->a)); expr 1114 src/Simplify.cpp expr = mutate(Max::make(max_a->a - max_a->b, make_zero(op->type))); expr 1120 src/Simplify.cpp expr = mutate(Min::make(min_a->a - min_a->b, make_zero(op->type))); expr 1127 src/Simplify.cpp expr = mutate(Min::make(make_zero(op->type), max_b->a - max_b->b)); expr 1133 src/Simplify.cpp expr = mutate(Max::make(make_zero(op->type), min_b->a - min_b->b)); expr 1139 src/Simplify.cpp expr = mutate(Min::make(max_b->b - max_b->a, make_zero(op->type))); expr 1145 src/Simplify.cpp expr = mutate(Max::make(min_b->b - min_b->a, make_zero(op->type))); expr 1151 src/Simplify.cpp expr = mutate(add_a->a + (add_a->b - b)); expr 1153 src/Simplify.cpp expr = mutate((add_a->a - b) + add_a->b); expr 1160 src/Simplify.cpp expr = mutate((sub_b->b - sub_a->b) + (sub_a->a - sub_b->a)); expr 1163 src/Simplify.cpp expr = mutate(a + (sub_b->b - sub_b->a)); expr 1167 src/Simplify.cpp expr = mutate(a + mul_b->a * (-mul_b->b)); expr 1173 src/Simplify.cpp expr = mutate(a * (make_one(op->type) - mul_b->b)); expr 1179 src/Simplify.cpp expr = mutate((make_one(op->type) - mul_b->a) * a); expr 1185 src/Simplify.cpp expr = mutate(mul_a->a * (mul_a->b - make_one(op->type))); expr 1191 src/Simplify.cpp expr = mutate((mul_a->a - make_one(op->type)) * b); expr 1194 src/Simplify.cpp expr = mutate((a - add_b->a) - add_b->b); expr 1198 src/Simplify.cpp expr = mutate((sub_a->a - b) - sub_a->b); expr 1203 src/Simplify.cpp expr = mutate(mul_a->a * (mul_a->b - mul_b->b)); expr 1207 src/Simplify.cpp expr = mutate(mul_a->b * (mul_a->a - mul_b->b)); expr 1211 src/Simplify.cpp expr = mutate(mul_a->b * (mul_a->a - mul_b->a)); expr 1215 src/Simplify.cpp expr = mutate(mul_a->a * (mul_a->b - mul_b->a)); expr 1221 src/Simplify.cpp expr = mutate(add_a->a - add_b->a); expr 1226 src/Simplify.cpp expr = mutate(add_a->b - add_b->b); expr 1231 src/Simplify.cpp expr = mutate(add_a->b - add_b->a); expr 1236 src/Simplify.cpp expr = mutate(add_a->a - add_b->b); expr 1246 src/Simplify.cpp expr = mutate(max(0 - add_b_a->b, a - min_b->b)); expr 1253 src/Simplify.cpp expr = mutate(max(0 - add_b_a->a, a - min_b->b)); expr 1259 src/Simplify.cpp expr = mutate(max(0 - add_b_b->b, a - min_b->a)); expr 1265 src/Simplify.cpp expr = mutate(max(0 - add_b_b->a, a - min_b->a)); expr 1271 src/Simplify.cpp expr = mutate(min(add_a_a->b, min_a->b - b)); expr 1277 src/Simplify.cpp expr = mutate(min(add_a_a->a, min_a->b - b)); expr 1283 src/Simplify.cpp expr = mutate(min(add_a_b->b, min_a->a - b)); expr 1289 src/Simplify.cpp expr = mutate(min(add_a_b->a, min_a->a - b)); expr 1295 src/Simplify.cpp expr = make_zero(op->type); expr 1301 src/Simplify.cpp expr = make_zero(op->type); expr 1307 src/Simplify.cpp expr = mutate(min_a->b - min_b->b); expr 1313 src/Simplify.cpp expr = mutate(max_a->b - max_b->b); expr 1319 src/Simplify.cpp expr = mutate(min_a->b - min_b->a); expr 1325 src/Simplify.cpp expr = mutate(max_a->b - max_b->a); expr 1334 src/Simplify.cpp expr = mutate(make_zero(a.type()) - (b % mul_a->b)); expr 1343 src/Simplify.cpp expr = mutate(a % mul_b->b); expr 1362 src/Simplify.cpp expr = mutate((((x + (b % c)) % c) + (a - b))/c); expr 1365 src/Simplify.cpp expr = mutate((((c + a - 1) - b) - ((x + (a % c)) % c))/c); expr 1377 src/Simplify.cpp expr = mutate(((c - 1 - b) - (x % c))/c); expr 1388 src/Simplify.cpp expr = mutate(((x % c) + a)/c); expr 1399 src/Simplify.cpp expr = mutate(((c - 1 + b) - (x % c))/c); expr 1410 src/Simplify.cpp expr = mutate(((x % c) - a)/c); expr 1424 src/Simplify.cpp expr = mutate((((x + (b % c)) % c) - a - b)/c); expr 1438 src/Simplify.cpp expr = mutate((b - (x + (a % c))%c + (a + c - 1))/c); expr 1440 src/Simplify.cpp expr = op; expr 1442 src/Simplify.cpp expr = Sub::make(a, b); expr 1449 src/Simplify.cpp if (propagate_indeterminate_expression(a, b, op->type, &expr)) { expr 1478 src/Simplify.cpp expr = a; expr 1480 src/Simplify.cpp expr = b; expr 1482 src/Simplify.cpp expr = b; expr 1484 src/Simplify.cpp expr = a; expr 1488 src/Simplify.cpp expr = signed_integer_overflow_error(a.type()); expr 1490 src/Simplify.cpp expr = IntImm::make(a.type(), ia * ib); expr 1493 src/Simplify.cpp expr = UIntImm::make(a.type(), ua * ub); expr 1495 src/Simplify.cpp expr = FloatImm::make(a.type(), fa * fb); expr 1498 src/Simplify.cpp expr = a; expr 1501 src/Simplify.cpp expr = b; expr 1506 src/Simplify.cpp expr = hoist_slice_vector<Mul>(op); expr 1508 src/Simplify.cpp expr = hoist_slice_vector<Mul>(Mul::make(a, b)); expr 1511 src/Simplify.cpp expr = Broadcast::make(mutate(broadcast_a->value * broadcast_b->value), broadcast_a->lanes); expr 1514 src/Simplify.cpp expr = mutate(Ramp::make(ramp_a->base * m, ramp_a->stride * m, ramp_a->lanes)); expr 1517 src/Simplify.cpp expr = mutate(Ramp::make(m * ramp_b->base, m * ramp_b->stride, ramp_b->lanes)); expr 1522 src/Simplify.cpp expr = mutate(add_a->a * b + add_a->b * b); expr 1524 src/Simplify.cpp expr = mutate(Mul::make(Sub::make(sub_a->b, sub_a->a), -b)); expr 1526 src/Simplify.cpp expr = mutate(mul_a->a * (mul_a->b * b)); expr 1529 src/Simplify.cpp expr = mutate((a * mul_b->a) * mul_b->b); expr 1535 src/Simplify.cpp expr = mutate(min_a->a * min_a->b); expr 1541 src/Simplify.cpp expr = mutate(min_a->a * min_a->b); expr 1543 src/Simplify.cpp expr = op; expr 1545 src/Simplify.cpp expr = Mul::make(a, b); expr 1552 src/Simplify.cpp if (propagate_indeterminate_expression(a, b, op->type, &expr)) { expr 1620 src/Simplify.cpp expr = make_const(op->type, div_imp(num_max, ib)); expr 1631 src/Simplify.cpp expr = indeterminate_expression_error(op->type); expr 1633 src/Simplify.cpp expr = a; expr 1635 src/Simplify.cpp expr = a; expr 1637 src/Simplify.cpp expr = make_one(op->type); expr 1640 src/Simplify.cpp expr = IntImm::make(op->type, div_imp(ia, ib)); expr 1643 src/Simplify.cpp expr = UIntImm::make(op->type, ua / ub); expr 1647 src/Simplify.cpp expr = FloatImm::make(op->type, fa / fb); expr 1649 src/Simplify.cpp expr = mutate(Broadcast::make(Div::make(broadcast_a->value, broadcast_b->value), broadcast_a->lanes)); expr 1653 src/Simplify.cpp expr = mutate(select(b < make_zero(op->type), expr 1665 src/Simplify.cpp expr = mutate(Ramp::make(ramp_a->base / broadcast_b->value, expr 1677 src/Simplify.cpp expr = mutate(Broadcast::make(ramp_a->base / broadcast_b->value, ramp_a->lanes)); expr 1685 src/Simplify.cpp expr = mutate(div_a->a / make_const(op->type, ia * ib)); expr 1695 src/Simplify.cpp expr = mutate((div_a_a->a + make_const(op->type, ia*ib)) / make_const(op->type, ia*ic)); expr 1705 src/Simplify.cpp expr = mutate(mul_a->a * make_const(op->type, div_imp(ia, ib))); expr 1708 src/Simplify.cpp expr = mutate(mul_a->a / make_const(op->type, div_imp(ib, ia))); expr 1720 src/Simplify.cpp expr = mutate((mul_a_a->a * ratio) + (add_a->b / b)); expr 1730 src/Simplify.cpp expr = mutate((add_a->a / b) + (mul_a_b->a * ratio)); expr 1741 src/Simplify.cpp expr = mutate((mul_a_a->a * ratio) + (-sub_a->b) / b); expr 1751 src/Simplify.cpp expr = mutate((sub_a->a / b) - (mul_a_b->a * ratio)); expr 1763 src/Simplify.cpp expr = mutate((mul_a_a_a->a * ratio) + (add_a_a->b + add_a->b) / b); expr 1774 src/Simplify.cpp expr = mutate((mul_a_a_a->a * ratio) + (add_a->b - sub_a_a->b) / b); expr 1785 src/Simplify.cpp expr = mutate((mul_a_a_a->a * ratio) + (add_a_a->b - sub_a->b) / b); expr 1796 src/Simplify.cpp expr = mutate((mul_a_a_a->a * ratio) + (- sub_a_a->b - sub_a->b) / b); expr 1807 src/Simplify.cpp expr = mutate((mul_a_b_a->a * ratio) + (add_a->a + add_a_b->b) / b); expr 1818 src/Simplify.cpp expr = mutate((mul_a_b_a->a * ratio) + (add_a->a - sub_a_b->b) / b); expr 1829 src/Simplify.cpp expr = mutate((sub_a->a - add_a_b->b) / b - (mul_a_b_a->a * ratio)); expr 1841 src/Simplify.cpp expr = mutate((add_a->a + sub_a_b->a) / b - (mul_a_b_b->a * ratio)); expr 1850 src/Simplify.cpp expr = mutate((add_a->a / b) + ratio); expr 1857 src/Simplify.cpp expr = mutate(add_a->b/b + make_one(op->type)); expr 1862 src/Simplify.cpp expr = mutate(add_a->a/b + make_one(op->type)); expr 1868 src/Simplify.cpp expr = mutate((make_zero(op->type) - sub_a->b)/b + make_one(op->type)); expr 1873 src/Simplify.cpp expr = mutate(sub_a->a/b + make_const(op->type, -1)); expr 1881 src/Simplify.cpp expr = mutate((add_a_a->b + add_a->b)/b + make_one(op->type)); expr 1887 src/Simplify.cpp expr = mutate((add_a_a->a + add_a->b)/b + make_one(op->type)); expr 1893 src/Simplify.cpp expr = mutate((add_a->a + add_a_b->a)/b + make_one(op->type)); expr 1899 src/Simplify.cpp expr = mutate((add_a->a + add_a_b->b)/b + make_one(op->type)); expr 1905 src/Simplify.cpp expr = mul_a->a; expr 1910 src/Simplify.cpp expr = mul_a->b; expr 1916 src/Simplify.cpp expr = mutate(mul_a_a->a + (add_a->b / b)); expr 1922 src/Simplify.cpp expr = mutate(mul_a_a->b + (add_a->b / b)); expr 1928 src/Simplify.cpp expr = mutate((add_a->a / b) + mul_a_b->a); expr 1934 src/Simplify.cpp expr = mutate((add_a->a / b) + mul_a_b->b); expr 1941 src/Simplify.cpp expr = mutate(mul_a_a->a + ((make_zero(op->type) - sub_a->b) / b)); expr 1947 src/Simplify.cpp expr = mutate(mul_a_a->b + ((make_zero(op->type) - sub_a->b) / b)); expr 1953 src/Simplify.cpp expr = mutate((sub_a->a / b) - mul_a_b->a); expr 1959 src/Simplify.cpp expr = mutate((sub_a->a / b) - mul_a_b->b); expr 1964 src/Simplify.cpp expr = mutate(a * (make_one(b.type()) / b)); expr 1966 src/Simplify.cpp expr = op; expr 1968 src/Simplify.cpp expr = Div::make(a, b); expr 1975 src/Simplify.cpp if (propagate_indeterminate_expression(a, b, op->type, &expr)) { expr 2001 src/Simplify.cpp expr = a; expr 2019 src/Simplify.cpp expr = indeterminate_expression_error(op->type); expr 2021 src/Simplify.cpp expr = a; expr 2023 src/Simplify.cpp expr = IntImm::make(op->type, mod_imp(ia, ib)); expr 2025 src/Simplify.cpp expr = UIntImm::make(op->type, ua % ub); expr 2027 src/Simplify.cpp expr = FloatImm::make(op->type, mod_imp(fa, fb)); expr 2029 src/Simplify.cpp expr = mutate(Broadcast::make(Mod::make(broadcast_a->value, broadcast_b->value), broadcast_a->lanes)); expr 2037 src/Simplify.cpp expr = make_zero(op->type); expr 2046 src/Simplify.cpp expr = mutate(add_a->b % b); expr 2054 src/Simplify.cpp expr = mutate(add_a->a % b); expr 2063 src/Simplify.cpp expr = mutate(add_a->a % b); expr 2069 src/Simplify.cpp expr = make_const(op->type, mod_imp((int64_t)mod_rem.remainder, ib)); expr 2078 src/Simplify.cpp expr = mutate(Broadcast::make(ramp_a->base % broadcast_b->value, ramp_a->lanes)); expr 2089 src/Simplify.cpp expr = mutate(Ramp::make(new_base, ramp_a->stride, ramp_a->lanes)); expr 2101 src/Simplify.cpp expr = mutate(Ramp::make(new_base, ramp_a->stride, ramp_a->lanes) % b); expr 2103 src/Simplify.cpp expr = op; expr 2105 src/Simplify.cpp expr = Mod::make(a, b); expr 2112 src/Simplify.cpp if (propagate_indeterminate_expression(a, b, op->type, &expr)) { expr 2165 src/Simplify.cpp expr = a; expr 2169 src/Simplify.cpp expr = IntImm::make(op->type, std::min(ia, ib)); expr 2173 src/Simplify.cpp expr = UIntImm::make(op->type, std::min(ua, ub)); expr 2177 src/Simplify.cpp expr = FloatImm::make(op->type, std::min(fa, fb)); expr 2182 src/Simplify.cpp expr = a; expr 2187 src/Simplify.cpp expr = b; expr 2192 src/Simplify.cpp expr = a; expr 2197 src/Simplify.cpp expr = b; expr 2201 src/Simplify.cpp expr = mutate(Broadcast::make(Min::make(broadcast_a->value, broadcast_b->value), broadcast_a->lanes)); expr 2206 src/Simplify.cpp expr = b; expr 2209 src/Simplify.cpp expr = a; expr 2220 src/Simplify.cpp expr = a; expr 2224 src/Simplify.cpp expr = b; expr 2237 src/Simplify.cpp expr = b; expr 2239 src/Simplify.cpp expr = a; expr 2247 src/Simplify.cpp expr = b; expr 2249 src/Simplify.cpp expr = a; expr 2257 src/Simplify.cpp expr = a; expr 2259 src/Simplify.cpp expr = b; expr 2269 src/Simplify.cpp expr = a; expr 2271 src/Simplify.cpp expr = b; expr 2276 src/Simplify.cpp expr = b; expr 2282 src/Simplify.cpp expr = b; expr 2286 src/Simplify.cpp expr = a; expr 2292 src/Simplify.cpp expr = a; expr 2298 src/Simplify.cpp expr = mutate(min(max_a->a, max_a->b)); expr 2304 src/Simplify.cpp expr = mutate(min(max_a->a, max_a->b)); expr 2309 src/Simplify.cpp expr = b; expr 2313 src/Simplify.cpp expr = a; expr 2317 src/Simplify.cpp expr = b; expr 2322 src/Simplify.cpp expr = mutate(Min::make(min_a->a, Broadcast::make(Min::make(broadcast_a_b->value, broadcast_b->value), broadcast_b->lanes))); expr 2327 src/Simplify.cpp expr = a; expr 2332 src/Simplify.cpp expr = a; expr 2337 src/Simplify.cpp expr = a; expr 2343 src/Simplify.cpp expr = mutate(Max::make(Min::make(max_a->b, max_b->b), max_a->a)); expr 2348 src/Simplify.cpp expr = mutate(Max::make(Min::make(max_a->b, max_b->a), max_a->a)); expr 2353 src/Simplify.cpp expr = mutate(Max::make(Min::make(max_a->a, max_b->b), max_a->b)); expr 2358 src/Simplify.cpp expr = mutate(Max::make(Min::make(max_a->a, max_b->a), max_a->b)); expr 2363 src/Simplify.cpp expr = mutate(Min::make(Min::make(min_a->b, min_b->b), min_a->a)); expr 2368 src/Simplify.cpp expr = mutate(Min::make(Min::make(min_a->b, min_b->a), min_a->a)); expr 2373 src/Simplify.cpp expr = mutate(Min::make(Min::make(min_a->a, min_b->b), min_a->b)); expr 2378 src/Simplify.cpp expr = mutate(Min::make(Min::make(min_a->a, min_b->a), min_a->b)); expr 2383 src/Simplify.cpp expr = mutate(min(max(min_a_a->a, max_a->b), b)); expr 2388 src/Simplify.cpp expr = mutate(min(max(min_a_a->b, max_a->b), b)); expr 2395 src/Simplify.cpp expr = mutate(min(add_a->a, add_b->a)) + add_a->b; expr 2401 src/Simplify.cpp expr = mutate(min(add_a->b, add_b->b)) + add_a->a; expr 2407 src/Simplify.cpp expr = mutate(min(add_a->b, add_b->a)) + add_a->a; expr 2413 src/Simplify.cpp expr = mutate(min(add_a->a, add_b->b)) + add_a->b; expr 2418 src/Simplify.cpp expr = Min::make(min_a->a, mutate(Min::make(b, min_a->b))); expr 2421 src/Simplify.cpp expr = mutate(Min::make(Min::make(min_a->a, b), min_a->b)); expr 2433 src/Simplify.cpp expr = mutate(min(div_a->a, div_b->a) / factor); expr 2435 src/Simplify.cpp expr = mutate(max(div_a->a, div_b->a) / factor); expr 2445 src/Simplify.cpp expr = mutate(min(mul_a->a, mul_b->a) * factor); expr 2447 src/Simplify.cpp expr = mutate(max(mul_a->a, mul_b->a) * factor); expr 2459 src/Simplify.cpp expr = mutate(min(mul_a->a, ratio) * factor); expr 2461 src/Simplify.cpp expr = mutate(max(mul_a->a, ratio) * factor); expr 2467 src/Simplify.cpp expr = a; expr 2472 src/Simplify.cpp expr = b; expr 2477 src/Simplify.cpp expr = hoist_slice_vector<Min>(op); expr 2479 src/Simplify.cpp expr = hoist_slice_vector<Min>(min(a, b)); expr 2486 src/Simplify.cpp expr = mutate(sub_a->a - max(sub_a->b, sub_a->a - b)); expr 2490 src/Simplify.cpp expr = mutate(select(select_a->condition, expr 2494 src/Simplify.cpp expr = op; expr 2496 src/Simplify.cpp expr = Min::make(a, b); expr 2502 src/Simplify.cpp if (propagate_indeterminate_expression(a, b, op->type, &expr)) { expr 2550 src/Simplify.cpp expr = a; expr 2554 src/Simplify.cpp expr = IntImm::make(op->type, std::max(ia, ib)); expr 2558 src/Simplify.cpp expr = UIntImm::make(op->type, std::max(ua, ub)); expr 2562 src/Simplify.cpp expr = FloatImm::make(op->type, std::max(fa, fb)); expr 2567 src/Simplify.cpp expr = a; expr 2572 src/Simplify.cpp expr = b; expr 2577 src/Simplify.cpp expr = a; expr 2582 src/Simplify.cpp expr = b; expr 2585 src/Simplify.cpp expr = mutate(Broadcast::make(Max::make(broadcast_a->value, broadcast_b->value), broadcast_a->lanes)); expr 2590 src/Simplify.cpp expr = a; expr 2593 src/Simplify.cpp expr = b; expr 2604 src/Simplify.cpp expr = a; expr 2609 src/Simplify.cpp expr = b; expr 2622 src/Simplify.cpp expr = a; expr 2624 src/Simplify.cpp expr = b; expr 2632 src/Simplify.cpp expr = a; expr 2634 src/Simplify.cpp expr = b; expr 2642 src/Simplify.cpp expr = b; expr 2644 src/Simplify.cpp expr = a; expr 2654 src/Simplify.cpp expr = a; expr 2656 src/Simplify.cpp expr = b; expr 2663 src/Simplify.cpp expr = mutate(max(min_a->a, min_a->b)); expr 2669 src/Simplify.cpp expr = mutate(max(min_a->a, min_a->b)); expr 2674 src/Simplify.cpp expr = b; expr 2678 src/Simplify.cpp expr = a; expr 2682 src/Simplify.cpp expr = b; expr 2687 src/Simplify.cpp expr = mutate(Max::make(max_a->a, Broadcast::make(Max::make(broadcast_a_b->value, broadcast_b->value), broadcast_b->lanes))); expr 2692 src/Simplify.cpp expr = a; expr 2696 src/Simplify.cpp expr = a; expr 2700 src/Simplify.cpp expr = a; expr 2706 src/Simplify.cpp expr = mutate(Max::make(Max::make(max_a->b, max_b->b), max_a->a)); expr 2711 src/Simplify.cpp expr = mutate(Max::make(Max::make(max_a->b, max_b->a), max_a->a)); expr 2716 src/Simplify.cpp expr = mutate(Max::make(Max::make(max_a->a, max_b->b), max_a->b)); expr 2721 src/Simplify.cpp expr = mutate(Max::make(Max::make(max_a->a, max_b->a), max_a->b)); expr 2726 src/Simplify.cpp expr = mutate(Min::make(Max::make(min_a->b, min_b->b), min_a->a)); expr 2731 src/Simplify.cpp expr = mutate(Min::make(Max::make(min_a->b, min_b->a), min_a->a)); expr 2736 src/Simplify.cpp expr = mutate(Min::make(Max::make(min_a->a, min_b->b), min_a->b)); expr 2741 src/Simplify.cpp expr = mutate(Min::make(Max::make(min_a->a, min_b->a), min_a->b)); expr 2746 src/Simplify.cpp expr = mutate(max(min(max_a_a->a, min_a->b), b)); expr 2751 src/Simplify.cpp expr = mutate(max(min(max_a_a->b, min_a->b), b)); expr 2758 src/Simplify.cpp expr = mutate(max(add_a->a, add_b->a)) + add_a->b; expr 2764 src/Simplify.cpp expr = mutate(max(add_a->b, add_b->b)) + add_a->a; expr 2770 src/Simplify.cpp expr = mutate(max(add_a->b, add_b->a)) + add_a->a; expr 2776 src/Simplify.cpp expr = mutate(max(add_a->a, add_b->b)) + add_a->b; expr 2780 src/Simplify.cpp expr = Max::make(max_a->a, mutate(Max::make(b, max_a->b))); expr 2783 src/Simplify.cpp expr = mutate(Max::make(Max::make(max_a->a, b), max_a->b)); expr 2795 src/Simplify.cpp expr = mutate(max(div_a->a, div_b->a) / factor); expr 2797 src/Simplify.cpp expr = mutate(min(div_a->a, div_b->a) / factor); expr 2807 src/Simplify.cpp expr = mutate(max(mul_a->a, mul_b->a) * factor); expr 2809 src/Simplify.cpp expr = mutate(min(mul_a->a, mul_b->a) * factor); expr 2821 src/Simplify.cpp expr = mutate(max(mul_a->a, ratio) * factor); expr 2823 src/Simplify.cpp expr = mutate(min(mul_a->a, ratio) * factor); expr 2829 src/Simplify.cpp expr = a; expr 2834 src/Simplify.cpp expr = b; expr 2839 src/Simplify.cpp expr = hoist_slice_vector<Max>(op); expr 2841 src/Simplify.cpp expr = hoist_slice_vector<Max>(max(a, b)); expr 2848 src/Simplify.cpp expr = mutate(sub_a->a - min(sub_a->b, sub_a->a - b)); expr 2852 src/Simplify.cpp expr = mutate(select(select_a->condition, expr 2856 src/Simplify.cpp expr = op; expr 2858 src/Simplify.cpp expr = Max::make(a, b); expr 2864 src/Simplify.cpp if (propagate_indeterminate_expression(delta, op->type, &expr)) { expr 2877 src/Simplify.cpp expr = const_true(op->type.lanes()); expr 2891 src/Simplify.cpp expr = const_true(op->type.lanes()); expr 2894 src/Simplify.cpp expr = const_false(op->type.lanes()); expr 2901 src/Simplify.cpp expr = const_false(); expr 2909 src/Simplify.cpp expr = const_false(); expr 2916 src/Simplify.cpp expr = Broadcast::make(mutate(broadcast->value == expr 2921 src/Simplify.cpp expr = (add->a == mutate(make_zero(delta.type()) - add->b)); expr 2925 src/Simplify.cpp expr = sub->b == sub->a; expr 2927 src/Simplify.cpp expr = op; expr 2930 src/Simplify.cpp expr = (sub->a == sub->b); expr 2935 src/Simplify.cpp expr = mutate(mul->a == zero || mul->b == zero); expr 2938 src/Simplify.cpp expr = mutate(sel->condition || (sel->false_value == zero)); expr 2942 src/Simplify.cpp expr = mutate((!sel->condition) && (sel->false_value == zero)); expr 2945 src/Simplify.cpp expr = mutate((!sel->condition) || (sel->true_value == zero)); expr 2949 src/Simplify.cpp expr = mutate((sel->condition) && (sel->true_value == zero)); expr 2951 src/Simplify.cpp expr = (delta == make_zero(delta.type())); expr 2956 src/Simplify.cpp expr = mutate(Not::make(op->a == op->b)); expr 2961 src/Simplify.cpp if (propagate_indeterminate_expression(a, b, op->type, &expr)) { expr 2969 src/Simplify.cpp expr = const_true(op->type.lanes()); expr 2973 src/Simplify.cpp expr = const_false(op->type.lanes()); expr 3016 src/Simplify.cpp expr = make_bool(ia < ib, op->type.lanes()); expr 3019 src/Simplify.cpp expr = make_bool(ua < ub, op->type.lanes()); expr 3023 src/Simplify.cpp expr = const_false(op->type.lanes()); expr 3027 src/Simplify.cpp expr = const_false(op->type.lanes()); expr 3031 src/Simplify.cpp expr = const_false(op->type.lanes()); expr 3034 src/Simplify.cpp expr = const_true(op->type.lanes()); expr 3038 src/Simplify.cpp expr = mutate(Broadcast::make(broadcast_a->value < broadcast_b->value, broadcast_a->lanes)); expr 3045 src/Simplify.cpp expr = mutate(Broadcast::make(bases_lt, ramp_a->lanes)); expr 3050 src/Simplify.cpp expr = mutate(add_a->b < add_b->b); expr 3054 src/Simplify.cpp expr = mutate(add_a->b < add_b->a); expr 3058 src/Simplify.cpp expr = mutate(add_a->a < add_b->b); expr 3062 src/Simplify.cpp expr = mutate(add_a->a < add_b->a); expr 3067 src/Simplify.cpp expr = mutate(sub_b->b < sub_a->b); expr 3071 src/Simplify.cpp expr = mutate(sub_a->a < sub_b->a); expr 3074 src/Simplify.cpp expr = mutate(add_a->a < (b - add_a->b)); expr 3076 src/Simplify.cpp expr = mutate(sub_a->a < (b + sub_a->b)); expr 3080 src/Simplify.cpp expr = mutate(make_zero(add_b->b.type()) < add_b->b); expr 3083 src/Simplify.cpp expr = mutate(make_zero(add_b->a.type()) < add_b->a); expr 3088 src/Simplify.cpp expr = mutate((a - add_b->b) < add_b->a); expr 3092 src/Simplify.cpp expr = mutate(sub_b->b < make_zero(sub_b->b.type())); expr 3098 src/Simplify.cpp expr = mutate(sub_b->b < (sub_b->a - a)); expr 3105 src/Simplify.cpp expr = mutate(mul_a->a < mul_b->a); expr 3111 src/Simplify.cpp expr = mutate(mul_a->a < (((b - 1) / mul_a->b) + 1)); expr 3114 src/Simplify.cpp expr = mutate(mul_a->a < (b / mul_a->b)); expr 3120 src/Simplify.cpp expr = mutate((a / mul_b->b) < mul_b->a); expr 3126 src/Simplify.cpp expr = mutate(div_a->a < (div_a->b * b)); expr 3133 src/Simplify.cpp expr = mutate((a + one)*div_b->b - one < div_b->a); expr 3140 src/Simplify.cpp expr = mutate(lt_a || lt_b); expr 3142 src/Simplify.cpp expr = op; expr 3144 src/Simplify.cpp expr = LT::make(a, b); expr 3151 src/Simplify.cpp expr = mutate(lt_a && lt_b); expr 3153 src/Simplify.cpp expr = op; expr 3155 src/Simplify.cpp expr = LT::make(a, b); expr 3162 src/Simplify.cpp expr = mutate(lt_a && lt_b); expr 3164 src/Simplify.cpp expr = op; expr 3166 src/Simplify.cpp expr = LT::make(a, b); expr 3173 src/Simplify.cpp expr = mutate(lt_a || lt_b); expr 3175 src/Simplify.cpp expr = op; expr 3177 src/Simplify.cpp expr = LT::make(a, b); expr 3188 src/Simplify.cpp expr = mutate(0 < b % make_const(a.type(), ia)); expr 3199 src/Simplify.cpp expr = mutate(0 < add_b->a % div_a_a->b + add_b->b); expr 3210 src/Simplify.cpp expr = mutate(sub_b->b < sub_b->a % div_a_a->b); expr 3222 src/Simplify.cpp expr = mutate(add_a_a_a->b < div_a_a->a % div_a_a->b); expr 3235 src/Simplify.cpp expr = mutate(add_a_a_a->b < div_a_a->a % div_a_a->b + add_b->b); expr 3248 src/Simplify.cpp expr = mutate(sub_b->b < div_a_a->a % div_a_a->b + make_const(a.type(), -ic)); expr 3252 src/Simplify.cpp expr = const_true(delta_ramp->lanes); expr 3256 src/Simplify.cpp expr = const_false(delta_ramp->lanes); expr 3260 src/Simplify.cpp expr = const_true(delta_ramp->lanes); expr 3264 src/Simplify.cpp expr = const_false(delta_ramp->lanes); expr 3270 src/Simplify.cpp expr = Broadcast::make(mutate(LT::make(delta_ramp->base / mod_rem.modulus, 0)), delta_ramp->lanes); expr 3272 src/Simplify.cpp expr = op; expr 3274 src/Simplify.cpp expr = LT::make(a, b); expr 3277 src/Simplify.cpp expr = op; expr 3279 src/Simplify.cpp expr = LT::make(a, b); expr 3284 src/Simplify.cpp expr = mutate(!(op->b < op->a)); expr 3288 src/Simplify.cpp expr = mutate(op->b < op->a); expr 3292 src/Simplify.cpp expr = mutate(!(op->a < op->b)); expr 3298 src/Simplify.cpp if (propagate_indeterminate_expression(a, b, op->type, &expr)) { expr 3319 src/Simplify.cpp expr = b; expr 3321 src/Simplify.cpp expr = a; expr 3323 src/Simplify.cpp expr = a; expr 3325 src/Simplify.cpp expr = b; expr 3328 src/Simplify.cpp expr = a; expr 3333 src/Simplify.cpp expr = mutate(le_a->a <= min(le_a->b, le_b->b)); expr 3338 src/Simplify.cpp expr = mutate(max(le_a->a, le_b->a) <= le_a->b); expr 3343 src/Simplify.cpp expr = mutate(lt_a->a < min(lt_a->b, lt_b->b)); expr 3348 src/Simplify.cpp expr = mutate(max(lt_a->a, lt_b->a) < lt_a->b); expr 3354 src/Simplify.cpp expr = const_false(op->type.lanes()); expr 3360 src/Simplify.cpp expr = const_false(op->type.lanes()); expr 3364 src/Simplify.cpp expr = const_false(op->type.lanes()); expr 3370 src/Simplify.cpp expr = const_false(op->type.lanes()); expr 3376 src/Simplify.cpp expr = const_false(op->type.lanes()); expr 3384 src/Simplify.cpp expr = const_false(op->type.lanes()); expr 3392 src/Simplify.cpp expr = const_false(op->type.lanes()); expr 3401 src/Simplify.cpp expr = const_false(op->type.lanes()); expr 3409 src/Simplify.cpp expr = const_false(op->type.lanes()); expr 3418 src/Simplify.cpp expr = const_false(op->type.lanes()); expr 3426 src/Simplify.cpp expr = const_false(op->type.lanes()); expr 3435 src/Simplify.cpp expr = const_false(op->type.lanes()); expr 3443 src/Simplify.cpp expr = const_false(op->type.lanes()); expr 3452 src/Simplify.cpp expr = mutate(And::make(a, NE::make(eq_a->b, neq_b->b))); expr 3460 src/Simplify.cpp expr = mutate(And::make(b, NE::make(neq_a->b, eq_b->b))); expr 3466 src/Simplify.cpp expr = mutate(And::make(a, substitute(eq_a->a.as<Variable>(), eq_a->b, b))); expr 3472 src/Simplify.cpp expr = mutate(And::make(substitute(eq_b->a.as<Variable>(), eq_b->b, a), b)); expr 3477 src/Simplify.cpp expr = Broadcast::make(mutate(And::make(broadcast_a->value, broadcast_b->value)), broadcast_a->lanes); expr 3479 src/Simplify.cpp expr = mutate(a && substitute(var_a->name, make_one(a.type()), b)); expr 3481 src/Simplify.cpp expr = mutate(substitute(var_b->name, make_one(b.type()), a) && b); expr 3484 src/Simplify.cpp expr = op; expr 3486 src/Simplify.cpp expr = And::make(a, b); expr 3492 src/Simplify.cpp if (propagate_indeterminate_expression(a, b, op->type, &expr)) { expr 3516 src/Simplify.cpp expr = a; expr 3518 src/Simplify.cpp expr = b; expr 3520 src/Simplify.cpp expr = b; expr 3522 src/Simplify.cpp expr = a; expr 3524 src/Simplify.cpp expr = a; expr 3530 src/Simplify.cpp expr = const_true(op->type.lanes()); expr 3536 src/Simplify.cpp expr = const_true(op->type.lanes()); expr 3540 src/Simplify.cpp expr = const_true(op->type.lanes()); expr 3546 src/Simplify.cpp expr = const_true(op->type.lanes()); expr 3552 src/Simplify.cpp expr = const_true(op->type.lanes()); expr 3560 src/Simplify.cpp expr = const_true(op->type.lanes()); expr 3568 src/Simplify.cpp expr = const_true(op->type.lanes()); expr 3576 src/Simplify.cpp expr = const_true(op->type.lanes()); expr 3584 src/Simplify.cpp expr = const_true(op->type.lanes()); expr 3592 src/Simplify.cpp expr = const_true(op->type.lanes()); expr 3600 src/Simplify.cpp expr = const_true(op->type.lanes()); expr 3608 src/Simplify.cpp expr = const_true(op->type.lanes()); expr 3616 src/Simplify.cpp expr = const_true(op->type.lanes()); expr 3622 src/Simplify.cpp expr = Broadcast::make(mutate(Or::make(broadcast_a->value, broadcast_b->value)), broadcast_a->lanes); expr 3630 src/Simplify.cpp expr = mutate(Or::make(b, EQ::make(eq_a->b, neq_b->b))); expr 3638 src/Simplify.cpp expr = mutate(Or::make(a, EQ::make(neq_a->b, eq_b->b))); expr 3640 src/Simplify.cpp expr = mutate(a || substitute(var_a->name, make_zero(a.type()), b)); expr 3642 src/Simplify.cpp expr = mutate(substitute(var_b->name, make_zero(b.type()), a) || b); expr 3651 src/Simplify.cpp expr = mutate(And::make(Or::make(and_a->a, b), Or::make(and_a->b, b))); expr 3660 src/Simplify.cpp expr = mutate(And::make(Or::make(and_b->a, a), Or::make(and_b->b, a))); expr 3662 src/Simplify.cpp expr = op; expr 3664 src/Simplify.cpp expr = Or::make(a, b); expr 3670 src/Simplify.cpp if (propagate_indeterminate_expression(a, op->type, &expr)) { expr 3675 src/Simplify.cpp expr = make_zero(a.type()); expr 3677 src/Simplify.cpp expr = make_one(a.type()); expr 3680 src/Simplify.cpp expr = n->a; expr 3682 src/Simplify.cpp expr = LT::make(n->b, n->a); expr 3684 src/Simplify.cpp expr = LT::make(n->a, n->b); expr 3686 src/Simplify.cpp expr = LE::make(n->b, n->a); expr 3688 src/Simplify.cpp expr = LE::make(n->a, n->b); expr 3690 src/Simplify.cpp expr = EQ::make(n->a, n->b); expr 3692 src/Simplify.cpp expr = NE::make(n->a, n->b); expr 3694 src/Simplify.cpp expr = mutate(Broadcast::make(!n->value, n->lanes)); expr 3696 src/Simplify.cpp expr = op; expr 3698 src/Simplify.cpp expr = Not::make(a); expr 3706 src/Simplify.cpp if (propagate_indeterminate_expression(condition, true_value, false_value, op->type, &expr)) { expr 3722 src/Simplify.cpp expr = false_value; expr 3724 src/Simplify.cpp expr = true_value; expr 3726 src/Simplify.cpp expr = true_value; expr 3731 src/Simplify.cpp expr = Broadcast::make(condition, true_value.type().lanes()); expr 3733 src/Simplify.cpp expr = condition; expr 3739 src/Simplify.cpp expr = Broadcast::make(mutate(!condition), true_value.type().lanes()); expr 3741 src/Simplify.cpp expr = mutate(!condition); expr 3745 src/Simplify.cpp expr = mutate(Select::make(b->value, true_value, false_value)); expr 3748 src/Simplify.cpp expr = mutate(Select::make(ne->a == ne->b, false_value, true_value)); expr 3751 src/Simplify.cpp expr = mutate(Select::make(le->b < le->a, false_value, true_value)); expr 3755 src/Simplify.cpp expr = true_value; expr 3760 src/Simplify.cpp expr = false_value; expr 3764 src/Simplify.cpp expr = mutate(Select::make(condition && !sel_t->condition, sel_t->false_value, false_value)); expr 3768 src/Simplify.cpp expr = mutate(Select::make(condition && sel_t->condition, sel_t->true_value, false_value)); expr 3772 src/Simplify.cpp expr = mutate(Select::make(condition || !sel_f->condition, true_value, sel_f->true_value)); expr 3776 src/Simplify.cpp expr = mutate(Select::make(condition || sel_f->condition, true_value, sel_f->false_value)); expr 3781 src/Simplify.cpp expr = mutate(add_t->a + Select::make(condition, add_t->b, add_f->b)); expr 3786 src/Simplify.cpp expr = mutate(add_t->a + Select::make(condition, add_t->b, add_f->a)); expr 3791 src/Simplify.cpp expr = mutate(add_t->b + Select::make(condition, add_t->a, add_f->b)); expr 3796 src/Simplify.cpp expr = mutate(Select::make(condition, add_t->a, add_f->a) + add_t->b); expr 3801 src/Simplify.cpp expr = mutate(sub_t->a - Select::make(condition, sub_t->b, sub_f->b)); expr 3806 src/Simplify.cpp expr = mutate(Select::make(condition, sub_t->a, sub_f->a) - sub_t->b);\ expr 3811 src/Simplify.cpp expr = mutate(add_t->a + Select::make(condition, add_t->b, make_zero(sub_f->b.type()) - sub_f->b)); expr 3816 src/Simplify.cpp expr = mutate(add_t->b + Select::make(condition, add_t->a, make_zero(sub_f->b.type()) - sub_f->b)); expr 3821 src/Simplify.cpp expr = mutate(sub_t->a + Select::make(condition, make_zero(sub_t->b.type()) - sub_t->b, add_f->b)); expr 3826 src/Simplify.cpp expr = mutate(sub_t->a + Select::make(condition, make_zero(sub_t->b.type()) - sub_t->b, add_f->a)); expr 3831 src/Simplify.cpp expr = mutate(mul_t->a * Select::make(condition, mul_t->b, mul_f->b)); expr 3836 src/Simplify.cpp expr = mutate(mul_t->a * Select::make(condition, mul_t->b, mul_f->a)); expr 3841 src/Simplify.cpp expr = mutate(mul_t->b * Select::make(condition, mul_t->a, mul_f->b)); expr 3846 src/Simplify.cpp expr = mutate(Select::make(condition, mul_t->a, mul_f->a) * mul_t->b); expr 3850 src/Simplify.cpp expr = op; expr 3852 src/Simplify.cpp expr = Select::make(condition, true_value, false_value); expr 3861 src/Simplify.cpp expr = Broadcast::make(base, op->lanes); expr 3864 src/Simplify.cpp expr = op; expr 3866 src/Simplify.cpp expr = Ramp::make(base, stride, op->lanes); expr 3985 src/Simplify.cpp expr = undef(op->type); expr 3989 src/Simplify.cpp expr = Broadcast::make(load, b_index->lanes); expr 3991 src/Simplify.cpp expr = op; expr 3993 src/Simplify.cpp expr = Load::make(op->type, op->name, index, op->image, op->param, predicate); expr 4006 src/Simplify.cpp if (propagate_indeterminate_expression(a, b, op->type, &expr)) { expr 4025 src/Simplify.cpp expr = mutate(Mul::make(a, b)); expr 4027 src/Simplify.cpp expr = mutate(Div::make(a, b)); expr 4037 src/Simplify.cpp expr = op; expr 4039 src/Simplify.cpp expr = a << b; expr 4041 src/Simplify.cpp expr = a >> b; expr 4045 src/Simplify.cpp if (propagate_indeterminate_expression(a, b, op->type, &expr)) { expr 4056 src/Simplify.cpp expr = Mod::make(a, make_const(a.type(), ib + 1)); expr 4059 src/Simplify.cpp expr = a; expr 4062 src/Simplify.cpp expr = Mod::make(a, make_const(a.type(), ub + 1)); expr 4064 src/Simplify.cpp expr = op; expr 4066 src/Simplify.cpp expr = a & b; expr 4070 src/Simplify.cpp if (propagate_indeterminate_expression(a, b, op->type, &expr)) { expr 4074 src/Simplify.cpp expr = op; expr 4076 src/Simplify.cpp expr = a | b; expr 4081 src/Simplify.cpp if (propagate_indeterminate_expression(a, op->type, &expr)) { expr 4091 src/Simplify.cpp expr = make_const(op->type, ia); expr 4094 src/Simplify.cpp expr = a; expr 4099 src/Simplify.cpp expr = make_const(a.type(), fa); expr 4101 src/Simplify.cpp expr = op; expr 4103 src/Simplify.cpp expr = abs(a); expr 4110 src/Simplify.cpp expr = std::isnan(f); expr 4112 src/Simplify.cpp expr = op; expr 4114 src/Simplify.cpp expr = Call::make(op->type, op->name, {arg}, op->call_type); expr 4160 src/Simplify.cpp expr = new_args[0]; expr 4162 src/Simplify.cpp expr = Call::make(op->type, op->name, new_args, op->call_type); expr 4164 src/Simplify.cpp expr = op; expr 4169 src/Simplify.cpp if (propagate_indeterminate_expression(arg, op->type, &expr)) { expr 4173 src/Simplify.cpp expr = FloatImm::make(arg.type(), std::sqrt(*f)); expr 4175 src/Simplify.cpp expr = Call::make(op->type, op->name, {arg}, op->call_type); expr 4177 src/Simplify.cpp expr = op; expr 4182 src/Simplify.cpp if (propagate_indeterminate_expression(arg, op->type, &expr)) { expr 4186 src/Simplify.cpp expr = FloatImm::make(arg.type(), std::log(*f)); expr 4188 src/Simplify.cpp expr = Call::make(op->type, op->name, {arg}, op->call_type); expr 4190 src/Simplify.cpp expr = op; expr 4195 src/Simplify.cpp if (propagate_indeterminate_expression(arg, op->type, &expr)) { expr 4199 src/Simplify.cpp expr = FloatImm::make(arg.type(), std::exp(*f)); expr 4201 src/Simplify.cpp expr = Call::make(op->type, op->name, {arg}, op->call_type); expr 4203 src/Simplify.cpp expr = op; expr 4209 src/Simplify.cpp if (propagate_indeterminate_expression(arg0, arg1, op->type, &expr)) { expr 4215 src/Simplify.cpp expr = FloatImm::make(arg0.type(), std::pow(*f0, *f1)); expr 4217 src/Simplify.cpp expr = Call::make(op->type, op->name, {arg0, arg1}, op->call_type); expr 4219 src/Simplify.cpp expr = op; expr 4226 src/Simplify.cpp if (propagate_indeterminate_expression(arg, op->type, &expr)) { expr 4232 src/Simplify.cpp expr = FloatImm::make(arg.type(), std::floor(*f)); expr 4234 src/Simplify.cpp expr = FloatImm::make(arg.type(), std::ceil(*f)); expr 4236 src/Simplify.cpp expr = FloatImm::make(arg.type(), std::nearbyint(*f)); expr 4238 src/Simplify.cpp expr = FloatImm::make(arg.type(), (*f < 0 ? std::ceil(*f) : std::floor(*f))); expr 4245 src/Simplify.cpp expr = call; expr 4247 src/Simplify.cpp expr = Call::make(op->type, op->name, {arg}, op->call_type); expr 4249 src/Simplify.cpp expr = op; expr 4291 src/Simplify.cpp expr = Call::make(op->type, Call::prefetch, args, Call::Intrinsic); expr 4293 src/Simplify.cpp expr = op; expr 4307 src/Simplify.cpp expr = mutate(r->base + op->indices[0]*r->stride); expr 4309 src/Simplify.cpp expr = mutate(b->value); expr 4358 src/Simplify.cpp expr = Load::make(t, first_load->name, shuffled_index, first_load->image, expr 4381 src/Simplify.cpp expr = b1->value; expr 4383 src/Simplify.cpp expr = Broadcast::make(b1->value, op->indices.size()); expr 4413 src/Simplify.cpp expr = Ramp::make(r->base, mutate(r->stride / terms), r->lanes * terms); expr 4454 src/Simplify.cpp expr = Shuffle::make_concat(first_shuffle->vectors); expr 4479 src/Simplify.cpp expr = Ramp::make(r->base, r->stride, op->indices.size()); expr 4501 src/Simplify.cpp expr = Ramp::make(new_vectors[0], stride, op->indices.size()); expr 4508 src/Simplify.cpp expr = op; expr 4510 src/Simplify.cpp expr = Shuffle::make(new_vectors, op->indices); expr 4748 src/Simplify.cpp expr = simplify_let<Let, Expr>(op); expr 275 src/SkipStages.cpp expr = Call::make(op->type, Call::if_then_else, expr 282 src/SkipStages.cpp expr = Call::make(op->type, Call::if_then_else, expr 58 src/SlidingWindow.cpp expr = scope.get(var->name); expr 59 src/SlidingWindow.cpp debug(3) << "Fully expanded " << var->name << " -> " << expr << "\n"; expr 61 src/SlidingWindow.cpp expr = var; expr 52 src/Solve.cpp debug(4) << "(Hit) Rewrote " << e << " -> " << iter->second.expr << " (" << uses_var << ")\n"; expr 53 src/Solve.cpp return iter->second.expr; expr 71 src/Solve.cpp Expr expr; expr 139 src/Solve.cpp expr = Expr(); expr 144 src/Solve.cpp expr = mutate(sub_a->a + (b - sub_a->b)); expr 147 src/Solve.cpp expr = mutate(add_a->a + (add_a->b + b)); expr 151 src/Solve.cpp expr = mutate(a*2); expr 154 src/Solve.cpp expr = mutate((add_a->a + b) + add_a->b); expr 157 src/Solve.cpp expr = mutate((a + add_b->a) + add_b->b); expr 160 src/Solve.cpp expr = mutate((sub_a->a + b) - sub_a->b); expr 163 src/Solve.cpp expr = mutate((a + sub_b->a) - sub_b->b); expr 166 src/Solve.cpp expr = mutate(mul_a->a * (mul_a->b + mul_b->b)); expr 169 src/Solve.cpp expr = mutate(mul_a->a + mul_b->a) * mul_a->b; expr 172 src/Solve.cpp expr = mutate(b * (mul_a->b + 1)); expr 175 src/Solve.cpp expr = mutate(a * (mul_b->b + 1)); expr 182 src/Solve.cpp expr = simplify(a + b); expr 186 src/Solve.cpp if (!expr.defined()) { expr 188 src/Solve.cpp expr = op; expr 190 src/Solve.cpp expr = a + b; expr 219 src/Solve.cpp expr = Expr(); expr 224 src/Solve.cpp expr = mutate(sub_a->a - (sub_a->b + b)); expr 227 src/Solve.cpp expr = mutate(add_a->a + (add_a->b - b)); expr 234 src/Solve.cpp expr = mutate(sub_b->b + (a - sub_b->a)); expr 241 src/Solve.cpp expr = mutate(negate(sub_b->a) + (a + sub_b->b)); expr 244 src/Solve.cpp expr = mutate(negate(add_b->a) + (a - add_b->b)); expr 246 src/Solve.cpp expr = mutate(negate(b) + a); expr 251 src/Solve.cpp expr = mutate(add_a->a - b + add_a->b); expr 254 src/Solve.cpp expr = mutate(a - add_b->a - add_b->b); expr 257 src/Solve.cpp expr = mutate(sub_a->a - b - sub_a->b); expr 260 src/Solve.cpp expr = mutate(a - sub_b->a - sub_b->b); expr 263 src/Solve.cpp expr = mutate(mul_a->a * (mul_a->b - mul_b->b)); expr 266 src/Solve.cpp expr = mutate((mul_a->a - mul_b->a) * mul_a->b); expr 273 src/Solve.cpp expr = simplify(a - b); expr 277 src/Solve.cpp if (!expr.defined()) { expr 279 src/Solve.cpp expr = op; expr 281 src/Solve.cpp expr = a - b; expr 315 src/Solve.cpp expr = Expr(); expr 319 src/Solve.cpp expr = mutate(add_a->a * b + add_a->b * b); expr 322 src/Solve.cpp expr = mutate(sub_a->a * b - sub_a->b * b); expr 325 src/Solve.cpp expr = mutate(mul_a->a * (mul_a->b * b)); expr 334 src/Solve.cpp expr = simplify(a * b); expr 338 src/Solve.cpp if (!expr.defined()) { expr 340 src/Solve.cpp expr = op; expr 342 src/Solve.cpp expr = a * b; expr 351 src/Solve.cpp expr = mutate(op->args[0]); expr 390 src/Solve.cpp expr = Expr(); expr 395 src/Solve.cpp expr = mutate(T::make(t_a->a, T::make(t_a->b, b))); expr 400 src/Solve.cpp expr = a; expr 403 src/Solve.cpp expr = mutate(T::make(T::make(t_a->a, b), t_a->b)); expr 406 src/Solve.cpp expr = mutate(T::make(T::make(a, t_b->a), t_b->b)); expr 409 src/Solve.cpp expr = mutate(add_a->a + T::make(add_a->b, add_b->b)); expr 412 src/Solve.cpp expr = mutate(T::make(add_a->a, add_b->a)) + add_a->b; expr 415 src/Solve.cpp expr = mutate(b + T::make(add_a->b, make_zero(op->type))); expr 418 src/Solve.cpp expr = mutate(a + T::make(add_b->b, make_zero(op->type))); expr 421 src/Solve.cpp expr = mutate(sub_a->a - T::make(sub_a->b, sub_b->b)); expr 424 src/Solve.cpp expr = mutate(T::make(sub_a->a, sub_b->a)) - sub_a->b; expr 427 src/Solve.cpp expr = mutate(b - T::make(sub_a->b, make_zero(op->type))); expr 430 src/Solve.cpp expr = mutate(a - T::make(sub_b->b, make_zero(op->type))); expr 434 src/Solve.cpp expr = mutate(T::make(mul_a->a, mul_b->a)) * mul_a->b; expr 438 src/Solve.cpp expr = mutate(Max::make(mul_a->a, mul_b->a)) * mul_a->b; expr 441 src/Solve.cpp expr = mutate(Min::make(mul_a->a, mul_b->a)) * mul_a->b; expr 449 src/Solve.cpp expr = simplify(T::make(a, b)); expr 453 src/Solve.cpp if (!expr.defined()) { expr 455 src/Solve.cpp expr = op; expr 457 src/Solve.cpp expr = T::make(a, b); expr 497 src/Solve.cpp expr = Expr(); expr 502 src/Solve.cpp expr = mutate(T::make(t_a->a, T::make(t_a->b, b))); expr 507 src/Solve.cpp expr = a; expr 510 src/Solve.cpp expr = mutate(T::make(T::make(t_a->a, b), t_a->b)); expr 513 src/Solve.cpp expr = mutate(T::make(T::make(a, t_b->a), t_b->b)); expr 520 src/Solve.cpp expr = simplify(T::make(a, b)); expr 524 src/Solve.cpp if (!expr.defined()) { expr 526 src/Solve.cpp expr = op; expr 528 src/Solve.cpp expr = T::make(a, b); expr 560 src/Solve.cpp expr = mutate(Opp::make(b, a)); expr 576 src/Solve.cpp expr = Expr(); expr 582 src/Solve.cpp expr = mutate(Cmp::make(add_a->a, (b - add_a->b))); expr 585 src/Solve.cpp expr = mutate(Cmp::make(sub_a->a, (b + sub_a->b))); expr 590 src/Solve.cpp expr = mutate(Cmp::make(mul_a->a, (b / mul_a->b))); expr 592 src/Solve.cpp expr = mutate(Opp::make(mul_a->a, (b / mul_a->b))); expr 595 src/Solve.cpp expr = mutate(Opp::make(mul_a->a, make_zero(b.type()) - b)); expr 600 src/Solve.cpp expr = mutate(Opp::make(mul_a->a * negate(mul_a->b), negate(b))); expr 610 src/Solve.cpp expr = mutate((mul_a->a == div) && (rem == 0)); expr 613 src/Solve.cpp expr = mutate((mul_a->a != div) || (rem != 0)); expr 616 src/Solve.cpp expr = mutate(mul_a->a <= div); expr 618 src/Solve.cpp expr = mutate(mul_a->a <= (b - 1) / mul_a->b); expr 620 src/Solve.cpp expr = mutate(mul_a->a > div); expr 622 src/Solve.cpp expr = mutate(mul_a->a > (b - 1) / mul_a->b); expr 629 src/Solve.cpp expr = mutate(Cmp::make(div_a->a, b * div_a->b)); expr 631 src/Solve.cpp expr = mutate(Opp::make(div_a->a, b * div_a->b)); expr 641 src/Solve.cpp expr = mutate(Cmp::make(negate(div_a->a / negate(div_a->b)), b)); expr 645 src/Solve.cpp expr = mutate(div_a->a < b * div_a->b); expr 648 src/Solve.cpp expr = mutate(div_a->a < (b + 1) * div_a->b); expr 651 src/Solve.cpp expr = mutate(div_a->a >= (b + 1) * div_a->b); expr 654 src/Solve.cpp expr = mutate(div_a->a >= b * div_a->b); expr 662 src/Solve.cpp expr = mutate(Cmp::make(a - b, make_zero(a.type()))); expr 665 src/Solve.cpp if (!expr.defined()) { expr 667 src/Solve.cpp expr = op; expr 669 src/Solve.cpp expr = Cmp::make(a, b); expr 701 src/Solve.cpp expr = op; expr 704 src/Solve.cpp expr = e.expr; expr 711 src/Solve.cpp expr = mutate(e); expr 713 src/Solve.cpp expr = op; expr 725 src/Solve.cpp expr = mutate(op->body); expr 1106 src/Solve.cpp expr = mutate(op->value); expr 1113 src/Solve.cpp expr = const_true(); expr 1117 src/Solve.cpp expr = const_false(); expr 1137 src/Solve.cpp expr = op; expr 1139 src/Solve.cpp expr = Cmp::make(a, b); expr 1172 src/Solve.cpp expr = (i.min == 0); expr 1176 src/Solve.cpp expr = (i.min <= 0) && (i.max >= 0); expr 1179 src/Solve.cpp expr = (i.min == 0) && (i.max == 0); expr 1186 src/Solve.cpp expr = mutate(!(op->a == op->b)); expr 1202 src/Solve.cpp expr = i.min; expr 1204 src/Solve.cpp expr = const_false(); expr 1210 src/Solve.cpp expr = i.max; expr 1212 src/Solve.cpp expr = const_true(); expr 1218 src/Solve.cpp expr = op; expr 1265 src/Solve.cpp expr = mutate(op->body); expr 1268 src/Solve.cpp if (expr_uses_var(expr, op->name)) { expr 1269 src/Solve.cpp expr = Let::make(op->name, op->value, expr); expr 1271 src/Solve.cpp if (value_bounds.has_lower_bound() && expr_uses_var(expr, min_name)) { expr 1272 src/Solve.cpp expr = Let::make(min_name, value_bounds.min, expr); expr 1274 src/Solve.cpp if (value_bounds.has_upper_bound() && expr_uses_var(expr, max_name)) { expr 1275 src/Solve.cpp expr = Let::make(max_name, value_bounds.max, expr); expr 1282 src/Solve.cpp expr = op; expr 1284 src/Solve.cpp expr = Let::make(op->name, op->value, body); expr 1584 src/Solve.cpp Expr expr = Add::make(z, Sub::make(x, y)); expr 1585 src/Solve.cpp SolverResult solved = solve_expression(expr, "y"); expr 122 src/SplitTuples.cpp expr = Call::make(op->type, name, args, op->call_type, f.get_contents()); expr 219 src/StorageFlattening.cpp expr = Load::make(op->type, op->name, idx, op->image, op->param, expr 305 src/StorageFlattening.cpp expr = Cast::make(op->type, Load::make(t, op->name, mutate(op->index), expr 63 src/StorageFolding.cpp op = expr.as<Call>(); expr 69 src/StorageFolding.cpp expr = Call::make(op->type, op->name, args, op->call_type, expr 376 src/StorageFolding.cpp expr = scope.get(op->name); expr 378 src/StorageFolding.cpp expr = op; expr 33 src/Substitute.cpp expr = r; expr 35 src/Substitute.cpp expr = v; expr 47 src/Substitute.cpp expr = op; expr 49 src/Substitute.cpp expr = Let::make(op->name, new_value, new_body); expr 86 src/Substitute.cpp Expr substitute(const string &name, const Expr &replacement, const Expr &expr) { expr 90 src/Substitute.cpp return s.mutate(expr); expr 100 src/Substitute.cpp Expr substitute(const map<string, Expr> &m, const Expr &expr) { expr 102 src/Substitute.cpp return s.mutate(expr); expr 126 src/Substitute.cpp Expr substitute(const Expr &find, const Expr &replacement, const Expr &expr) { expr 130 src/Substitute.cpp return s.mutate(expr); expr 149 src/Substitute.cpp expr = value; expr 151 src/Substitute.cpp expr = op; expr 176 src/Substitute.cpp Expr graph_substitute(const string &name, const Expr &replacement, const Expr &expr) { expr 177 src/Substitute.cpp return GraphSubstitute(name, replacement).mutate(expr); expr 184 src/Substitute.cpp Expr graph_substitute(const Expr &find, const Expr &replacement, const Expr &expr) { expr 185 src/Substitute.cpp return GraphSubstituteExpr(find, replacement).mutate(expr); expr 199 src/Substitute.cpp expr = graph_substitute(op->name, value, body); expr 203 src/Substitute.cpp Expr substitute_in_all_lets(const Expr &expr) { expr 204 src/Substitute.cpp return SubstituteInAllLets().mutate(expr); expr 22 src/Substitute.h EXPORT Expr substitute(const std::string &name, const Expr &replacement, const Expr &expr); expr 30 src/Substitute.h EXPORT Expr substitute(const std::map<std::string, Expr> &replacements, const Expr &expr); expr 36 src/Substitute.h EXPORT Expr substitute(const Expr &find, const Expr &replacement, const Expr &expr); expr 43 src/Substitute.h Expr graph_substitute(const std::string &name, const Expr &replacement, const Expr &expr); expr 45 src/Substitute.h Expr graph_substitute(const Expr &find, const Expr &replacement, const Expr &expr); expr 55 src/Substitute.h Expr substitute_in_all_lets(const Expr &expr); expr 70 src/Tracing.cpp op = expr.as<Call>(); expr 100 src/Tracing.cpp expr = Let::make(value_var_name, op, expr 33 src/TrimNoOps.cpp expr = mutate(op->args.back()); expr 242 src/TrimNoOps.cpp expr = a; expr 244 src/TrimNoOps.cpp expr = b; expr 246 src/TrimNoOps.cpp expr = Min::make(a, b); expr 258 src/TrimNoOps.cpp expr = a; expr 260 src/TrimNoOps.cpp expr = b; expr 262 src/TrimNoOps.cpp expr = Max::make(a, b); expr 270 src/TrimNoOps.cpp if (provably_true_over_domain(expr)) { expr 271 src/TrimNoOps.cpp expr = make_one(op->type); expr 272 src/TrimNoOps.cpp } else if (provably_true_over_domain(!expr)) { expr 273 src/TrimNoOps.cpp expr = make_zero(op->type); expr 311 src/TrimNoOps.cpp expr = visit_let<Expr, Let>(op); expr 27 src/UnifyDuplicateLets.cpp expr = Variable::make(e.type(), iter->second); expr 32 src/UnifyDuplicateLets.cpp expr = Expr(); expr 35 src/UnifyDuplicateLets.cpp return expr; expr 42 src/UnifyDuplicateLets.cpp expr = Variable::make(op->type, iter->second); expr 44 src/UnifyDuplicateLets.cpp expr = op; expr 68 src/UniquifyVariableNames.cpp expr = op; expr 70 src/UniquifyVariableNames.cpp expr = Let::make(new_name, value, body); expr 96 src/UniquifyVariableNames.cpp expr = Variable::make(op->type, new_name); expr 98 src/UniquifyVariableNames.cpp expr = op; expr 87 src/VaryingAttributes.cpp expr = Call::make(op->type, op->name, new_args, op->call_type, expr 108 src/VaryingAttributes.cpp expr = Let::make(op->name, mutated_value, mutated_body); expr 153 src/VaryingAttributes.cpp expr = op; expr 156 src/VaryingAttributes.cpp virtual void visit(const IntImm *op) { order = 0; expr = op; } expr 157 src/VaryingAttributes.cpp virtual void visit(const UIntImm *op) { order = 0; expr = op; } expr 158 src/VaryingAttributes.cpp virtual void visit(const FloatImm *op) { order = 0; expr = op; } expr 159 src/VaryingAttributes.cpp virtual void visit(const StringImm *op) { order = 0; expr = op; } expr 176 src/VaryingAttributes.cpp expr = Cast::make(op->type, mutated_value); expr 199 src/VaryingAttributes.cpp expr = T::make(a, b); expr 224 src/VaryingAttributes.cpp expr = Mul::make(a, b); expr 252 src/VaryingAttributes.cpp expr = Div::make(a, b); expr 276 src/VaryingAttributes.cpp expr = T::make(a, b); expr 307 src/VaryingAttributes.cpp expr = Not::make(a); expr 321 src/VaryingAttributes.cpp expr = Broadcast::make(a, op->lanes); expr 359 src/VaryingAttributes.cpp expr = Select::make(mutated_condition, mutated_true_value, mutated_false_value); expr 415 src/VaryingAttributes.cpp expr = op->args[1]; expr 443 src/VaryingAttributes.cpp expr = Variable::make(op->type, name); expr 514 src/VaryingAttributes.cpp expr = Cast::make(op->type, floor(v + 0.5f)); expr 517 src/VaryingAttributes.cpp expr = op; expr 534 src/VaryingAttributes.cpp expr = Expr(op) - 0.5f; expr 540 src/VaryingAttributes.cpp expr = Variable::make(scope.get(op->name).type(), op->name); expr 542 src/VaryingAttributes.cpp expr = op; expr 568 src/VaryingAttributes.cpp expr = T::make(mutated_a, mutated_b); expr 605 src/VaryingAttributes.cpp expr = Select::make(mutated_condition, mutated_true_value, mutated_false_value); expr 623 src/VaryingAttributes.cpp expr = op; expr 626 src/VaryingAttributes.cpp expr = Ramp::make(mutated_base, mutated_stride, op->lanes); expr 644 src/VaryingAttributes.cpp expr = Let::make(op->name, mutated_value, mutated_body); expr 679 src/VaryingAttributes.cpp virtual Stmt mutate(Expr expr); expr 38 src/VectorizeLoops.cpp expr = Variable::make(op->type, var + ".lane." + std::to_string(op->indices[0])); expr 201 src/VectorizeLoops.cpp expr = Load::make(op->type, op->name, mutate_index(op->name, op->index), expr 272 src/VectorizeLoops.cpp expr = op; expr 293 src/VectorizeLoops.cpp expr = op; expr 296 src/VectorizeLoops.cpp expr = Load::make(op->type, op->name, index, op->image, op->param, predicate); expr 393 src/VectorizeLoops.cpp expr = op; expr 396 src/VectorizeLoops.cpp expr = Cast::make(t, value); expr 403 src/VectorizeLoops.cpp expr = replacement; expr 407 src/VectorizeLoops.cpp expr = Variable::make(scope.get(op->name).type(), widened_name); expr 409 src/VectorizeLoops.cpp expr = op; expr 417 src/VectorizeLoops.cpp expr = op; expr 420 src/VectorizeLoops.cpp expr = T::make(widen(a, w), widen(b, w)); expr 447 src/VectorizeLoops.cpp expr = op; expr 454 src/VectorizeLoops.cpp expr = Select::make(condition, true_value, false_value); expr 463 src/VectorizeLoops.cpp expr = op; expr 467 src/VectorizeLoops.cpp expr = Load::make(op->type.with_lanes(w), op->name, index, op->image, expr 489 src/VectorizeLoops.cpp expr = op; expr 511 src/VectorizeLoops.cpp expr = Call::make(op->type, Call::trace, new_args, op->call_type); expr 517 src/VectorizeLoops.cpp expr = Call::make(op->type.with_lanes(max_lanes), op->name, new_args, expr 543 src/VectorizeLoops.cpp expr = op; expr 546 src/VectorizeLoops.cpp expr = Let::make(vectorized_name, mutated_value, mutated_body); expr 548 src/VectorizeLoops.cpp expr = Let::make(op->name, mutated_value, mutated_body); expr 56 src/WrapExternStages.cpp arg.expr.type(), 0); expr 132 src/WrapExternStages.cpp expr = Call::make(op->type, make_wrapper(op), new_args, Call::Extern, op->func); expr 21 test/correctness/custom_lowering_pass.cpp expr = op; expr 47 test/correctness/custom_lowering_pass.cpp expr = record_float_mul(expr); expr 8 test/correctness/infer_arguments.cpp bool constant_expr_equals(Expr expr, T expected) { expr 9 test/correctness/infer_arguments.cpp return (expr.type() == type_of<T>() && expr 10 test/correctness/infer_arguments.cpp is_one(simplify(expr == Expr(expected)))); expr 40 test/correctness/simd_op_check.cpp Expr expr; expr 2056 test/correctness/simd_op_check.cpp return check_one(task.op, task.name, task.vector_width, task.expr); expr 49 test/opengl/varying.cpp expr = record_varying(op);