[PATCH] D143758: [CodeGen] MRI call back in TargetMachine

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 12 13:27:24 PDT 2023


arsenm added a comment.

In D143758#4242979 <https://reviews.llvm.org/D143758#4242979>, @qcolombet wrote:

> Sorry for the delay I don't have an answer, but I have a couple of questions:
>
> 1. Would it work to attach the delegate in `MachineFunction::initTargetMachineFunctionInfo`?

Probably

> 2. Do we want to support `MachineFunction/Info` cloning?

This has to work and needs to be serializable.

> For #1 I guess it depends whether or not we want to offer a more general hook point than just `MachineFunctionInfo`.
> I am guessing we want to support #2, and #1 doesn't work for that and neither is the current patch. We probably want to add a call to this hook during `::clone`.
>
> Anyhow, I am willing to go with the current patch if we add an actual use case in this patch. I'd like that we have an example that goes in at the same time as we introduce `registerMachineRegisterCallback`.

I strongly think this should be kept separate. The actual use patch is much larger and conceptually detached.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D143758/new/

https://reviews.llvm.org/D143758



More information about the llvm-commits mailing list