<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div><br><br>Envoyé de mon iPhone</div><div><br>Le 19 févr. 2014 à 17:57, Chandler Carruth <<a href="mailto:chandlerc@google.com">chandlerc@google.com</a>> a écrit :<br><br></div><blockquote type="cite"><div><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>
</div></blockquote><div>Since, opt is a tool that handle IR to IR transformations, I do not see why the ones that use low level information should not be handled here (maybe with a initializeCodeGenIRToIR).</div><div><br></div><div>I am really not familiar with how llc drives the passes, but it does not seem to me like we were supposed to be able to do: llc -opt1 -opt2 etc.</div><div><br></div><div>I am not saying it would be bad, I am saying that it seems the functionality is already in opt.</div><div><br></div><div>To keep going into that direction, I'd love a tool (opt or other) that would handle IR to IR, IR to MIR (format not defined), and MIR to MIR. My point is making the distinction between code gen-ish passes and transform passes does not make much sense to me.</div><div><br></div><div>Thanks,</div><div>Quentin</div><div><br></div><div><br></div></body></html>