<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<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;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">Hi Eric,</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Thanks for your feedback. I am not actively working on GVN-Hoist, but I'll take a look at these benchmarks at some point. We can keep it reverted for the time being. My take is that the community should get more involved
 if GVN-Hoist is an optimization we would like to re-enable. I felt I was a bit on my own trying to get it to a good state.</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Regards,</p>
<p style="margin-top:0;margin-bottom:0">Alexandros</p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Eric Christopher <echristo@gmail.com><br>
<b>Sent:</b> Monday, October 1, 2018 7:59:21 PM<br>
<b>To:</b> Alexandros Lamprineas<br>
<b>Cc:</b> llvm-commits@lists.llvm.org; Jordan Rupprecht; Jorge Gorbe Moya<br>
<b>Subject:</b> Re: [llvm] r342387 - [GVNHoist] Re-enable GVNHoist by default</font>
<div> </div>
</div>
<meta content="text/html; charset=utf-8">
<div>
<div dir="ltr">And reverted here:
<div><br>
</div>
<div>
<div>echristo@athyra ~/s/llvm> git svn dcommit</div>
<div>Committing to <a href="https://llvm.org/svn/llvm-project/llvm/trunk">https://llvm.org/svn/llvm-project/llvm/trunk</a> ...</div>
<div><span style="white-space:pre"></span>M<span style="white-space:pre"> </span>
lib/Passes/PassBuilder.cpp</div>
<div><span style="white-space:pre"></span>M<span style="white-space:pre"> </span>
lib/Transforms/IPO/PassManagerBuilder.cpp</div>
<div><span style="white-space:pre"></span>M<span style="white-space:pre"> </span>
test/Other/new-pm-defaults.ll</div>
<div><span style="white-space:pre"></span>M<span style="white-space:pre"> </span>
test/Other/new-pm-thinlto-defaults.ll</div>
<div><span style="white-space:pre"></span>M<span style="white-space:pre"> </span>
test/Other/opt-O2-pipeline.ll</div>
<div><span style="white-space:pre"></span>M<span style="white-space:pre"> </span>
test/Other/opt-O3-pipeline.ll</div>
<div><span style="white-space:pre"></span>M<span style="white-space:pre"> </span>
test/Other/opt-Os-pipeline.ll</div>
<div>Committed r343522</div>
</div>
<div><br>
</div>
<div>Thanks!</div>
</div>
<br>
<div class="x_gmail_quote">
<div dir="ltr">On Mon, Oct 1, 2018 at 11:48 AM Eric Christopher <<a href="mailto:echristo@gmail.com">echristo@gmail.com</a>> wrote:<br>
</div>
<blockquote class="x_gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div dir="ltr">As a follow-up the benchmarks are now available here:
<div><br>
</div>
<div><a href="https://github.com/google/hashtable-benchmarks" target="_blank">https://github.com/google/hashtable-benchmarks</a><br>
</div>
<div><br>
</div>
<div>I'm going to go ahead and revert this in the meantime. I haven't seen performance numbers with GVNHoist enabled - could you make sure that those are also in the next commit message for review?</div>
<div><br>
</div>
<div>Thanks!</div>
</div>
<br>
<div class="x_gmail_quote">
<div dir="ltr">On Fri, Sep 28, 2018 at 11:27 AM Eric Christopher <<a href="mailto:echristo@gmail.com" target="_blank">echristo@gmail.com</a>> wrote:<br>
</div>
<blockquote class="x_gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div dir="ltr">HI Alexandros
<div><br>
</div>
<div>We're seeing multiple large regressions (~25%) in performance that are pointing at re-enabling gvn hoist again. A notable piece of visible code is swisstable, which can be found here: <a href="https://github.com/abseil/abseil-cpp/tree/master/absl/container" target="_blank">https://github.com/abseil/abseil-cpp/tree/master/absl/container</a>.
 The benchmarks aren't currently there and I'll work on getting you some, but you might be able to take a look there.</div>
<div><br>
</div>
<div>I've got other examples too and this would be widespread enough that I'd want to disable again until we can get the performance back or at least closer, overall performance greater with no large regressions is the goal right?</div>
<div><br>
</div>
<div>Thanks!</div>
</div>
<div dir="ltr">
<div><br>
</div>
<div>-eric</div>
</div>
<div dir="ltr"><br>
<div class="x_gmail_quote">
<div dir="ltr">On Mon, Sep 17, 2018 at 5:26 AM Alexandros Lamprineas via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>> wrote:<br>
</div>
<blockquote class="x_gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
Author: alelab01<br>
Date: Mon Sep 17 05:24:55 2018<br>
New Revision: 342387<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=342387&view=rev" rel="noreferrer" target="_blank">
http://llvm.org/viewvc/llvm-project?rev=342387&view=rev</a><br>
Log:<br>
[GVNHoist] Re-enable GVNHoist by default<br>
<br>
Rebase rL341954 since <a href="https://bugs.llvm.org/show_bug.cgi?id=38912" rel="noreferrer" target="_blank">
https://bugs.llvm.org/show_bug.cgi?id=38912</a><br>
has been fixed by rL342055.<br>
<br>
Precommit testing performed:<br>
* Overnight runs of csmith comparing the output between programs<br>
  compiled with gvn-hoist enabled/disabled.<br>
* Bootstrap builds of clang with UbSan/ASan configurations.<br>
<br>
Modified:<br>
    llvm/trunk/lib/Passes/PassBuilder.cpp<br>
    llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp<br>
    llvm/trunk/test/Other/new-pm-defaults.ll<br>
    llvm/trunk/test/Other/new-pm-thinlto-defaults.ll<br>
    llvm/trunk/test/Other/opt-O2-pipeline.ll<br>
    llvm/trunk/test/Other/opt-O3-pipeline.ll<br>
    llvm/trunk/test/Other/opt-Os-pipeline.ll<br>
<br>
Modified: llvm/trunk/lib/Passes/PassBuilder.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Passes/PassBuilder.cpp?rev=342387&r1=342386&r2=342387&view=diff" rel="noreferrer" target="_blank">
http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Passes/PassBuilder.cpp?rev=342387&r1=342386&r2=342387&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Passes/PassBuilder.cpp (original)<br>
+++ llvm/trunk/lib/Passes/PassBuilder.cpp Mon Sep 17 05:24:55 2018<br>
@@ -175,8 +175,8 @@ static cl::opt<bool> EnableEarlyCSEMemSS<br>
     cl::desc("Enable the EarlyCSE w/ MemorySSA pass for the new PM (default = on)"));<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>
+    "enable-npm-gvn-hoist", cl::init(true), cl::Hidden,<br>
+    cl::desc("Enable the GVN hoisting pass for the new PM (default = on)"));<br>
<br>
 static cl::opt<bool> EnableGVNSink(<br>
     "enable-npm-gvn-sink", cl::init(false), cl::Hidden,<br>
<br>
Modified: llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp?rev=342387&r1=342386&r2=342387&view=diff" rel="noreferrer" target="_blank">
http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp?rev=342387&r1=342386&r2=342387&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp (original)<br>
+++ llvm/trunk/lib/Transforms/IPO/PassManagerBuilder.cpp Mon Sep 17 05:24:55 2018<br>
@@ -139,8 +139,8 @@ static cl::opt<bool> EnableEarlyCSEMemSS<br>
     cl::desc("Enable the EarlyCSE w/ MemorySSA pass (default = on)"));<br>
<br>
 static cl::opt<bool> EnableGVNHoist(<br>
-    "enable-gvn-hoist", cl::init(false), cl::Hidden,<br>
-    cl::desc("Enable the GVN hoisting pass (default = off)"));<br>
+    "enable-gvn-hoist", cl::init(true), cl::Hidden,<br>
+    cl::desc("Enable the GVN hoisting pass (default = on)"));<br>
<br>
 static cl::opt<bool><br>
     DisableLibCallsShrinkWrap("disable-libcalls-shrinkwrap", cl::init(false),<br>
<br>
Modified: llvm/trunk/test/Other/new-pm-defaults.ll<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Other/new-pm-defaults.ll?rev=342387&r1=342386&r2=342387&view=diff" rel="noreferrer" target="_blank">
http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Other/new-pm-defaults.ll?rev=342387&r1=342386&r2=342387&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/test/Other/new-pm-defaults.ll (original)<br>
+++ llvm/trunk/test/Other/new-pm-defaults.ll Mon Sep 17 05:24:55 2018<br>
@@ -121,6 +121,10 @@<br>
 ; CHECK-O-NEXT: Running pass: SROA<br>
 ; CHECK-O-NEXT: Running pass: EarlyCSEPass<br>
 ; CHECK-O-NEXT: Running analysis: MemorySSAAnalysis<br>
+; CHECK-O-NEXT: Running pass: GVNHoistPass on foo<br>
+; CHECK-O-NEXT: Running analysis: PostDominatorTreeAnalysis on foo<br>
+; CHECK-O-NEXT: Running analysis: MemoryDependenceAnalysis on foo<br>
+; CHECK-O-NEXT: Running analysis: PhiValuesAnalysis on foo<br>
 ; CHECK-O-NEXT: Running pass: SpeculativeExecutionPass<br>
 ; CHECK-O-NEXT: Running pass: JumpThreadingPass<br>
 ; CHECK-O-NEXT: Running analysis: LazyValueAnalysis<br>
@@ -169,23 +173,13 @@<br>
 ; CHECK-O-NEXT: Finished Loop pass manager run.<br>
 ; CHECK-Os-NEXT: Running pass: MergedLoadStoreMotionPass<br>
 ; CHECK-Os-NEXT: Running pass: GVN<br>
-; CHECK-Os-NEXT: Running analysis: MemoryDependenceAnalysis<br>
-; CHECK-Os-NEXT: Running analysis: PhiValuesAnalysis<br>
 ; CHECK-Oz-NEXT: Running pass: MergedLoadStoreMotionPass<br>
 ; CHECK-Oz-NEXT: Running pass: GVN<br>
-; CHECK-Oz-NEXT: Running analysis: MemoryDependenceAnalysis<br>
-; CHECK-Oz-NEXT: Running analysis: PhiValuesAnalysis<br>
 ; CHECK-O2-NEXT: Running pass: MergedLoadStoreMotionPass<br>
 ; CHECK-O2-NEXT: Running pass: GVN<br>
-; CHECK-O2-NEXT: Running analysis: MemoryDependenceAnalysis<br>
-; CHECK-O2-NEXT: Running analysis: PhiValuesAnalysis<br>
 ; CHECK-O3-NEXT: Running pass: MergedLoadStoreMotionPass<br>
 ; CHECK-O3-NEXT: Running pass: GVN<br>
-; CHECK-O3-NEXT: Running analysis: MemoryDependenceAnalysis<br>
-; CHECK-O3-NEXT: Running analysis: PhiValuesAnalysis<br>
 ; CHECK-O-NEXT: Running pass: MemCpyOptPass<br>
-; CHECK-O1-NEXT: Running analysis: MemoryDependenceAnalysis<br>
-; CHECK-O1-NEXT: Running analysis: PhiValuesAnalysis<br>
 ; CHECK-O-NEXT: Running pass: SCCPPass<br>
 ; CHECK-O-NEXT: Running pass: BDCEPass<br>
 ; CHECK-O-NEXT: Running analysis: DemandedBitsAnalysis<br>
@@ -201,7 +195,6 @@<br>
 ; CHECK-O-NEXT: Finished llvm::Function pass manager run.<br>
 ; CHECK-EP-SCALAR-LATE-NEXT: Running pass: NoOpFunctionPass<br>
 ; CHECK-O-NEXT: Running pass: ADCEPass<br>
-; CHECK-O-NEXT: Running analysis: PostDominatorTreeAnalysis<br>
 ; CHECK-O-NEXT: Running pass: SimplifyCFGPass<br>
 ; CHECK-O-NEXT: Running pass: InstCombinePass<br>
 ; CHECK-EP-PEEPHOLE-NEXT: Running pass: NoOpFunctionPass<br>
<br>
Modified: llvm/trunk/test/Other/new-pm-thinlto-defaults.ll<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Other/new-pm-thinlto-defaults.ll?rev=342387&r1=342386&r2=342387&view=diff" rel="noreferrer" target="_blank">
http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Other/new-pm-thinlto-defaults.ll?rev=342387&r1=342386&r2=342387&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/test/Other/new-pm-thinlto-defaults.ll (original)<br>
+++ llvm/trunk/test/Other/new-pm-thinlto-defaults.ll Mon Sep 17 05:24:55 2018<br>
@@ -106,6 +106,10 @@<br>
 ; CHECK-O-NEXT: Running pass: SROA<br>
 ; CHECK-O-NEXT: Running pass: EarlyCSEPass<br>
 ; CHECK-O-NEXT: Running analysis: MemorySSAAnalysis<br>
+; CHECK-O-NEXT: Running pass: GVNHoistPass on foo<br>
+; CHECK-O-NEXT: Running analysis: PostDominatorTreeAnalysis on foo<br>
+; CHECK-O-NEXT: Running analysis: MemoryDependenceAnalysis on foo<br>
+; CHECK-O-NEXT: Running analysis: PhiValuesAnalysis on foo<br>
 ; CHECK-O-NEXT: Running pass: SpeculativeExecutionPass<br>
 ; CHECK-O-NEXT: Running pass: JumpThreadingPass<br>
 ; CHECK-O-NEXT: Running analysis: LazyValueAnalysis<br>
@@ -151,23 +155,13 @@<br>
 ; CHECK-O-NEXT: Finished Loop pass manager run.<br>
 ; CHECK-Os-NEXT: Running pass: MergedLoadStoreMotionPass<br>
 ; CHECK-Os-NEXT: Running pass: GVN<br>
-; CHECK-Os-NEXT: Running analysis: MemoryDependenceAnalysis<br>
-; CHECK-Os-NEXT: Running analysis: PhiValuesAnalysis<br>
 ; CHECK-Oz-NEXT: Running pass: MergedLoadStoreMotionPass<br>
 ; CHECK-Oz-NEXT: Running pass: GVN<br>
-; CHECK-Oz-NEXT: Running analysis: MemoryDependenceAnalysis<br>
-; CHECK-Oz-NEXT: Running analysis: PhiValuesAnalysis<br>
 ; CHECK-O2-NEXT: Running pass: MergedLoadStoreMotionPass<br>
 ; CHECK-O2-NEXT: Running pass: GVN<br>
-; CHECK-O2-NEXT: Running analysis: MemoryDependenceAnalysis<br>
-; CHECK-O2-NEXT: Running analysis: PhiValuesAnalysis<br>
 ; CHECK-O3-NEXT: Running pass: MergedLoadStoreMotionPass<br>
 ; CHECK-O3-NEXT: Running pass: GVN<br>
-; CHECK-O3-NEXT: Running analysis: MemoryDependenceAnalysis<br>
-; CHECK-O3-NEXT: Running analysis: PhiValuesAnalysis<br>
 ; CHECK-O-NEXT: Running pass: MemCpyOptPass<br>
-; CHECK-O1-NEXT: Running analysis: MemoryDependenceAnalysis<br>
-; CHECK-O1-NEXT: Running analysis: PhiValuesAnalysis<br>
 ; CHECK-O-NEXT: Running pass: SCCPPass<br>
 ; CHECK-O-NEXT: Running pass: BDCEPass<br>
 ; CHECK-O-NEXT: Running analysis: DemandedBitsAnalysis<br>
@@ -181,7 +175,6 @@<br>
 ; CHECK-O-NEXT: Running pass: LCSSAPass<br>
 ; CHECK-O-NEXT: Finished llvm::Function pass manager run<br>
 ; CHECK-O-NEXT: Running pass: ADCEPass<br>
-; CHECK-O-NEXT: Running analysis: PostDominatorTreeAnalysis<br>
 ; CHECK-O-NEXT: Running pass: SimplifyCFGPass<br>
 ; CHECK-O-NEXT: Running pass: InstCombinePass<br>
 ; CHECK-O-NEXT: Finished llvm::Function pass manager run.<br>
<br>
Modified: llvm/trunk/test/Other/opt-O2-pipeline.ll<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Other/opt-O2-pipeline.ll?rev=342387&r1=342386&r2=342387&view=diff" rel="noreferrer" target="_blank">
http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Other/opt-O2-pipeline.ll?rev=342387&r1=342386&r2=342387&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/test/Other/opt-O2-pipeline.ll (original)<br>
+++ llvm/trunk/test/Other/opt-O2-pipeline.ll Mon Sep 17 05:24:55 2018<br>
@@ -59,6 +59,12 @@<br>
 ; CHECK-NEXT:         Function Alias Analysis Results<br>
 ; CHECK-NEXT:         Memory SSA<br>
 ; CHECK-NEXT:         Early CSE w/ MemorySSA<br>
+; CHECK-NEXT:         Post-Dominator Tree Construction<br>
+; CHECK-NEXT:         Basic Alias Analysis (stateless AA impl)<br>
+; CHECK-NEXT:         Function Alias Analysis Results<br>
+; CHECK-NEXT:         Phi Values Analysis<br>
+; CHECK-NEXT:         Memory Dependence Analysis<br>
+; CHECK-NEXT:         Early GVN Hoisting of Expressions<br>
 ; CHECK-NEXT:         Speculatively execute instructions if target has divergent branches<br>
 ; CHECK-NEXT:         Basic Alias Analysis (stateless AA impl)<br>
 ; CHECK-NEXT:         Function Alias Analysis Results<br>
<br>
Modified: llvm/trunk/test/Other/opt-O3-pipeline.ll<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Other/opt-O3-pipeline.ll?rev=342387&r1=342386&r2=342387&view=diff" rel="noreferrer" target="_blank">
http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Other/opt-O3-pipeline.ll?rev=342387&r1=342386&r2=342387&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/test/Other/opt-O3-pipeline.ll (original)<br>
+++ llvm/trunk/test/Other/opt-O3-pipeline.ll Mon Sep 17 05:24:55 2018<br>
@@ -62,6 +62,12 @@<br>
 ; CHECK-NEXT:         Function Alias Analysis Results<br>
 ; CHECK-NEXT:         Memory SSA<br>
 ; CHECK-NEXT:         Early CSE w/ MemorySSA<br>
+; CHECK-NEXT:         Post-Dominator Tree Construction<br>
+; CHECK-NEXT:         Basic Alias Analysis (stateless AA impl)<br>
+; CHECK-NEXT:         Function Alias Analysis Results<br>
+; CHECK-NEXT:         Phi Values Analysis<br>
+; CHECK-NEXT:         Memory Dependence Analysis<br>
+; CHECK-NEXT:         Early GVN Hoisting of Expressions<br>
 ; CHECK-NEXT:         Speculatively execute instructions if target has divergent branches<br>
 ; CHECK-NEXT:         Basic Alias Analysis (stateless AA impl)<br>
 ; CHECK-NEXT:         Function Alias Analysis Results<br>
<br>
Modified: llvm/trunk/test/Other/opt-Os-pipeline.ll<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Other/opt-Os-pipeline.ll?rev=342387&r1=342386&r2=342387&view=diff" rel="noreferrer" target="_blank">
http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Other/opt-Os-pipeline.ll?rev=342387&r1=342386&r2=342387&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/test/Other/opt-Os-pipeline.ll (original)<br>
+++ llvm/trunk/test/Other/opt-Os-pipeline.ll Mon Sep 17 05:24:55 2018<br>
@@ -59,6 +59,12 @@<br>
 ; CHECK-NEXT:         Function Alias Analysis Results<br>
 ; CHECK-NEXT:         Memory SSA<br>
 ; CHECK-NEXT:         Early CSE w/ MemorySSA<br>
+; CHECK-NEXT:         Post-Dominator Tree Construction<br>
+; CHECK-NEXT:         Basic Alias Analysis (stateless AA impl)<br>
+; CHECK-NEXT:         Function Alias Analysis Results<br>
+; CHECK-NEXT:         Phi Values Analysis<br>
+; CHECK-NEXT:         Memory Dependence Analysis<br>
+; CHECK-NEXT:         Early GVN Hoisting of Expressions<br>
 ; CHECK-NEXT:         Speculatively execute instructions if target has divergent branches<br>
 ; CHECK-NEXT:         Basic Alias Analysis (stateless AA impl)<br>
 ; CHECK-NEXT:         Function Alias Analysis Results<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">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/mailman/listinfo/llvm-commits</a><br>
</blockquote>
</div>
</div>
</blockquote>
</div>
</blockquote>
</div>
</div>
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose,
 or store or copy the information in any medium. Thank you.
</body>
</html>