<div dir="ltr"><div class="gmail_default" style="font-family:monospace;font-size:small;color:#000000">I think what Rong means is that </div><div class="gmail_default" style="font-family:monospace;font-size:small;color:#000000">1) moving code to a header is for code sharing between IR and codeGenPass</div><div class="gmail_default" style="font-family:monospace;font-size:small;color:#000000">2) Wei's idea of avoiding the header move can lead to circular dependencies.</div><div class="gmail_default" style="font-family:monospace;font-size:small;color:#000000"><br></div><div class="gmail_default" style="font-family:monospace;font-size:small;color:#000000">In other words, doing 1) is not to achieve circular dependency avoidance, but just using 2) as an alternative way is not working.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Feb 6, 2021 at 2:13 PM David Blaikie via Phabricator <<a href="mailto:reviews@reviews.llvm.org">reviews@reviews.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">dblaikie added a comment.<br>
<br>
(sorry if this comment is off-base, I haven't quite understood/followed the reviews, but some of the discussion here seems potentially problematic, so I'll say this... )<br>
<br>
If code is being moved into a header to avoid layering/circular dependency violations, that's not OK. Since the layering violation would still exist (from a software design perspective, though not one a linker would diagnose/trip over). Google's build system, for instance, does enforce header layering & we use/support that to avoid creating header-only dependencies.<br>
<br>
Another way of thinking about it: We shouldn't create a situation where it's non-trivial to move code between headers and implementation files. That should always be simple/trivial to do.<br>
<br>
<br>
CHANGES SINCE LAST ACTION<br>
  <a href="https://reviews.llvm.org/D95832/new/" rel="noreferrer" target="_blank">https://reviews.llvm.org/D95832/new/</a><br>
<br>
<a href="https://reviews.llvm.org/D95832" rel="noreferrer" target="_blank">https://reviews.llvm.org/D95832</a><br>
<br>
</blockquote></div>