[Mlir-commits] [clang] [flang] [llvm] [mlir] Make MMIWP not have ownership over MMI + Remove Move Constructor of MMI + Make MMI Only Use and Externally-Created MCContext (PR #105541)

Matin Raayai llvmlistbot at llvm.org
Thu Aug 22 14:38:01 PDT 2024


matinraayai wrote:

> > The TargetMachine interface functions addPassesToEmitFile and addPassesToEmitMC now require a reference to an MMI; This IMO breaks the abstraction of the TargetMachine, since an MMI requires a LLVMTargetMachine, and if you have a TargetMachine you should do the dreaded casting to LLVMTargetMachine in order to create it. Now I created a factory method for MMIs in the TargetMachine interface to remedy this issue, but I still don't like it since again, it is only implemented for LLVMTargetMachine.
> 
> I don't quite follow what the issue is here, but I'm off until Tuesday so I'll look again next week (I hope)

It's just an abstraction issue; I think it becomes more clear once you read the diffs. 
Enjoy your time off.

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


More information about the Mlir-commits mailing list