<div dir="ltr">Hello,<div><br></div><div>I'm trying to identify which spill/reload instructions save/reload virtual registers that are live across function calls. In other words, if a virtual reg is spilled before a call, reloaded after, and live during the call, I want to remember it.</div><div><br></div><div>I've figured out how to determine if a virtual register has its live range across a call instruction: I use the "checkRegMaskInterference(VirtReg)" method. Then, if storeRegToStackSlot or loadRegFromStackSlot is called while there's regmask interference, I know that a spill/reload instruction was created as well and mark its MCInstrDesc as fitting my criteria.</div><div><br></div><div>The issue I'm facing is that I don't know how to propagate this information from the RegAlloc stage to the end of the codegen pipeline as instructions are frequently created and destroyed, so the instructions and their MCInstrDesc don't survive until the end of "addPreEmitPass2."</div><div><br></div><div>Any thoughts on how to tackle this challenge would be greatly appreciated.</div><div><br></div><div>Thank you.</div><div><br></div><div>Regards,</div><div><br></div><div>Armand Behroozi</div></div>