<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>It solved my question, thank you.</p>
<p><br>
</p>
<p>Best regards,</p>
<p>Zhengyang.</p>
<br>
<br>
<div style="color: rgb(0, 0, 0);">
<div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Martin J. O'Riordan <martin.oriordan@movidius.com><br>
<b>Sent:</b> Sunday, June 12, 2016 9:01 PM<br>
<b>To:</b> 'Zhengyang Liu'<br>
<b>Subject:</b> RE: [llvm-dev] Can I dump LLVM IR after each pass in Clang BackendUtil.cpp</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">I think that:<br>
<br>
-mllvm -print-after-all<br>
<br>
does that you need. It is "very" verbose though and you might prefer to use:<br>
<br>
-mllvm -print-after=<selected-passes><br>
<br>
Use '-mllvm -help' or '-mllvm --help-hidden' to see all the options.<br>
<br>
MartinO<br>
<br>
-----Original Message-----<br>
From: llvm-dev [<a href="mailto:llvm-dev-bounces@lists.llvm.org" title="mailto:llvm-dev-bounces@lists.llvm.org
Ctrl+Click or tap to follow the link">mailto:llvm-dev-bounces@lists.llvm.org</a>] On Behalf Of Zhengyang Liu via llvm-dev<br>
Sent: 12 June 2016 13:39<br>
To: llvm-dev@lists.llvm.org<br>
Subject: [llvm-dev] Can I dump LLVM IR after each pass in Clang BackendUtil.cpp<br>
<br>
Dear llvm-dev,<br>
<br>
I am trying to debug some passes , these passes are added to <br>
legacy::PassManager(MPM) in Clang's lib/CodeGen/BackendUtil.cpp :<br>
<br>
<br>
//******<br>
void EmitAssemblyHelper::CreatePasses() {<br>
//******<br>
if (CodeGenOpts.MemSafety) {<br>
//<br>
// Add passes that record information about run-time checks.<br>
//<br>
MPM->add (createCommonMSCInfoPass());<br>
MPM->add (createSAFECodeMSCInfoPass());<br>
//******<br>
<br>
Could I dump the output LLVM IR after each pass in PassManager MPM?<br>
<br>
Best regards,<br>
Zhengyang.<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
llvm-dev@lists.llvm.org<br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
<br>
</div>
</span></font></div>
</div>
</body>
</html>