<div dir="ltr">What does "nmp" stand for in that command line? Or was it supposed to be "npm"?</div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature">~Craig</div></div>
<br><div class="gmail_quote">On Mon, May 22, 2017 at 4:41 PM, Davide Italiano via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: davide<br>
Date: Mon May 22 18:41:40 2017<br>
New Revision: 303586<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=303586&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project?rev=303586&view=rev</a><br>
Log:<br>
[NewPM] Add a temporary cl::opt() to test NewGVN.<br>
<br>
Modified:<br>
llvm/trunk/lib/Passes/<wbr>PassBuilder.cpp<br>
<br>
Modified: llvm/trunk/lib/Passes/<wbr>PassBuilder.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Passes/PassBuilder.cpp?rev=303586&r1=303585&r2=303586&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/llvm/trunk/lib/Passes/<wbr>PassBuilder.cpp?rev=303586&r1=<wbr>303585&r2=303586&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/lib/Passes/<wbr>PassBuilder.cpp (original)<br>
+++ llvm/trunk/lib/Passes/<wbr>PassBuilder.cpp Mon May 22 18:41:40 2017<br>
@@ -155,6 +155,11 @@ static cl::opt<bool><br>
cl::Hidden, cl::ZeroOrMore,<br>
cl::desc("Run Partial inlinining pass"));<br>
<br>
+static cl::opt<bool><br>
+ RunNewGVN("enable-nmp-newgvn", cl::init(false),<br>
+ cl::Hidden, cl::ZeroOrMore,<br>
+ cl::desc("Run NewGVN instead of GVN"));<br>
+<br>
static cl::opt<bool> EnableGVNHoist(<br>
"enable-npm-gvn-hoist", cl::init(false), cl::Hidden,<br>
cl::desc("Enable the GVN hoisting pass for the new PM (default = off)"));<br>
@@ -357,7 +362,10 @@ PassBuilder::<wbr>buildFunctionSimplification<br>
if (Level != O1) {<br>
// These passes add substantial compile time so skip them at O1.<br>
FPM.addPass(<wbr>MergedLoadStoreMotionPass());<br>
- FPM.addPass(GVN());<br>
+ if (RunNewGVN)<br>
+ FPM.addPass(NewGVNPass());<br>
+ else<br>
+ FPM.addPass(GVN());<br>
}<br>
<br>
// Specially optimize memory movement as it doesn't look like dataflow in SSA.<br>
@@ -774,7 +782,10 @@ ModulePassManager PassBuilder::buildLTOD<br>
// FIXME: once we fix LoopPass Manager, add LICM here.<br>
// FIXME: once we provide support for enabling MLSM, add it here.<br>
// FIXME: once we provide support for enabling NewGVN, add it here.<br>
- MainFPM.addPass(GVN());<br>
+ if (RunNewGVN)<br>
+ MainFPM.addPass(NewGVNPass());<br>
+ else<br>
+ MainFPM.addPass(GVN());<br>
<br>
// Remove dead memcpy()'s.<br>
MainFPM.addPass(MemCpyOptPass(<wbr>));<br>
<br>
<br>
______________________________<wbr>_________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>