Remove dead references to `LoopTilingAndDistributionInfo`. (#10619)
This limits the references to this to place that only need it.
diff --git a/compiler/src/iree/compiler/Codegen/LLVMCPU/KernelDispatch.cpp b/compiler/src/iree/compiler/Codegen/LLVMCPU/KernelDispatch.cpp
index 7051d97..1992888 100644
--- a/compiler/src/iree/compiler/Codegen/LLVMCPU/KernelDispatch.cpp
+++ b/compiler/src/iree/compiler/Codegen/LLVMCPU/KernelDispatch.cpp
@@ -1573,10 +1573,9 @@
}
SmallVector<Operation *> computeOps;
- SmallVector<LoopTilingAndDistributionInfo> tiledLoops;
// If there are no linalg ops, not using Linalg based lowering.
- if (failed(getComputeOps(funcOp, computeOps, tiledLoops))) {
+ if (failed(getComputeOps(funcOp, computeOps))) {
return failure();
}
diff --git a/compiler/src/iree/compiler/Codegen/LLVMGPU/KernelConfig.cpp b/compiler/src/iree/compiler/Codegen/LLVMGPU/KernelConfig.cpp
index d6778fd..8e0b74c 100644
--- a/compiler/src/iree/compiler/Codegen/LLVMGPU/KernelConfig.cpp
+++ b/compiler/src/iree/compiler/Codegen/LLVMGPU/KernelConfig.cpp
@@ -705,8 +705,7 @@
if (!exportOp) continue;
if (getTranslationInfo(exportOp)) continue;
SmallVector<Operation *> computeOps;
- SmallVector<LoopTilingAndDistributionInfo> tiledLoops;
- if (failed(getComputeOps(funcOp, computeOps, tiledLoops))) {
+ if (failed(getComputeOps(funcOp, computeOps))) {
return funcOp.emitOpError("failed to get compute ops");
}
diff --git a/compiler/src/iree/compiler/Codegen/SPIRV/KernelConfig.cpp b/compiler/src/iree/compiler/Codegen/SPIRV/KernelConfig.cpp
index ed80716..60380e1 100644
--- a/compiler/src/iree/compiler/Codegen/SPIRV/KernelConfig.cpp
+++ b/compiler/src/iree/compiler/Codegen/SPIRV/KernelConfig.cpp
@@ -854,8 +854,7 @@
if (!exportOp) continue;
SmallVector<Operation *> computeOps;
- SmallVector<LoopTilingAndDistributionInfo> tiledLoops;
- if (failed(getComputeOps(funcOp, computeOps, tiledLoops))) {
+ if (failed(getComputeOps(funcOp, computeOps))) {
return funcOp.emitOpError("failed to get compute ops");
}
diff --git a/compiler/src/iree/compiler/Codegen/SPIRV/SPIRVTile.cpp b/compiler/src/iree/compiler/Codegen/SPIRV/SPIRVTile.cpp
index 99bfc15..307cc7c 100644
--- a/compiler/src/iree/compiler/Codegen/SPIRV/SPIRVTile.cpp
+++ b/compiler/src/iree/compiler/Codegen/SPIRV/SPIRVTile.cpp
@@ -86,8 +86,7 @@
SmallVector<scf::IfOp, 1> ifOps;
funcOp.walk([&ifOps](scf::IfOp ifOp) { ifOps.push_back(ifOp); });
if (ifOps.empty()) {
- SmallVector<LoopTilingAndDistributionInfo> loopInfos;
- if (failed(getComputeOps(funcOp, computeOps, loopInfos))) {
+ if (failed(getComputeOps(funcOp, computeOps))) {
funcOp.emitOpError("does not contain compute ops");
return signalPassFailure();
}
diff --git a/compiler/src/iree/compiler/Codegen/Utils/Utils.h b/compiler/src/iree/compiler/Codegen/Utils/Utils.h
index 1f333a9..506f707 100644
--- a/compiler/src/iree/compiler/Codegen/Utils/Utils.h
+++ b/compiler/src/iree/compiler/Codegen/Utils/Utils.h
@@ -146,6 +146,11 @@
LogicalResult getComputeOps(
func::FuncOp funcOp, SmallVectorImpl<Operation *> &computeOps,
SmallVectorImpl<LoopTilingAndDistributionInfo> &tiledLoops);
+inline LogicalResult getComputeOps(func::FuncOp funcOp,
+ SmallVectorImpl<Operation *> &computeOps) {
+ SmallVector<LoopTilingAndDistributionInfo> tiledLoops;
+ return getComputeOps(funcOp, computeOps, tiledLoops);
+}
/// If the given `forOp` is a tiled and distributed loop, returns its tiling and
/// distribution information.