Inserting/Creating A New Function at MIR level

Hi all,
I am working on some compiler optimizations, and I was wondering whether it's possible to insert/create new functions at MIR level. I know this kind of thing is possible in LLVM because it has Module level passes, but MIR passes take a Body. If this is possible, I would appreciate any advice in the possible direction, and if not, any advice on any alternatives would be very much appreciated.

Thanks a lot in advance.

1 Like

It's possible you'll have better luck on IRLO.

If you cross-post, include a link to the other post on both forums.

thanks a lot. I'll do just that.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.