<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">I suspect you cannot :-/<div class=""><br class=""></div><div class="">As far as I understand the code, you would need to put a FunctionPassPrinter into the pass pipeline, and I right now I don't see any code in llc that would do that. Maybe we should just remove LiveIntervals::print() given that nobody can use it (or someone could implement an -analyze for llc).</div><div class=""><br class=""></div><div class="">In practice this works for me to inspect live intervals (but technically it isn't using LiveIntervals::print):</div><div class=""><br class=""></div><div class="">$ llc -debug-only=regalloc -run-pass=liveintervals test.mir</div><div class=""><br class=""></div><div class="">- Matthias<br class=""><div class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Nov 7, 2018, at 2:12 AM, Samolisov Pavel via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class="">Hello everyone.<div class=""><br class=""></div><div class="">I'm looking for a way how to invoke the '<span style="font-family: "Courier New";" class="">print(</span><span style="font-family:"Courier New";color:rgb(0,128,128)" class="">raw_ostream </span><span style="font-family: "Courier New";" class="">&OS, </span><span style="font-family:"Courier New";color:rgb(0,0,128);font-weight:bold" class="">const </span><span style="font-family:"Courier New";color:rgb(0,128,128)" class="">Module</span><span style="font-family: "Courier New";" class="">*)</span>' method in MachineFunctionPass. If we have a 'usual' pass, which can be used by the 'opt' tool, we can just pass the '-analyze' command line argument but what about the 'llc' compiler?</div><div class=""><br class=""></div><div class="">As I can see, there is an implementation of the '<span style="font-family: "Courier New";" class="">print(</span><span style="font-family:"Courier New";color:rgb(0,128,128)" class="">raw_ostream </span><span style="font-family: "Courier New";" class="">&OS, </span><span style="font-family:"Courier New";color:rgb(0,0,128);font-weight:bold" class="">const </span><span style="font-family:"Courier New";color:rgb(0,128,128)" class="">Module</span><span style="font-family: "Courier New";" class="">*)</span>' method in the 'LiveIntervals.cpp'. </div><div class=""><pre style="font-family: "Courier New";" class=""><span style="color:rgb(0,0,128);font-weight:bold" class="">void </span><span style="color:rgb(0,128,128)" class="">LiveIntervals</span>::print(<span style="color:rgb(0,128,128)" class="">raw_ostream </span>&OS, <span style="color:rgb(0,0,128);font-weight:bold" class="">const </span><span style="color:rgb(0,128,128)" class="">Module</span>* ) <span style="color:rgb(0,0,128);font-weight:bold" class="">const </span>{<br class="">  OS <span style="color:rgb(0,128,128)" class=""><< </span><span style="color:rgb(0,128,0);font-weight:bold" class="">"********** INTERVALS **********</span><span style="color:rgb(0,0,128);font-weight:bold" class="">\n</span><span style="color:rgb(0,128,0);font-weight:bold" class="">"</span>;<br class=""><br class="">  <span style="color:rgb(128,128,128);font-style:italic" class="">// Dump the regunits.<br class=""></span></pre><pre style="font-family: "Courier New";" class=""><span style="color:rgb(128,128,128);font-style:italic" class="">...</span></pre><pre style="font-family: "Courier New";" class=""><span style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;white-space:normal" class="">The method also is implemented in 'RegisterCoalescer.cpp' (in fact, this method just invokes one from LiveIntervals).</span></pre><pre style="" class=""><font face="Arial, Helvetica, sans-serif" class=""><span style="white-space:normal" class="">Is there a way to invoke the 'print' method implemented in **Machine** pass? If so, could you let me know how I can do it?</span></font></pre><pre style="" class=""><font face="Arial, Helvetica, sans-serif" class=""><span style="white-space:normal" class="">Thank you.</span></font></pre><pre style="" class=""><font face="Arial, Helvetica, sans-serif" class=""><span style="white-space:normal" class="">Pavel</span></font></pre><pre style="" class=""><br class=""></pre><pre style="" class=""></pre></div></div></div></div>
_______________________________________________<br class="">LLVM Developers mailing list<br class=""><a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a><br class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev<br class=""></div></blockquote></div><br class=""></div></div></body></html>