<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:trebuchet ms,sans-serif">Hello <span style="color:rgb(136,136,136);font-family:Arial,Helvetica,sans-serif">Anton Korobeynikov,</span></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif"><span style="color:rgb(136,136,136);font-family:Arial,Helvetica,sans-serif"><br></span></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif"><span style="color:rgb(136,136,136);font-family:Arial,Helvetica,sans-serif">Thanks for the clarification. I can see three invocations of the compiler proper (-cc1) in the above-expanded command line. The first one takes .cc to .ii (preprocessing as usual), the second one takes .ii to .bc, and the third one takes .bc to .s. I assume that OPT APIs are invoked in the second phase and the LLC APIs are invoked in the third phase. Am I right?</span></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif"><span style="color:rgb(136,136,136);font-family:Arial,Helvetica,sans-serif"><br></span></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif"><span style="color:rgb(136,136,136);font-family:Arial,Helvetica,sans-serif">Next, I would like to play around with LLC directly by passing some input .bc file. More specifically I would like to debug LLC using GDB by passing an input .bc file. I did some googling and explored LLVM docs about it. But, I could find nothing helpful. I have an understanding of different phases that an LLVM IR goes through before actually getting converted to target instruction. But, I would like to debug LLC to get a practical hold of it. Could you please help me in this regard? Any links to appropriate documentation also are also fine. </span></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif"><span style="color:rgb(136,136,136);font-family:Arial,Helvetica,sans-serif"><br></span></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif"><span style="color:rgb(136,136,136);font-family:Arial,Helvetica,sans-serif">Thanks,</span></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif"><span style="color:rgb(136,136,136);font-family:Arial,Helvetica,sans-serif">Mahesha</span></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Mar 1, 2019 at 1:55 PM Anton Korobeynikov <<a href="mailto:anton@korobeynikov.info">anton@korobeynikov.info</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">Hello<br>
<br>> Question: When I pass `-v save-temps` options to clang++, I was expecting to see the command line for both `opt` and `llc` in the expanded command line output, but, I don't see it. What am I missing?<br>Nothing. Neither opt nor llc are executed by clang. Both of them are<br>developer-side tools and not intended for "end-user consumption".<br>clang calls LLVM API directly both for optimization and<br>codegeneration.<br>
<br>-- <br>With best regards, Anton Korobeynikov<br>Department of Statistical Modelling, Saint Petersburg State University<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Thanks,</div><div>Mahesha<br></div></div></div></div>