Skip to content

Commit bf6d10f

Browse files
authored
Inline maxNumDims declaration; avoid declaring a targetModel object (Xilinx#851)
1 parent 6a84e48 commit bf6d10f

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

mlir/lib/Transform/AIRDependencyScheduleOpt.cpp

+2-6
Original file line numberDiff line numberDiff line change
@@ -5614,12 +5614,8 @@ class AIROptimizeShimDMABDs
56145614
signalPassFailure();
56155615
return;
56165616
}
5617-
int maxNumDims = -1; // -1 means unlimited.
5618-
const auto &targetModel = AIE::getTargetModel(*device);
5619-
if (isa<AIE::AIE1TargetModel>(targetModel))
5620-
maxNumDims = 1;
5621-
else if (isa<AIE::AIE2TargetModel>(targetModel))
5622-
maxNumDims = 4;
5617+
int maxNumDims =
5618+
isa<AIE::AIE1TargetModel>(AIE::getTargetModel(*device)) ? 1 : 4;
56235619
// Preprocess the IR's L3 dma bds by applying loop splitting, fusion and
56245620
// specialization patterns.
56255621
air::applyAIRIsolateAsyncDmaLoopNestsPattern(&func.getRegion());

0 commit comments

Comments
 (0)