<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Oct 22, 2008, at 11:09 AM, <a href="mailto:Sanjiv.Gupta@microchip.com">Sanjiv.Gupta@microchip.com</a> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"> <div> <!-- Converted from text/plain format --><p><font size="2">In our case, storeRegToStackSlot, loadRegFromStackSlot clobbers some other physical register which may be holding a live value used somewhere else. How do I make regalloc aware so that it saves the value before storeRegToStackSlot and make it available again at the point of earlier use?</font></p></div></blockquote><div><br></div>Typical solution is to either reserve a register for these purposes so the backend does not have to worry about its value being clobbered. A better solution would be to teach these routines to make use of the register scavenger (or rather the callers should use the scavenger and pass the handle to these routines) to find a scratch register. It will require some changes to the target independent portion of codegen though.</div><div><br></div><div>Evan</div><div><blockquote type="cite"><div><p><font size="2"><br> <br> TIA,<br> Sanjiv<br> </font> </p> </div> _______________________________________________<br>LLVM Developers mailing list<br><a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br></blockquote></div><br></body></html>