<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 May 14, 2013, at 9:27 AM, Krzysztof Parzyszek <<a href="mailto:kparzysz@codeaurora.org">kparzysz@codeaurora.org</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="letter-spacing: 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;">On 5/13/2013 7:58 PM, Andrew Trick wrote:<br><blockquote type="cite"><br>An even quicker hack is for a Hexagon-specific postRA pass to remove<br>the imp-def/use operands in certain cases. Mostly what will break is<br>verification, which you could disable. There may be some danger if<br>you're using the RegScavenger code. I would consult with Jakob before<br>actually relying on that.<br></blockquote><br>Well, this was actually a part of the problem.  We do use register scavenger, and it would complain in cases like<br> R0 = ...<br> R1 = ...<br> ... = D0<br>The pass was meant to handle the problem and not break the scavenger.<br></div></blockquote><div><br></div><div>Eventually we might be able to make the scavenger work, conservatively, without implicit def/use operands by tracking register units instead of register names.</div><br><blockquote type="cite"><div style="letter-spacing: 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;"><blockquote type="cite">Your current approach misinterprets the meaning of "undef", which is<br>unsafe to expose to other targets. Undefs can't generally be ignored,<br>it just conveniently disables verification.<br></blockquote><br>I considered various options before I resorted to this, but none of them would work.  There is no way in LLVM to say "consider D0 defined at this point" without making this declaration a definition.  Ideally (for us), we would have something like:<br> R0 = ...<br> R1 = ...<br> CONSIDER_DEFINED D0  // An informational directive, not a def.<br> ... = D0<br><br>There was nothing like that available.  For us "undef" doesn't really matter, so I hijacked it for our purposes.  I never meant for it to be affecting anyone else but Hexagon.  I had to change the DAG building, but the changes only take effect when a flag is set, which only happens on Hexagon.<br></div></blockquote></div><br><div>I completely understand. The point is, this isn’t something we want on trunk if it can be avoided. I won’t complain about any workaround you want to add in Target/Hexagon, and if you really need a hook into ScheduleInstrs that can be arranged. However, we run into this situation a lot, and the first tactic should be for the target to postprocess the DAG so we aren’t embedding target-specific workarounds in the generic DAG builder.</div><div><br></div><div>-Andy</div></body></html>