[Mlir-commits] [mlir] [mlir][emitc] Add 'emitc.switch' op to the dialect (PR #102331)
Andrey Timonin
llvmlistbot at llvm.org
Fri Aug 9 06:50:05 PDT 2024
================
@@ -449,6 +449,49 @@ static LogicalResult printOperation(CppEmitter &emitter, emitc::SubOp subOp) {
return printBinaryOperation(emitter, operation, "-");
}
+static LogicalResult emitAllExceptLast(CppEmitter &emitter,
+ raw_indented_ostream &os,
+ Region ®ion) {
+ for (Region::OpIterator iteratorOp = region.op_begin(), end = region.op_end();
----------------
EtoAndruwa wrote:
> Would drop_end https://github.com/Xilinx/llvm-project/blob/729aef473d0efc175db1fa56e2215c634c991bd6/llvm/include/llvm/ADT/STLExtras.h#L336 work here?
We can refactor this using `drop_end`, but I don't think that the amount of the code will be reduced.
https://github.com/llvm/llvm-project/pull/102331
More information about the Mlir-commits
mailing list