<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 19, 2014 at 5:56 PM, Chandler Carruth <span dir="ltr"><<a href="mailto:chandlerc@google.com" target="_blank">chandlerc@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>
CGP is IR to IR pass and I do prefer write unitary test that check against IR =.</div></blockquote><div><br></div></div><div>We already have a decent number of IR to IR passes in llc. I don't know why CGP is special here. I think all of this is a symptom of the fact that we haven't actually solved the fundamental problems of target-specific IR passes.</div>

<div><br></div><div>If we link lib/CodeGen into the opt tool, we should get rid of llc. It looses all value IMO. Instead, I'm suggesting to give it the actual value it should have had -- the code generator specific testing, including IR-passes that are code generator specific as well as IR -> MI lowering and testing at that layer.</div>
<div class="">
<div></div></div></blockquote></div><br>As it may not have been clear in my prior email, I'm not suggesting that we *stop* testing CGP as an IR-to-IR pass with FileCheck.</div><div class="gmail_extra"><br></div><div class="gmail_extra">
What I'm suggesting is that the hard (but necessary) part of moving CGP to lib/CodeGen is teaching llc to drive IR-to-IR passes sanely for testing them in isolation, just like we've enjoyed with opt since ~forever.</div>
</div>