<div dir="auto"><div>Hi Kristof and Daniel,</div><div dir="auto"><br></div><div dir="auto">Thank you for your help. This is exactly what I was looking for. :)<br><br><div data-smartmail="gmail_signature" dir="auto"><br><br>Best Regards,<br><br>Kumail Ahmed<br><br></div><div class="gmail_extra" dir="auto"><br><div class="gmail_quote">On 20 Feb 2017 5:38 p.m., "Daniel Sanders" <<a href="mailto:daniel_l_sanders@apple.com">daniel_l_sanders@apple.com</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
There's also -print-machineinstrs which prints the MIR between each backend pass.<br>
<div class="quoted-text"><br>
> I'm not aware of a clang option to dump out IR between specific passes.<br>
<br>
</div>You can pass options to the backend using -mllvm followed by the backend option. For example:<br>
   clang -S hello.cpp -mllvm -print-after-all<br>
<div class="elided-text"><br>
> On 20 Feb 2017, at 15:00, Kristof Beyls via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br>
><br>
> Hi Kumail,<br>
><br>
> I'm not aware of a clang option to dump out IR between specific passes.<br>
> I think the one way to do it is to let clang generate llvm-ir, and feed that into llc, and let llc print out the IR after the pass you're interested in, e.g.:<br>
> clang t.c -o- -S  -emit-llvm | llc -global-isel -print-after=irtranslator<br>
><br>
> If you want to see how the IR evolves after each pass, you can use the llc command line option -print-after-all.<br>
><br>
> Is this what you were looking for?<br>
><br>
> Thanks,<br>
><br>
> Kristof<br>
><br>
><br>
>> On 20 Feb 2017, at 15:14, Kumail Ahmed via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br>
>><br>
>><br>
>> Hello,<br>
>><br>
>> I just started using the GlobalISel framework.<br>
>><br>
>> Is there a way to emit all intermediate invariants from IRTranslator to Instrution-Selection in a single instruction? It will be really handy. I mean something like '-save-temps' in clang.<br>
>><br>
>> Best regards,<br>
>> Kumail Ahmed<br>
>><br>
>><br>
>> ______________________________<wbr>_________________<br>
>> LLVM Developers mailing list<br>
>> <a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
>> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
><br>
> ______________________________<wbr>_________________<br>
> LLVM Developers mailing list<br>
> <a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
<br>
</div></blockquote></div><br></div></div></div>