mirror of
https://github.com/intel/llvm.git
synced 2026-01-29 21:26:59 +08:00
Currently, MlirTranslateMain only executes one of the requested translations, and does not error if multiple are specified. This commit enables translations to be chained in the specified order. This makes round-trip tests easier, since existing import/export passes can be reused and no combined round-trip passes have to be registered (example: mlir-translate -serialize-spirv -deserialize-spirv). Additionally, by leveraging TranslateRegistration with file-to-file TranslateFunctions, generic pre- and post-processing can be added before/after conversion to/from MLIR. Reviewed By: lattner, Mogball Differential Revision: https://reviews.llvm.org/D143719