@@ -560,13 +560,12 @@ void FlatAffineConstraints::convertLoopIVSymbolsToDims() {
560
560
}
561
561
}
562
562
563
- void FlatAffineConstraints::addInductionVarOrTerminalSymbol (
564
- Value id, bool allowNonTerminal) {
563
+ void FlatAffineConstraints::addInductionVarOrTerminalSymbol (Value id) {
565
564
if (containsId (id))
566
565
return ;
567
566
568
567
// Caller is expected to fully compose map/operands if necessary.
569
- assert ((allowNonTerminal || isTopLevelValue (id) || isForInductionVar (id)) &&
568
+ assert ((isTopLevelValue (id) || isForInductionVar (id)) &&
570
569
" non-terminal symbol / loop IV expected" );
571
570
// Outer loop IVs could be used in forOp's bounds.
572
571
if (auto loop = getForInductionVarOwner (id)) {
@@ -1945,9 +1944,10 @@ void FlatAffineConstraints::getSliceBounds(unsigned offset, unsigned num,
1945
1944
}
1946
1945
}
1947
1946
1948
- LogicalResult FlatAffineConstraints::addLowerOrUpperBound (
1949
- unsigned pos, AffineMap boundMap, ValueRange boundOperands, bool eq,
1950
- bool lower, bool composeMapAndOperands) {
1947
+ LogicalResult
1948
+ FlatAffineConstraints::addLowerOrUpperBound (unsigned pos, AffineMap boundMap,
1949
+ ValueRange boundOperands, bool eq,
1950
+ bool lower) {
1951
1951
assert (pos < getNumDimAndSymbolIds () && " invalid position" );
1952
1952
// Equality follows the logic of lower bound except that we add an equality
1953
1953
// instead of an inequality.
@@ -1959,13 +1959,11 @@ LogicalResult FlatAffineConstraints::addLowerOrUpperBound(
1959
1959
// transitively get to terminal symbols or loop IVs.
1960
1960
auto map = boundMap;
1961
1961
SmallVector<Value, 4 > operands (boundOperands.begin (), boundOperands.end ());
1962
- if (composeMapAndOperands)
1963
- fullyComposeAffineMapAndOperands (&map, &operands);
1962
+ fullyComposeAffineMapAndOperands (&map, &operands);
1964
1963
map = simplifyAffineMap (map);
1965
1964
canonicalizeMapAndOperands (&map, &operands);
1966
1965
for (auto operand : operands)
1967
- addInductionVarOrTerminalSymbol (
1968
- operand, /* allowNonTerminal=*/ !composeMapAndOperands);
1966
+ addInductionVarOrTerminalSymbol (operand);
1969
1967
1970
1968
FlatAffineConstraints localVarCst;
1971
1969
std::vector<SmallVector<int64_t , 8 >> flatExprs;
0 commit comments