@@ -136,8 +136,8 @@ def ExecuteRegionOp : SCF_Op<"execute_region", [
136
136
def ForOp : SCF_Op<"for",
137
137
[AutomaticAllocationScope, DeclareOpInterfaceMethods<LoopLikeOpInterface,
138
138
["getInitsMutable", "getLoopResults", "getRegionIterArgs",
139
- "getSingleInductionVar ", "getSingleLowerBound ", "getSingleStep ",
140
- "getSingleUpperBound ", "getYieldedValuesMutable",
139
+ "getInductionVars ", "getMixedLowerBound ", "getMixedStep ",
140
+ "getMixedUpperBound ", "getYieldedValuesMutable",
141
141
"promoteIfSingleIteration", "replaceWithAdditionalYields",
142
142
"yieldTiledValuesAndReplace"]>,
143
143
AllTypesMatch<["lowerBound", "upperBound", "step"]>,
@@ -301,8 +301,8 @@ def ForallOp : SCF_Op<"forall", [
301
301
AttrSizedOperandSegments,
302
302
AutomaticAllocationScope,
303
303
DeclareOpInterfaceMethods<LoopLikeOpInterface,
304
- ["getInitsMutable", "getRegionIterArgs", "getSingleInductionVar ",
305
- "getSingleLowerBound ", "getSingleUpperBound ", "getSingleStep ",
304
+ ["getInitsMutable", "getRegionIterArgs", "getInductionVars ",
305
+ "getMixedLowerBound ", "getMixedUpperBound ", "getMixedStep ",
306
306
"promoteIfSingleIteration", "yieldTiledValuesAndReplace"]>,
307
307
RecursiveMemoryEffects,
308
308
SingleBlockImplicitTerminator<"scf::InParallelOp">,
@@ -510,24 +510,6 @@ def ForallOp : SCF_Op<"forall", [
510
510
];
511
511
512
512
let extraClassDeclaration = [{
513
- // Get lower bounds as OpFoldResult.
514
- SmallVector<OpFoldResult> getMixedLowerBound() {
515
- Builder b(getOperation()->getContext());
516
- return getMixedValues(getStaticLowerBound(), getDynamicLowerBound(), b);
517
- }
518
-
519
- // Get upper bounds as OpFoldResult.
520
- SmallVector<OpFoldResult> getMixedUpperBound() {
521
- Builder b(getOperation()->getContext());
522
- return getMixedValues(getStaticUpperBound(), getDynamicUpperBound(), b);
523
- }
524
-
525
- // Get steps as OpFoldResult.
526
- SmallVector<OpFoldResult> getMixedStep() {
527
- Builder b(getOperation()->getContext());
528
- return getMixedValues(getStaticStep(), getDynamicStep(), b);
529
- }
530
-
531
513
/// Get lower bounds as values.
532
514
SmallVector<Value> getLowerBound(OpBuilder &b) {
533
515
return getValueOrCreateConstantIndexOp(b, getLoc(), getMixedLowerBound());
@@ -584,10 +566,6 @@ def ForallOp : SCF_Op<"forall", [
584
566
getNumDynamicControlOperands() + getRank());
585
567
}
586
568
587
- ::mlir::ValueRange getInductionVars() {
588
- return getBody()->getArguments().take_front(getRank());
589
- }
590
-
591
569
::mlir::Value getInductionVar(int64_t idx) {
592
570
return getInductionVars()[idx];
593
571
}
@@ -765,8 +743,8 @@ def IfOp : SCF_Op<"if", [DeclareOpInterfaceMethods<RegionBranchOpInterface, [
765
743
def ParallelOp : SCF_Op<"parallel",
766
744
[AutomaticAllocationScope,
767
745
AttrSizedOperandSegments,
768
- DeclareOpInterfaceMethods<LoopLikeOpInterface, ["getSingleInductionVar ",
769
- "getSingleLowerBound ", "getSingleUpperBound ", "getSingleStep "]>,
746
+ DeclareOpInterfaceMethods<LoopLikeOpInterface, ["getInductionVars ",
747
+ "getMixedLowerBound ", "getMixedUpperBound ", "getMixedStep "]>,
770
748
RecursiveMemoryEffects,
771
749
DeclareOpInterfaceMethods<RegionBranchOpInterface>,
772
750
SingleBlockImplicitTerminator<"scf::ReduceOp">,
@@ -846,9 +824,6 @@ def ParallelOp : SCF_Op<"parallel",
846
824
];
847
825
848
826
let extraClassDeclaration = [{
849
- ValueRange getInductionVars() {
850
- return getBody()->getArguments();
851
- }
852
827
unsigned getNumLoops() { return getStep().size(); }
853
828
unsigned getNumReductions() { return getInitVals().size(); }
854
829
}];
0 commit comments