<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Jan 17, 2014, at 4:16 PM, Jakob Stoklund Olesen <<a href="mailto:stoklund@2pi.dk">stoklund@2pi.dk</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br>On Jan 17, 2014, at 4:03 PM, Andrew Trick <<a href="mailto:atrick@apple.com">atrick@apple.com</a>> wrote:<br><br><blockquote type="cite"><br>On Jan 17, 2014, at 3:54 PM, Hal Finkel <<a href="mailto:hfinkel@anl.gov">hfinkel@anl.gov</a>> wrote:<br><br><blockquote type="cite">Andy, et al.,<br><br>In ScheduleDAGInstrs::buildSchedGraph, the code for handling stores has this:<br><br> if (!ExitSU.isPred(SU))<br> // Push store's up a bit to avoid them getting in between cmp<br> // and branches.<br> ExitSU.addPred(SDep(SU, SDep::Artificial));<br><br>This code does not seem to be in any way specific to compares; and in any case, at least on the PPC A2, scheduling stores in between the compare and the branch would not be a bad thing (because the core is in order, and the compare has a 2-cycle latency, so if there is nothing else to do, a store would not be a bad thing to put there).<br><br>Can you explain the motivation for this (why or for what it is bad), and what else it might do (aside from the commented cmp/branch pairing)? I'm wondering if we should make this target dependent.<br></blockquote><br>I don’t agree with the existing comment. It’s possible that somewhere, maybe in target specific code, we make use of the extra store->exit edge, but I can’t remember any reason for it now.<br></blockquote><br>Do you have another mechanism for encouraging macro fusion?<br></div></blockquote></div><br><div>The MI scheduler does it now via a proper mechanism. However, for targets that haven’t switched over it could be a minor, temporary issue (the old mechanism shown above didn’t work well anyway).</div><div><br></div><div>For the time being it is probably best to leave it under a target option with a FIXME to avoid perturbing non-PPC/x86 targets.</div><div><br></div><div>-Andy</div></body></html>