[Mlir-commits] [mlir] [mlir][tosa] Fold 'small' constant 1D concat operations (PR #128080)
Jack Frankland
llvmlistbot at llvm.org
Thu Feb 27 08:01:49 PST 2025
================
@@ -1226,16 +1226,54 @@ OpFoldResult tosa::AbsOp::fold(FoldAdaptor adaptor) {
}
OpFoldResult ConcatOp::fold(FoldAdaptor adaptor) {
+ const auto operands = getOperands();
+ const unsigned int numOperands = getNumOperands();
+
+ // Fold concat when all operands are constant and the output is 'small'
+ auto hasAllConstOperands = [](Value v) {
----------------
FranklandJack wrote:
Can we inline this lambda since it doesn't have any other uses?
https://github.com/llvm/llvm-project/pull/128080
More information about the Mlir-commits
mailing list