<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Aug 15, 2012, at 10:07 AM, Sergei Larin <<a href="mailto:slarin@codeaurora.org">slarin@codeaurora.org</a>> wrote:</div><blockquote type="cite"><br style="font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span style="font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; display: inline !important; float: none; "> Are there any examples/documentation on implementing the reg pressure</span><br style="font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span style="font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; display: inline !important; float: none; ">hooks for a back end?</span></blockquote></div><br><div>Sergei,</div><div><br></div><div>The MachineScheduler currently implements register pressure "back-off". It simply prioritizes instructions that don't increase pressure beyond some limit. I can think of a few more sophisticated ways to control pressure but haven't determined yet if they're worth implementing.</div><div><br></div><div>Even though back-off is a simple mechanism, the policy can become complicated by how the pressure limit is determined. The current (experimental) policy is implemented in MachineScheduler.cpp compareRPDelta(). The pressure tracker will give you a pressure "delta" between it's current position and some given instruction to-be-scheduled. The delta has three components. You can probably just choose one that makes the most sense for you.</div><div><br></div><div>You may also decide whether you care about all "pressure sets" derived from your target description, or you can pick a particular register class that interests you and find the maximal pressure set affected by that class.</div><div><br></div><div>The best documentation we have so far are the comments in RegisterPressure.h.  I expect this design to change considerably as we tune performance. I can give you more detailed answers once you have specific questions.</div><div><br></div><div>-Andy </div></body></html>