case TensorExp::Kind::kTensor:
assert(x != kInvalidId && y == kInvalidId && !v && !o);
tensor = x;
- break;
+ return;
case TensorExp::Kind::kInvariant:
assert(x == kInvalidId && y == kInvalidId && v && !o);
- break;
+ return;
case TensorExp::Kind::kLoopVar:
assert(x != kInvalidId && y == kInvalidId && !v && !o);
loop = x;
- break;
+ return;
// Unary operations.
case TensorExp::Kind::kAbsF:
case TensorExp::Kind::kAbsC:
assert(x != kInvalidId && y == kInvalidId && !v && !o);
children.e0 = x;
children.e1 = y;
- break;
+ return;
case TensorExp::Kind::kTruncF:
case TensorExp::Kind::kExtF:
case TensorExp::Kind::kCastFS:
assert(x != kInvalidId && y == kInvalidId && v && !o);
children.e0 = x;
children.e1 = y;
- break;
+ return;
case TensorExp::Kind::kBinaryBranch:
case TensorExp::Kind::kSelect:
assert(x != kInvalidId && y == kInvalidId && !v && o);
children.e0 = x;
children.e1 = y;
- break;
+ return;
case TensorExp::Kind::kUnary:
// No assertion on y can be made, as the branching paths involve both
// a unary (`mapSet`) and binary (`disjSet`) pathway.
assert(x != kInvalidId && !v && o);
children.e0 = x;
children.e1 = y;
- break;
+ return;
// Binary operations.
case TensorExp::Kind::kMulF:
case TensorExp::Kind::kMulC:
assert(x != kInvalidId && y != kInvalidId && !v && !o);
children.e0 = x;
children.e1 = y;
- break;
+ return;
case TensorExp::Kind::kBinary:
case TensorExp::Kind::kReduce:
assert(x != kInvalidId && y != kInvalidId && !v && o);
children.e0 = x;
children.e1 = y;
- break;
+ return;
}
+ llvm_unreachable("unexpected kind");
}
LatPoint::LatPoint(const BitVector &bits, ExprId e) : bits(bits), exp(e) {}