[llvm-dev] Supporting external MCContext in MMI

Hendrik Greving via llvm-dev llvm-dev at lists.llvm.org
Wed Nov 11 18:10:39 PST 2020


Hi we have something like an external driver that likes to own MCInst data
externally, i.e. outside from LLVM. By default, the
MachineModuleInfo/WrapperPass creates its own context in the constructor
of MachineModuleInfo. MMI's context is used throughout codegen. When using
a MCStreamer with an external context one can achieve almost what we want,
because the streamer's context is used to create MCInst, but not all data
will be owned by the streamer's context. For example symbols are still
owned by MMI's context.

I'm suggesting to do something like https://reviews.llvm.org/D91313
providing the ability to make MMI use an external context. Would this be
something that somebody would review and ok?

Thanks in advance, Hendrik.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20201111/c1c42bad/attachment.html>


More information about the llvm-dev mailing list