diff --git a/include/NeuraDialect/NeuraPasses.td b/include/NeuraDialect/NeuraPasses.td index 2623b4be..3d70af2c 100644 --- a/include/NeuraDialect/NeuraPasses.td +++ b/include/NeuraDialect/NeuraPasses.td @@ -81,7 +81,6 @@ def CanonicalizeLiveIn : Pass<"canonicalize-live-in", "ModuleOp"> { This pass applies canonicalization transformations to Neura dialect operations. The canonicalization includes: 1. Converting all live-in values of each basic block to block arguments. - 2. Promoting function arguments to neura constant operations. }]; let constructor = "neura::createCanonicalizeLiveInPass()"; } diff --git a/lib/NeuraDialect/NeuraPasses.cpp b/lib/NeuraDialect/NeuraPasses.cpp index 071b3965..958b3f46 100644 --- a/lib/NeuraDialect/NeuraPasses.cpp +++ b/lib/NeuraDialect/NeuraPasses.cpp @@ -26,6 +26,8 @@ void mlir::neura::registerNeuraConversionPassPipeline() { pm.addPass(mlir::createPrintOpGraphPass(os)); pm.addPass(mlir::neura::createCanonicalizeCastPass()); + pm.addPass(mlir::neura::createPromoteFuncArgToConstPass()); + pm.addPass(mlir::neura::createFoldConstantPass()); pm.addPass(mlir::neura::createCanonicalizeLiveInPass()); pm.addPass(mlir::neura::createLeveragePredicatedValuePass()); pm.addPass(mlir::createPrintOpGraphPass(os)); diff --git a/lib/NeuraDialect/Transforms/CanonicalizeLiveInPass.cpp b/lib/NeuraDialect/Transforms/CanonicalizeLiveInPass.cpp index 663802f1..260d09db 100644 --- a/lib/NeuraDialect/Transforms/CanonicalizeLiveInPass.cpp +++ b/lib/NeuraDialect/Transforms/CanonicalizeLiveInPass.cpp @@ -17,29 +17,6 @@ using namespace mlir; #include "NeuraDialect/NeuraPasses.h.inc" namespace { -LogicalResult promoteFunctionArgsToConstants(Region ®ion) { - if (region.empty()) { - return success(); - } - - Block &entry_block = region.front(); - OpBuilder builder(&entry_block, entry_block.begin()); - - // Collects all function arguments. - SmallVector args(entry_block.getArguments().begin(), - entry_block.getArguments().end()); - - // Creates a constant operation for each function argument. - for (auto [idx, arg] : llvm::enumerate(args)) { - auto const_op = builder.create( - arg.getLoc(), arg.getType(), - builder.getStringAttr("\%arg" + std::to_string(idx))); - arg.replaceAllUsesWith(const_op.getResult()); - } - - return success(); -} - LogicalResult promoteLiveInValuesToBlockArgs(Region ®ion) { if (region.empty()) { return success(); @@ -286,8 +263,8 @@ LogicalResult promoteLiveInValuesToBlockArgs(Region ®ion) { if (needs_update) { OpBuilder builder(cond_br_op); builder.create( - cond_br_op.getLoc(), cond_br_op.getCondition(), - true_operands, false_operands, cond_br_op.getTrueDest(), + cond_br_op.getLoc(), cond_br_op.getCondition(), true_operands, + false_operands, cond_br_op.getTrueDest(), cond_br_op.getFalseDest()); cond_br_op.erase(); } @@ -336,11 +313,6 @@ struct CanonicalizeLiveInPass return; } - if (failed(promoteFunctionArgsToConstants(*region))) { - signalPassFailure(); - return; - } - if (failed(promoteLiveInValuesToBlockArgs(*region))) { signalPassFailure(); return; diff --git a/lib/NeuraDialect/Transforms/Optimizations/HwAgnosticOpt/FoldConstantPass.cpp b/lib/NeuraDialect/Transforms/Optimizations/HwAgnosticOpt/FoldConstantPass.cpp index 93f25a78..1ef6ab9d 100644 --- a/lib/NeuraDialect/Transforms/Optimizations/HwAgnosticOpt/FoldConstantPass.cpp +++ b/lib/NeuraDialect/Transforms/Optimizations/HwAgnosticOpt/FoldConstantPass.cpp @@ -111,7 +111,7 @@ struct FuseRhsConstantPattern : public OpRewritePattern { Value rhs = op.getRhs(); if (isOriginConstantOp(lhs)) { - assert(false && "LHS constant folding not implemented yet."); + llvm::errs() << "LHS constant folding not supported yet.\n"; return failure(); } diff --git a/test/affine2neura/bert/bert_node1/bert_node1.mlir b/test/affine2neura/bert/bert_node1/bert_node1.mlir index 6157dc76..0c3c097b 100644 --- a/test/affine2neura/bert/bert_node1/bert_node1.mlir +++ b/test/affine2neura/bert/bert_node1/bert_node1.mlir @@ -14,6 +14,7 @@ // RUN: --lower-builtin-to-neura \ // RUN: --lower-llvm-to-neura \ // RUN: --canonicalize-cast \ +// RUN: --promote-func-arg-to-const \ // RUN: --canonicalize-live-in \ // RUN: --leverage-predicated-value \ // RUN: --transform-ctrl-to-data-flow \ diff --git a/test/affine2neura/bert/bert_node28/bert_node28.mlir b/test/affine2neura/bert/bert_node28/bert_node28.mlir index 902bc82c..2574d8e1 100644 --- a/test/affine2neura/bert/bert_node28/bert_node28.mlir +++ b/test/affine2neura/bert/bert_node28/bert_node28.mlir @@ -14,6 +14,7 @@ // RUN: --lower-builtin-to-neura \ // RUN: --lower-llvm-to-neura \ // RUN: --canonicalize-cast \ +// RUN: --promote-func-arg-to-const \ // RUN: --canonicalize-live-in \ // RUN: --leverage-predicated-value \ // RUN: --transform-ctrl-to-data-flow \ diff --git a/test/c2llvm2mlir/nested_loop/test.mlir b/test/c2llvm2mlir/nested_loop/test.mlir index 72e11cbe..cedca4e3 100644 --- a/test/c2llvm2mlir/nested_loop/test.mlir +++ b/test/c2llvm2mlir/nested_loop/test.mlir @@ -3,6 +3,7 @@ // RUN: mlir-neura-opt --assign-accelerator \ // RUN: --lower-llvm-to-neura \ +// RUN: --promote-func-arg-to-const \ // RUN: --canonicalize-live-in \ // RUN: --leverage-predicated-value \ // RUN: --transform-ctrl-to-data-flow \ @@ -11,6 +12,7 @@ // RUN: mlir-neura-opt --assign-accelerator \ // RUN: --lower-llvm-to-neura \ +// RUN: --promote-func-arg-to-const \ // RUN: --canonicalize-live-in \ // RUN: --leverage-predicated-value \ // RUN: --transform-ctrl-to-data-flow \ diff --git a/test/controflow_fuse/complex_nested/complex_nested.mlir b/test/controflow_fuse/complex_nested/complex_nested.mlir index a3c0c1a5..7d983ea6 100644 --- a/test/controflow_fuse/complex_nested/complex_nested.mlir +++ b/test/controflow_fuse/complex_nested/complex_nested.mlir @@ -14,6 +14,7 @@ // RUN: --lower-builtin-to-neura \ // RUN: --lower-llvm-to-neura \ // RUN: --canonicalize-cast \ +// RUN: --promote-func-arg-to-const \ // RUN: --canonicalize-live-in \ // RUN: --leverage-predicated-value \ // RUN: --transform-ctrl-to-data-flow \ diff --git a/test/controflow_fuse/non_perfect_nested/non_perfect_nested.mlir b/test/controflow_fuse/non_perfect_nested/non_perfect_nested.mlir index 418002dd..d8ddb8f4 100644 --- a/test/controflow_fuse/non_perfect_nested/non_perfect_nested.mlir +++ b/test/controflow_fuse/non_perfect_nested/non_perfect_nested.mlir @@ -14,6 +14,7 @@ // RUN: --lower-builtin-to-neura \ // RUN: --lower-llvm-to-neura \ // RUN: --canonicalize-cast \ +// RUN: --promote-func-arg-to-const \ // RUN: --canonicalize-live-in \ // RUN: --leverage-predicated-value \ // RUN: --transform-ctrl-to-data-flow \ diff --git a/test/controflow_fuse/perfect_nested/perfect_nested.mlir b/test/controflow_fuse/perfect_nested/perfect_nested.mlir index 5f5d228b..93cb29ac 100644 --- a/test/controflow_fuse/perfect_nested/perfect_nested.mlir +++ b/test/controflow_fuse/perfect_nested/perfect_nested.mlir @@ -23,6 +23,7 @@ // RUN: --lower-builtin-to-neura \ // RUN: --lower-llvm-to-neura \ // RUN: --canonicalize-cast \ +// RUN: --promote-func-arg-to-const \ // RUN: --canonicalize-live-in \ // RUN: --leverage-predicated-value \ // RUN: --transform-ctrl-to-data-flow \ @@ -35,6 +36,7 @@ // RUN: --lower-builtin-to-neura \ // RUN: --lower-llvm-to-neura \ // RUN: --canonicalize-cast \ +// RUN: --promote-func-arg-to-const \ // RUN: --fold-constant \ // RUN: --canonicalize-live-in \ // RUN: --leverage-predicated-value \ diff --git a/test/controflow_fuse/perfect_reduction/perfect_reduction.mlir b/test/controflow_fuse/perfect_reduction/perfect_reduction.mlir index cbc554bc..16bdbec5 100644 --- a/test/controflow_fuse/perfect_reduction/perfect_reduction.mlir +++ b/test/controflow_fuse/perfect_reduction/perfect_reduction.mlir @@ -24,6 +24,7 @@ // RUN: --lower-builtin-to-neura \ // RUN: --lower-llvm-to-neura \ // RUN: --canonicalize-cast \ +// RUN: --promote-func-arg-to-const \ // RUN: --canonicalize-live-in \ // RUN: --leverage-predicated-value \ // RUN: --transform-ctrl-to-data-flow \ diff --git a/test/controflow_fuse/simple_loop/simple_loop.mlir b/test/controflow_fuse/simple_loop/simple_loop.mlir index f6099e32..a136f9a7 100644 --- a/test/controflow_fuse/simple_loop/simple_loop.mlir +++ b/test/controflow_fuse/simple_loop/simple_loop.mlir @@ -18,6 +18,7 @@ // RUN: --lower-builtin-to-neura \ // RUN: --lower-llvm-to-neura \ // RUN: --canonicalize-cast \ +// RUN: --promote-func-arg-to-const \ // RUN: --canonicalize-live-in | FileCheck %s --check-prefix=CANONICALIZE // RUN: mlir-neura-opt %t-llvm.mlir \ @@ -27,6 +28,7 @@ // RUN: --lower-builtin-to-neura \ // RUN: --lower-llvm-to-neura \ // RUN: --canonicalize-cast \ +// RUN: --promote-func-arg-to-const \ // RUN: --canonicalize-live-in \ // RUN: --leverage-predicated-value \ // RUN: --transform-ctrl-to-data-flow | FileCheck %s -check-prefix=CTRL2DATA @@ -38,6 +40,7 @@ // RUN: --lower-builtin-to-neura \ // RUN: --lower-llvm-to-neura \ // RUN: --canonicalize-cast \ +// RUN: --promote-func-arg-to-const \ // RUN: --fold-constant \ // RUN: --canonicalize-live-in \ // RUN: --leverage-predicated-value \ @@ -54,6 +57,7 @@ // RUN: --lower-builtin-to-neura \ // RUN: --lower-llvm-to-neura \ // RUN: --canonicalize-cast \ +// RUN: --promote-func-arg-to-const \ // RUN: --fold-constant \ // RUN: --canonicalize-live-in \ // RUN: --leverage-predicated-value \ diff --git a/test/controflow_fuse/simple_loop_reduction/simple_loop_reduction.mlir b/test/controflow_fuse/simple_loop_reduction/simple_loop_reduction.mlir index ea074696..1222ee97 100644 --- a/test/controflow_fuse/simple_loop_reduction/simple_loop_reduction.mlir +++ b/test/controflow_fuse/simple_loop_reduction/simple_loop_reduction.mlir @@ -18,6 +18,7 @@ // RUN: --lower-builtin-to-neura \ // RUN: --lower-llvm-to-neura \ // RUN: --canonicalize-cast \ +// RUN: --promote-func-arg-to-const \ // RUN: --canonicalize-live-in \ // RUN: | FileCheck %s --check-prefix=CANONICALIZE @@ -28,6 +29,7 @@ // RUN: --lower-builtin-to-neura \ // RUN: --lower-llvm-to-neura \ // RUN: --canonicalize-cast \ +// RUN: --promote-func-arg-to-const \ // RUN: --canonicalize-live-in \ // RUN: --leverage-predicated-value \ // RUN: --transform-ctrl-to-data-flow | FileCheck %s -check-prefix=CTRL2DATA @@ -39,6 +41,7 @@ // RUN: --lower-builtin-to-neura \ // RUN: --lower-llvm-to-neura \ // RUN: --canonicalize-cast \ +// RUN: --promote-func-arg-to-const \ // RUN: --fold-constant \ // RUN: --canonicalize-live-in \ // RUN: --leverage-predicated-value \ @@ -55,6 +58,7 @@ // RUN: --lower-builtin-to-neura \ // RUN: --lower-llvm-to-neura \ // RUN: --canonicalize-cast \ +// RUN: --promote-func-arg-to-const \ // RUN: --fold-constant \ // RUN: --canonicalize-live-in \ // RUN: --leverage-predicated-value \ diff --git a/test/neura/ctrl/branch.mlir b/test/neura/ctrl/branch.mlir index 33e0889d..d5634f03 100644 --- a/test/neura/ctrl/branch.mlir +++ b/test/neura/ctrl/branch.mlir @@ -1,6 +1,7 @@ // RUN: mlir-neura-opt %s \ // RUN: --assign-accelerator \ // RUN: --lower-llvm-to-neura \ +// RUN: --promote-func-arg-to-const \ // RUN: --canonicalize-live-in \ // RUN: --leverage-predicated-value \ // RUN: | FileCheck %s @@ -8,6 +9,7 @@ // RUN: mlir-neura-opt %s \ // RUN: --assign-accelerator \ // RUN: --lower-llvm-to-neura \ +// RUN: --promote-func-arg-to-const \ // RUN: --canonicalize-live-in \ // RUN: --leverage-predicated-value \ // RUN: --transform-ctrl-to-data-flow \ diff --git a/test/neura/ctrl/branch_for.mlir b/test/neura/ctrl/branch_for.mlir index a772575f..958777f8 100644 --- a/test/neura/ctrl/branch_for.mlir +++ b/test/neura/ctrl/branch_for.mlir @@ -7,6 +7,7 @@ // RUN: mlir-neura-opt %s \ // RUN: --assign-accelerator \ // RUN: --lower-llvm-to-neura \ +// RUN: --promote-func-arg-to-const \ // RUN: --fold-constant \ // RUN: --canonicalize-live-in \ // RUN: | FileCheck %s -check-prefix=CANONICALIZE @@ -14,6 +15,7 @@ // RUN: mlir-neura-opt %s \ // RUN: --assign-accelerator \ // RUN: --lower-llvm-to-neura \ +// RUN: --promote-func-arg-to-const \ // RUN: --fold-constant \ // RUN: --canonicalize-live-in \ // RUN: --leverage-predicated-value \ @@ -23,6 +25,7 @@ // RUN: mlir-neura-opt %s \ // RUN: --assign-accelerator \ // RUN: --lower-llvm-to-neura \ +// RUN: --promote-func-arg-to-const \ // RUN: --fold-constant \ // RUN: --canonicalize-live-in \ // RUN: --leverage-predicated-value \ @@ -33,6 +36,7 @@ // RUN: mlir-neura-opt %s \ // RUN: --assign-accelerator \ // RUN: --lower-llvm-to-neura \ +// RUN: --promote-func-arg-to-const \ // RUN: --fold-constant \ // RUN: --canonicalize-live-in \ // RUN: --leverage-predicated-value \ @@ -44,6 +48,7 @@ // RUN: mlir-neura-opt %s \ // RUN: --assign-accelerator \ // RUN: --lower-llvm-to-neura \ +// RUN: --promote-func-arg-to-const \ // RUN: --fold-constant \ // RUN: --canonicalize-live-in \ // RUN: --leverage-predicated-value \ @@ -57,6 +62,7 @@ // RUN: mlir-neura-opt %s \ // RUN: --assign-accelerator \ // RUN: --lower-llvm-to-neura \ +// RUN: --promote-func-arg-to-const \ // RUN: --fold-constant \ // RUN: --canonicalize-live-in \ // RUN: --leverage-predicated-value \ diff --git a/test/neura/ctrl/branch_with_and_without_arg.mlir b/test/neura/ctrl/branch_with_and_without_arg.mlir index 39c94c1d..4cee357e 100644 --- a/test/neura/ctrl/branch_with_and_without_arg.mlir +++ b/test/neura/ctrl/branch_with_and_without_arg.mlir @@ -1,6 +1,7 @@ // RUN: mlir-neura-opt %s \ // RUN: --assign-accelerator \ // RUN: --lower-llvm-to-neura \ +// RUN: --promote-func-arg-to-const \ // RUN: --canonicalize-live-in \ // RUN: --leverage-predicated-value \ // RUN: | FileCheck %s @@ -8,6 +9,7 @@ // RUN: mlir-neura-opt %s \ // RUN: --assign-accelerator \ // RUN: --lower-llvm-to-neura \ +// RUN: --promote-func-arg-to-const \ // RUN: --canonicalize-live-in \ // RUN: --leverage-predicated-value \ // RUN: --transform-ctrl-to-data-flow \ diff --git a/test/neura/ctrl/branch_without_arg.mlir b/test/neura/ctrl/branch_without_arg.mlir index c4854d4c..a94c826a 100644 --- a/test/neura/ctrl/branch_without_arg.mlir +++ b/test/neura/ctrl/branch_without_arg.mlir @@ -1,6 +1,7 @@ // RUN: mlir-neura-opt %s \ // RUN: --assign-accelerator \ // RUN: --lower-llvm-to-neura \ +// RUN: --promote-func-arg-to-const \ // RUN: --canonicalize-live-in \ // RUN: --leverage-predicated-value \ // RUN: | FileCheck %s @@ -8,6 +9,7 @@ // RUN: mlir-neura-opt %s \ // RUN: --assign-accelerator \ // RUN: --lower-llvm-to-neura \ +// RUN: --promote-func-arg-to-const \ // RUN: --canonicalize-live-in \ // RUN: --leverage-predicated-value \ // RUN: --transform-ctrl-to-data-flow \ diff --git a/test/neura/ctrl/for_with_if.mlir b/test/neura/ctrl/for_with_if.mlir index 4fc5c2a4..699ecf04 100644 --- a/test/neura/ctrl/for_with_if.mlir +++ b/test/neura/ctrl/for_with_if.mlir @@ -18,6 +18,7 @@ // RUN: --lower-builtin-to-neura \ // RUN: --lower-llvm-to-neura \ // RUN: --canonicalize-cast \ +// RUN: --promote-func-arg-to-const \ // RUN: --canonicalize-live-in \ // RUN: --leverage-predicated-value \ // RUN: --transform-ctrl-to-data-flow | FileCheck %s -check-prefix=CTRL2DATA diff --git a/test/neura/ctrl/nested_branch.mlir b/test/neura/ctrl/nested_branch.mlir index 9c1cfcae..2ed967b1 100644 --- a/test/neura/ctrl/nested_branch.mlir +++ b/test/neura/ctrl/nested_branch.mlir @@ -1,6 +1,7 @@ // RUN: mlir-neura-opt %s \ // RUN: --assign-accelerator \ // RUN: --lower-llvm-to-neura \ +// RUN: --promote-func-arg-to-const \ // RUN: --canonicalize-live-in \ // RUN: --leverage-predicated-value \ // RUN: | FileCheck %s @@ -8,6 +9,7 @@ // RUN: mlir-neura-opt %s \ // RUN: --assign-accelerator \ // RUN: --lower-llvm-to-neura \ +// RUN: --promote-func-arg-to-const \ // RUN: --canonicalize-live-in \ // RUN: --leverage-predicated-value \ // RUN: --transform-ctrl-to-data-flow \ diff --git a/test/neura/for_loop/kernel_test.mlir b/test/neura/for_loop/kernel_test.mlir index 5190b5cb..0c443ea1 100644 --- a/test/neura/for_loop/kernel_test.mlir +++ b/test/neura/for_loop/kernel_test.mlir @@ -7,6 +7,7 @@ // RUN: mlir-neura-opt %t-kernel.mlir\ // RUN: --assign-accelerator \ // RUN: --lower-llvm-to-neura \ +// RUN: --promote-func-arg-to-const \ // RUN: --canonicalize-live-in \ // RUN: --leverage-predicated-value \ // RUN: | FileCheck %s @@ -14,6 +15,7 @@ // RUN: mlir-neura-opt %t-kernel.mlir\ // RUN: --assign-accelerator \ // RUN: --lower-llvm-to-neura \ +// RUN: --promote-func-arg-to-const \ // RUN: --canonicalize-live-in \ // RUN: --leverage-predicated-value \ // RUN: --transform-ctrl-to-data-flow \ @@ -24,6 +26,7 @@ // RUN: mlir-neura-opt %t-kernel.mlir\ // RUN: --assign-accelerator \ // RUN: --lower-llvm-to-neura \ +// RUN: --promote-func-arg-to-const \ // RUN: --canonicalize-live-in \ // RUN: --leverage-predicated-value \ // RUN: --transform-ctrl-to-data-flow \ diff --git a/test/neura/for_loop/relu_test.mlir b/test/neura/for_loop/relu_test.mlir index 2331ab45..43a01992 100644 --- a/test/neura/for_loop/relu_test.mlir +++ b/test/neura/for_loop/relu_test.mlir @@ -5,12 +5,14 @@ // RUN: mlir-neura-opt %t-relu.mlir\ // RUN: --assign-accelerator \ // RUN: --lower-llvm-to-neura \ +// RUN: --promote-func-arg-to-const \ // RUN: --canonicalize-live-in \ // RUN: | FileCheck %s // RUN: mlir-neura-opt %t-relu.mlir\ // RUN: --assign-accelerator \ // RUN: --lower-llvm-to-neura \ +// RUN: --promote-func-arg-to-const \ // RUN: --canonicalize-live-in \ // RUN: --leverage-predicated-value \ // RUN: --transform-ctrl-to-data-flow \ diff --git a/test/neura/fusion/test.mlir b/test/neura/fusion/test.mlir index a603445d..9414f64e 100644 --- a/test/neura/fusion/test.mlir +++ b/test/neura/fusion/test.mlir @@ -2,6 +2,7 @@ # RUN: mlir-translate --import-llvm %t-kernel.ll -o %t-kernel.mlir # RUN: mlir-neura-opt --architecture-spec=%S/../../arch_spec/architecture.yaml --assign-accelerator \ # RUN: --lower-llvm-to-neura \ +# RUN: --promote-func-arg-to-const \ # RUN: --canonicalize-live-in \ # RUN: --leverage-predicated-value \ # RUN: --fold-constant \ @@ -13,6 +14,7 @@ # RUN: mlir-neura-opt --architecture-spec=%S/../../arch_spec/architecture.yaml --assign-accelerator \ # RUN: --lower-llvm-to-neura \ +# RUN: --promote-func-arg-to-const \ # RUN: --canonicalize-live-in \ # RUN: --leverage-predicated-value \ # RUN: --fold-constant \ diff --git a/test/neura/steer_ctrl/for_with_if.mlir b/test/neura/steer_ctrl/for_with_if.mlir index 7085e1aa..6fc68701 100644 --- a/test/neura/steer_ctrl/for_with_if.mlir +++ b/test/neura/steer_ctrl/for_with_if.mlir @@ -6,6 +6,7 @@ // RUN: --lower-builtin-to-neura \ // RUN: --lower-llvm-to-neura \ // RUN: --canonicalize-cast \ +// RUN: --promote-func-arg-to-const \ // RUN: --canonicalize-live-in \ // RUN: --leverage-predicated-value \ // RUN: --transform-ctrl-to-data-flow \ diff --git a/test/neura/steer_ctrl/loop_with_return_value.mlir b/test/neura/steer_ctrl/loop_with_return_value.mlir index f191a43b..dd034790 100644 --- a/test/neura/steer_ctrl/loop_with_return_value.mlir +++ b/test/neura/steer_ctrl/loop_with_return_value.mlir @@ -6,6 +6,7 @@ // RUN: --lower-builtin-to-neura \ // RUN: --lower-llvm-to-neura \ // RUN: --canonicalize-cast \ +// RUN: --promote-func-arg-to-const \ // RUN: --canonicalize-live-in \ // RUN: --leverage-predicated-value \ // RUN: --transform-ctrl-to-data-flow \ @@ -20,6 +21,7 @@ // RUN: --lower-builtin-to-neura \ // RUN: --lower-llvm-to-neura \ // RUN: --canonicalize-cast \ +// RUN: --promote-func-arg-to-const \ // RUN: --canonicalize-live-in \ // RUN: --leverage-predicated-value \ // RUN: --transform-ctrl-to-data-flow \ diff --git a/test/neura/steer_ctrl/loop_without_return_value.mlir b/test/neura/steer_ctrl/loop_without_return_value.mlir index d21a18d7..b20ceb53 100644 --- a/test/neura/steer_ctrl/loop_without_return_value.mlir +++ b/test/neura/steer_ctrl/loop_without_return_value.mlir @@ -6,6 +6,7 @@ // RUN: --lower-builtin-to-neura \ // RUN: --lower-llvm-to-neura \ // RUN: --canonicalize-cast \ +// RUN: --promote-func-arg-to-const \ // RUN: --canonicalize-live-in \ // RUN: --leverage-predicated-value \ // RUN: --transform-ctrl-to-data-flow \