<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Aug 6, 2009, at 2:59 PM, John Mosby wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div class="gmail_quote">On Thu, Aug 6, 2009 at 2:41 PM, Jakob Stoklund Olesen <span dir="ltr"><<a href="mailto:stoklund@2pi.dk" target="_blank">stoklund@2pi.dk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; position: static; z-index: auto; ">

<div><br></div>The RS can get you a register in two ways:<br>
<br>
1. FindUnusedReg() tries to find a register that is currently not<br>
being used, and so can be used _for free_.<br>
2. scavengeRegister() will create a free register by saving it to the<br>
emergency spill slot.</blockquote><div><br></div><div>Indeed.</div></div></blockquote><div><br></div><div>Thanks John for your work.</div><div><br></div><div>I think we should consider changing the scavenger. I think it's getting a bit too complicated. I don't think it should be the scavenger's responsibility to track what callee save registers have been used or not. The caller should be the one that determines what registers should not be scavenged. That is, this FindUnusedReg</div><div><div>unsigned RegScavenger::FindUnusedReg(const TargetRegisterClass *RegClass,</div><div>                                     bool ExCalleeSaved)</div></div><div><br></div><div>probably ought to be eliminated.</div><div><br></div><blockquote type="cite"><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">FindUnusedReg() must not return a CSR that has not been spilled yet -<br>


it won't be spilled at all if that happens. It will simply be clobbered.</blockquote><div><br></div><div>We're changing PEI to allow it to allocate registers using RS in certain situations. It will use CSRs that are not already used in the function and spill them as necessary.</div>
<div>I'm going to disable part of my last commit until I have finished the changes to PEI.</div></div></blockquote><div><br></div><div>Thanks,</div><div><br></div><div>Evan</div></div><div><br></div><div> </div><div><blockquote type="cite"><div class="gmail_quote"><div><br></div><div>Thanks!</div><div>John</div><div><br></div></div>
_______________________________________________<br>llvm-commits mailing list<br><a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits<br></blockquote></div><br></body></html>