forked from OSchip/llvm-project
Apply clang-tidy fixes for performance-unnecessary-value-param in VectorDistribute.cpp (NFC)
This commit is contained in:
parent
b254d55711
commit
08d651d7ba
|
@ -59,7 +59,7 @@ using DistributionMapFn = std::function<AffineMap(vector::TransferWriteOp)>;
|
|||
/// }
|
||||
/// vector.transfer_write %v, %A[%id] : vector<1xf32>, memref<128xf32>
|
||||
void populateDistributeTransferWriteOpPatterns(
|
||||
RewritePatternSet &patterns, DistributionMapFn distributionMapFn);
|
||||
RewritePatternSet &patterns, const DistributionMapFn &distributionMapFn);
|
||||
|
||||
/// Move scalar operations with no dependency on the warp op outside of the
|
||||
/// region.
|
||||
|
|
|
@ -15,6 +15,8 @@
|
|||
#include "mlir/IR/BlockAndValueMapping.h"
|
||||
#include "mlir/Transforms/SideEffectUtils.h"
|
||||
|
||||
#include <utility>
|
||||
|
||||
using namespace mlir;
|
||||
using namespace mlir::vector;
|
||||
|
||||
|
@ -281,7 +283,7 @@ struct WarpOpTransferWrite : public OpRewritePattern<vector::TransferWriteOp> {
|
|||
WarpOpTransferWrite(MLIRContext *ctx, DistributionMapFn fn,
|
||||
PatternBenefit b = 1)
|
||||
: OpRewritePattern<vector::TransferWriteOp>(ctx, b),
|
||||
distributionMapFn(fn) {}
|
||||
distributionMapFn(std::move(fn)) {}
|
||||
|
||||
/// Distribute the TransferWriteOp. Only 1D distributions and vector dims that
|
||||
/// are multiples of the distribution ratio are supported at the moment.
|
||||
|
@ -815,7 +817,7 @@ void mlir::vector::populateWarpExecuteOnLane0OpToScfForPattern(
|
|||
}
|
||||
|
||||
void mlir::vector::populateDistributeTransferWriteOpPatterns(
|
||||
RewritePatternSet &patterns, DistributionMapFn distributionMapFn) {
|
||||
RewritePatternSet &patterns, const DistributionMapFn &distributionMapFn) {
|
||||
patterns.add<WarpOpTransferWrite>(patterns.getContext(), distributionMapFn);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue