<div dir="ltr">The problem is probably that --print-after-all is not dumping the whole module, e.g. after a function pass it only dumps the function. -mllvm -print-module-scope should force printing of the entire module.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Nov 7, 2021 at 7:29 AM Jayakrishna Vadayath via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</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">Dear devs,<br>
<br>
I wanted to know if it is possible to dump the control flow graph<br>
representation of functions before/after each optimization pass.<br>
<br>
I found that it is possible to dump the intermediate representation<br>
after each optimization pass using the flags -mllvm -print-after-all.<br>
I also found that it is possible to dump the control flow graph from<br>
the LLVM IR using the command opt -dot-cfg.<br>
<br>
I tried to split the output of the -print-after-all flag and saved it<br>
to multiple files.<br>
However, when I run the opt -dot-cfg command on each of those files,<br>
it fails because some variables are not defined.<br>
<br>
I wanted to know if it is possible to dump the LLVM IR after every<br>
optimization pass that could then be passed on to opt to dump the<br>
control flow graph representation.<br>
Or is it possible to just dump the control flow graph representation<br>
itself after each optimization pass ?<br>
<br>
Please let me know<br>
<br>
Thank you<br>
<br>
-- <br>
Regards<br>
Jayakrishna Menon<br>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
</blockquote></div>