[PATCH] D76571: [mlir] Start simple EmitC dialect.
Nathan Zhang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 3 14:39:02 PDT 2020
pyprogrammer added inline comments.
Herald added a subscriber: grosul1.
================
Comment at: mlir/lib/Target/Cpp/TranslateToCpp.cpp:355-366
+ if (auto callOp = dyn_cast<CallOp>(op))
+ return printCallOp(emitter, callOp);
+ if (auto callOp = dyn_cast<emitc::CallOp>(op))
+ return printCallOp(emitter, callOp);
+ if (auto constantOp = dyn_cast<ConstantOp>(op))
+ return printConstantOp(emitter, constantOp);
+ if (auto returnOp = dyn_cast<ReturnOp>(op))
----------------
Seems like a reasonable location to use mlir::TypeSwitch instead of having a long chain of if / typechecks.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76571/new/
https://reviews.llvm.org/D76571
More information about the llvm-commits
mailing list