@@ -411,7 +411,7 @@ static void genInsertionStore(CodegenEnv &env, OpBuilder &builder, OpOperand *t,
411
411
Location loc = op.getLoc ();
412
412
// Direct insertion in lexicographic coordinate order.
413
413
if (!env.isExpand ()) {
414
- const LoopOrd numLoops = op.getRank (t);
414
+ const LoopId numLoops = op.getRank (t);
415
415
// Retrieves the first `numLoop` induction variables.
416
416
SmallVector<Value> ivs = llvm::to_vector (
417
417
llvm::drop_end (env.emitter ().getLoopIVsRange (),
@@ -713,7 +713,7 @@ static void genInvariants(CodegenEnv &env, OpBuilder &builder, ExprId exp,
713
713
}
714
714
715
715
// / Generates an expanded access pattern in innermost dimension.
716
- static void genExpand (CodegenEnv &env, OpBuilder &builder, LoopOrd at,
716
+ static void genExpand (CodegenEnv &env, OpBuilder &builder, LoopId at,
717
717
bool atStart) {
718
718
linalg::GenericOp op = env.op ();
719
719
OpOperand *lhs = op.getDpsInitOperand (0 );
@@ -740,7 +740,7 @@ static void genExpand(CodegenEnv &env, OpBuilder &builder, LoopOrd at,
740
740
r.getResult (3 ));
741
741
} else {
742
742
SmallVector<Value> indices;
743
- for (LoopOrd i = 0 ; i < at; i++)
743
+ for (LoopId i = 0 ; i < at; i++)
744
744
indices.push_back (env.emitter ().getLoopIV (i));
745
745
Value values = env.getExpandValues ();
746
746
Value filled = env.getExpandFilled ();
@@ -815,7 +815,7 @@ static Operation *genCoIteration(CodegenEnv &env, OpBuilder &builder,
815
815
816
816
// / Generates a for-loop or a while-loop, depending on whether it implements
817
817
// / singleton iteration or co-iteration over the given conjunction.
818
- static Operation *genLoop (CodegenEnv &env, OpBuilder &builder, LoopOrd at,
818
+ static Operation *genLoop (CodegenEnv &env, OpBuilder &builder, LoopId at,
819
819
bool needsUniv, ArrayRef<TensorLevel> tidLvls) {
820
820
bool tryParallel = shouldTryParallize (env, at, at == 0 , tidLvls);
821
821
return genCoIteration (env, builder, at, tidLvls, tryParallel, needsUniv);
@@ -943,7 +943,7 @@ static void endIf(CodegenEnv &env, OpBuilder &builder, scf::IfOp ifOp,
943
943
// / Starts a loop sequence at given level. Returns true if
944
944
// / the universal loop index must be maintained at this level.
945
945
static bool startLoopSeq (CodegenEnv &env, OpBuilder &builder, ExprId exp,
946
- LoopOrd idx, LoopId ldx, LatSetId lts) {
946
+ LoopId idx, LoopId ldx, LatSetId lts) {
947
947
assert (!env.getLoopVar (idx));
948
948
// Emit invariants at this loop sequence level.
949
949
genInvariants (env, builder, exp, ldx, /* atStart=*/ true );
@@ -1127,7 +1127,7 @@ static bool translateBitsToTidLvlPairs(
1127
1127
1128
1128
// / Starts a single loop in current sequence.
1129
1129
static std::pair<Operation *, bool > startLoop (CodegenEnv &env,
1130
- OpBuilder &builder, LoopOrd at,
1130
+ OpBuilder &builder, LoopId at,
1131
1131
LatPointId li, bool needsUniv) {
1132
1132
// The set of tensors + lvls to generate loops on
1133
1133
SmallVector<TensorLevel> tidLvls;
@@ -1199,7 +1199,7 @@ static void endLoopSeq(CodegenEnv &env, OpBuilder &builder, unsigned exp,
1199
1199
// / to manage the complexity of implementing co-iteration over unions
1200
1200
// / and intersections of sparse iterations spaces.
1201
1201
static void genStmt (CodegenEnv &env, RewriterBase &rewriter, ExprId exp,
1202
- LoopOrd at) {
1202
+ LoopId at) {
1203
1203
// At each leaf, assign remaining tensor (sub)expression to output tensor.
1204
1204
if (at == env.getLoopNum ()) {
1205
1205
Value rhs = genExp (env, rewriter, exp);
0 commit comments