Hello everyone,
is there a way to alter global variables in an MachineFunctionPass?
I know that I can’t add or remove GlobalVariables and that I am not allowed to change the IR representation of those variables but is there any representation in a MachineFunctionPass I could alter?
What I am trying to do is to collect all callsites of certain functions and store them in an array of structs in a specifically named section, so that a runtime library can later find and patch these callsites.
The issue is that I need to exactly label the corresponding assembly call instruction and therefore need to do it as a MachineFunctionPass. I then emit an MCSymbol before the call instructions but how do I get a reference to those labels into my array?
Thank you in advance!