[llvm-dev] How to invoke the print method in MachineFunctionPass

Samolisov Pavel via llvm-dev llvm-dev at lists.llvm.org
Wed Nov 7 02:12:30 PST 2018


Hello everyone.

I'm looking for a way how to invoke the 'print(raw_ostream &OS, const Module
*)' 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?

As I can see, there is an implementation of the 'print(raw_ostream &OS, const
Module*)' method in the 'LiveIntervals.cpp'.

void LiveIntervals::print(raw_ostream &OS, const Module* ) const {
  OS << "********** INTERVALS **********\n";

  // Dump the regunits.

...

The method also is implemented in 'RegisterCoalescer.cpp' (in fact,
this method just invokes one from LiveIntervals).

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?

Thank you.

Pavel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20181107/2770f7d8/attachment.html>


More information about the llvm-dev mailing list