@@ -869,7 +869,7 @@ Type Merger::inferType(unsigned e, Value src) {
869869}
870870
871871// / Ensures that sparse compiler can generate code for expression.
872- static bool isAdmissableBranchExp (Operation *op, Block *block, Value v) {
872+ static bool isAdmissibleBranchExp (Operation *op, Block *block, Value v) {
873873 // Arguments are always admissible.
874874 if (auto arg = v.dyn_cast <BlockArgument>())
875875 return true ;
@@ -883,19 +883,19 @@ static bool isAdmissableBranchExp(Operation *op, Block *block, Value v) {
883883 // Operation defined within branch. Anything is accepted,
884884 // as long as all subexpressions are admissible.
885885 for (unsigned i = 0 , n = def->getNumOperands (); i < n; i++)
886- if (!isAdmissableBranchExp (op, block, def->getOperand (i)))
886+ if (!isAdmissibleBranchExp (op, block, def->getOperand (i)))
887887 return false ;
888888 return true ;
889889}
890890
891891// / Ensures that sparse compiler can generate code for branch.
892- static bool isAdmissableBranch (Operation *op, Region ®ion) {
892+ static bool isAdmissibleBranch (Operation *op, Region ®ion) {
893893 if (region.empty ())
894894 return true ;
895895 // Build the semi-ring branch semantics backward from yield.
896896 Operation *yield = region.front ().getTerminator ();
897897 assert (isa<YieldOp>(yield));
898- return isAdmissableBranchExp (op, ®ion.front (), yield->getOperand (0 ));
898+ return isAdmissibleBranchExp (op, ®ion.front (), yield->getOperand (0 ));
899899}
900900
901901Optional<unsigned > Merger::buildTensorExp (linalg::GenericOp op, Value v) {
@@ -989,12 +989,12 @@ Optional<unsigned> Merger::buildTensorExp(linalg::GenericOp op, Value v) {
989989 if (isa<arith::BitcastOp>(def))
990990 return addExp (kBitCast , e, v);
991991 if (auto unop = dyn_cast<sparse_tensor::UnaryOp>(def)) {
992- if (isAdmissableBranch (unop, unop.getPresentRegion ()) &&
993- isAdmissableBranch (unop, unop.getAbsentRegion ()))
992+ if (isAdmissibleBranch (unop, unop.getPresentRegion ()) &&
993+ isAdmissibleBranch (unop, unop.getAbsentRegion ()))
994994 return addExp (kUnary , e, Value (), def);
995995 }
996996 if (auto selop = dyn_cast<sparse_tensor::SelectOp>(def)) {
997- if (isAdmissableBranch (selop, selop.getRegion ()))
997+ if (isAdmissibleBranch (selop, selop.getRegion ()))
998998 return addExp (kSelect , e, Value (), def);
999999 }
10001000 }
@@ -1047,11 +1047,11 @@ Optional<unsigned> Merger::buildTensorExp(linalg::GenericOp op, Value v) {
10471047 if (isa<arith::ShLIOp>(def) && isInvariant (e1 ))
10481048 return addExp (kShlI , e0 , e1 );
10491049 if (auto binop = dyn_cast<sparse_tensor::BinaryOp>(def)) {
1050- if (isAdmissableBranch (binop, binop.getOverlapRegion ()) &&
1050+ if (isAdmissibleBranch (binop, binop.getOverlapRegion ()) &&
10511051 (binop.getLeftIdentity () ||
1052- isAdmissableBranch (binop, binop.getLeftRegion ())) &&
1052+ isAdmissibleBranch (binop, binop.getLeftRegion ())) &&
10531053 (binop.getRightIdentity () ||
1054- isAdmissableBranch (binop, binop.getRightRegion ())))
1054+ isAdmissibleBranch (binop, binop.getRightRegion ())))
10551055 return addExp (kBinary , e0 , e1 , Value (), def);
10561056 }
10571057 }
@@ -1065,7 +1065,7 @@ Optional<unsigned> Merger::buildTensorExp(linalg::GenericOp op, Value v) {
10651065 unsigned e0 = x.value ();
10661066 unsigned e1 = y.value ();
10671067 if (auto redop = dyn_cast<sparse_tensor::ReduceOp>(def)) {
1068- if (isAdmissableBranch (redop, redop.getRegion ()))
1068+ if (isAdmissibleBranch (redop, redop.getRegion ()))
10691069 return addExp (kReduce , e0 , e1 , Value (), def);
10701070 }
10711071 }
0 commit comments