[flang-commits] [clang] [flang] [llvm] [mlir] Make MMIWP not have ownership over MMI + Make MMI Only Use an External MCContext (PR #105541)

Matt Arsenault via flang-commits flang-commits at lists.llvm.org
Fri Sep 20 05:19:24 PDT 2024


arsenm wrote:

> @aeubanks It's not impossible to separate them completely. `MCContext` is needed during initialization and finalization of the `MachineModuleInfoWrapperPass` (and its new pass manager variant) to set the diagnostics handler.
> 
> In theory, you can just pass the context to the wrapper pass instead. @arsenm any thoughts on this?

The MachineModuleInfo is the container for all the MachineFunctions (which do hold a reference to the MCContext), so it kind of makes sense to keep it there. But it does look like it should be simple to remove the reference here. So I would say it's better to just remove it

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


More information about the flang-commits mailing list