Add EmitC dialect that has trivial mapping to C++. This dialect does not attempt
to model C++ semantics but just syntax to make it easy to translate out (e.g., it
attempts to make emitting simple textual code simpler). EmitC is used to add
simple C++ target that can currently only emit functions and function calls as
C++ code. This is useful for cases where you have a C++ compiler but no
access to the codegen (e.g., for using MLIR optimizations along with legacy or
proprietary systems) and for prototyping/debugging (e.g., found this useful to
play with shape functions). The emitter mostly defers to EmitC ops with the
exception of supporting FuncOp, some standard attributes and lowers
multi-result functions/ops are lowered using std::tuple.
Only test to verify emit happens, not that emitted code can be compiled, will
follow up with an integration test.
Previous discussions:
https://groups.google.com/a/tensorflow.org/d/msg/mlir/iOAB10Us6uo/wJ_pVQ_qBwAJ
https://llvm.discourse.group/t/simple-c-emitter-rev/773/4
StringRef