[Mlir-commits] [mlir] [mlir][emitC] Add support to emitter for `classop`, `fieldop` and `getfieldop` (PR #145605)
Paul Kirth
llvmlistbot at llvm.org
Wed Jun 25 09:50:15 PDT 2025
================
@@ -997,6 +997,61 @@ static LogicalResult printOperation(CppEmitter &emitter, ModuleOp moduleOp) {
return success();
}
+static LogicalResult printOperation(CppEmitter &emitter, ClassOp classOp) {
+ CppEmitter::Scope classScope(emitter);
+ raw_indented_ostream &os = emitter.ostream();
+ os << "class " << classOp.getSymName() << " final {\n";
----------------
ilovepi wrote:
I think this may be specific to the MLGO use-case. Perhaps that could be something that could be encoded in the `ClassOp`? Then its just a matter of lowering/refining the IR correctly ahead of time, like for other constructs.
https://github.com/llvm/llvm-project/pull/145605
More information about the Mlir-commits
mailing list