[flang][driver] Add support for `-mmlir`
The semantics of `-mmlir` are identical to `-mllvm`. The only notable difference is that `-mmlir` options should be forwarded to MLIR rather than LLVM. Note that MLIR llvm::cl options are lazily constructed on demand (see the definition of options in PassManagerOptions.cpp). This means that: * MLIR global options are only visible when explicitly initialised and displayed only when using `-mmlir --help`, * Flang and LLVM global options are always visible and displayed when using either `-mllvm -help` or `-mmlir --help`. In other words, `-mmlir --help` is a superset of `-mllvm --help`. This is not ideal, but we'd need to refactor all option definitions in Flang and LLVM to improve this. I suggesting leaving this for later. Differential Revision: https://reviews.llvm.org/D123297
Loading
Please sign in to comment