<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Sorry about the late reply. I just got back.<div><br><div><div>On Aug 5, 2011, at 10:40 PM, Chandler Carruth wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div class="gmail_quote">On Mon, Aug 1, 2011 at 3:40 PM, Evan Cheng <span dir="ltr"><<a href="mailto:evan.cheng@apple.com">evan.cheng@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I am not comfortable with a few weeks. Is it not possible to just move TargetRegistry.cpp back to Support?</blockquote></div><br><div>Putting this into Support violates a lot of layering principles. I care a lot about layering and other invariants, thats how we keep building and using LLVM effectively.</div></blockquote><div><br></div>What layering principles? TargetRegistry is for tools to use MC and Target components without needing to know the implementation details. IMO it should be in a component that all LLVM clients need to link in, which is support. If you are concerned about TargetRegistry.h including MC/MCCodeGenInfo.h, we can move those enums to eliminate the dependency.</div><div><br><blockquote type="cite">
<div><br></div><div>Anyways, I understand the need for an expedient solution. I think I have a reasonable compromise -- we could move the registry into MC. The only targets that don't actually need MC are the CBackend and the CppBackend. That seems likely to be the ongoing trend. It would allow MC clients to not pull in any part of Target.</div>
<div><br></div><div>Best of all, that's where the other two pieces of the registry already live: the Reloc and CodeModel classes.</div><div><br></div><div>I'm trying this out now to ensure it actually works, and does in fact shrink llvm-mc back down to size.</div>
</blockquote></div><br></div><div>This is less bad than putting it in Target but I just don't see how TargetRegistry is a MC concept. cc'ing Chris for his input on this.</div><div><br></div><div>Evan</div></body></html>