[flang-commits] [clang] [flang] [llvm] [mlir] Make Ownership of MachineModuleInfo in Its Wrapper Pass External (PR #110443)

Arthur Eubanks via flang-commits flang-commits at lists.llvm.org
Thu Oct 3 15:42:05 PDT 2024


https://github.com/aeubanks commented:

I see that MMI really is a Codegen concept and not a Target concept, so that's why it takes an LLVMTargetMachine instead of TargetMachine. However, the `static_cast`s everywhere are extremely unfortunate. And it doesn't make sense to make the return type of `Target::createTargetMachine()` `LLVMTargetMachine` instead of `TargetMachine`. Perhaps alternatively we make the MMI constructor take `TargetMachine` and cast it inside the constructor to `LLVMTargetMachine`, so we only pay the cost of this weird distinction in one place rather than everywhere? wdyt?

https://github.com/llvm/llvm-project/pull/110443


More information about the flang-commits mailing list