mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
[GVNHoist] Re-enable GVNHoist by default
My initial motivation for this came from https://reviews.llvm.org/D48122, where it was pointed out that my change didn't fit well in SimplifyCFG and therefore using GVNHoist was a better way to go. GVNHoist has been disabled for a while as there was a list of bugs related to it. I have fixed the following bugs: https://bugs.llvm.org/show_bug.cgi?id=37808 -> https://reviews.llvm.org/D48372 (rL337149) https://bugs.llvm.org/show_bug.cgi?id=36787 -> https://reviews.llvm.org/D49555 (rL337674) https://bugs.llvm.org/show_bug.cgi?id=37445 -> https://reviews.llvm.org/D49425 (rL337680) The next two bugs no longer occur, and it's unclear which commit fixed them: https://bugs.llvm.org/show_bug.cgi?id=36635 https://bugs.llvm.org/show_bug.cgi?id=37791 I investigated this one and proved to be unrelated to GVNHoist, but a genuine bug in NewGvn: https://bugs.llvm.org/show_bug.cgi?id=37660 To convince myself GVNHoist is in a good state I made a successful bootstrap build of LLVM. Merging this change now in order to make it to the LLVM 7.0.0 branch. Differential Revision: https://reviews.llvm.org/D49858 llvm-svn: 338240
This commit is contained in:
parent
61b7f79d4f
commit
4d4c7ccee5
@ -174,8 +174,8 @@ static cl::opt<bool> EnableEarlyCSEMemSSA(
|
|||||||
cl::desc("Enable the EarlyCSE w/ MemorySSA pass for the new PM (default = on)"));
|
cl::desc("Enable the EarlyCSE w/ MemorySSA pass for the new PM (default = on)"));
|
||||||
|
|
||||||
static cl::opt<bool> EnableGVNHoist(
|
static cl::opt<bool> EnableGVNHoist(
|
||||||
"enable-npm-gvn-hoist", cl::init(false), cl::Hidden,
|
"enable-npm-gvn-hoist", cl::init(true), cl::Hidden,
|
||||||
cl::desc("Enable the GVN hoisting pass for the new PM (default = off)"));
|
cl::desc("Enable the GVN hoisting pass for the new PM (default = on)"));
|
||||||
|
|
||||||
static cl::opt<bool> EnableGVNSink(
|
static cl::opt<bool> EnableGVNSink(
|
||||||
"enable-npm-gvn-sink", cl::init(false), cl::Hidden,
|
"enable-npm-gvn-sink", cl::init(false), cl::Hidden,
|
||||||
|
@ -135,8 +135,8 @@ static cl::opt<bool> EnableEarlyCSEMemSSA(
|
|||||||
cl::desc("Enable the EarlyCSE w/ MemorySSA pass (default = on)"));
|
cl::desc("Enable the EarlyCSE w/ MemorySSA pass (default = on)"));
|
||||||
|
|
||||||
static cl::opt<bool> EnableGVNHoist(
|
static cl::opt<bool> EnableGVNHoist(
|
||||||
"enable-gvn-hoist", cl::init(false), cl::Hidden,
|
"enable-gvn-hoist", cl::init(true), cl::Hidden,
|
||||||
cl::desc("Enable the GVN hoisting pass (default = off)"));
|
cl::desc("Enable the GVN hoisting pass (default = on)"));
|
||||||
|
|
||||||
static cl::opt<bool>
|
static cl::opt<bool>
|
||||||
DisableLibCallsShrinkWrap("disable-libcalls-shrinkwrap", cl::init(false),
|
DisableLibCallsShrinkWrap("disable-libcalls-shrinkwrap", cl::init(false),
|
||||||
|
@ -121,6 +121,9 @@
|
|||||||
; CHECK-O-NEXT: Running pass: SROA
|
; CHECK-O-NEXT: Running pass: SROA
|
||||||
; CHECK-O-NEXT: Running pass: EarlyCSEPass
|
; CHECK-O-NEXT: Running pass: EarlyCSEPass
|
||||||
; CHECK-O-NEXT: Running analysis: MemorySSAAnalysis
|
; CHECK-O-NEXT: Running analysis: MemorySSAAnalysis
|
||||||
|
; CHECK-O-NEXT: Running pass: GVNHoistPass on foo
|
||||||
|
; CHECK-O-NEXT: Running analysis: PostDominatorTreeAnalysis on foo
|
||||||
|
; CHECK-O-NEXT: Running analysis: MemoryDependenceAnalysis on foo
|
||||||
; CHECK-O-NEXT: Running pass: SpeculativeExecutionPass
|
; CHECK-O-NEXT: Running pass: SpeculativeExecutionPass
|
||||||
; CHECK-O-NEXT: Running pass: JumpThreadingPass
|
; CHECK-O-NEXT: Running pass: JumpThreadingPass
|
||||||
; CHECK-O-NEXT: Running analysis: LazyValueAnalysis
|
; CHECK-O-NEXT: Running analysis: LazyValueAnalysis
|
||||||
@ -169,18 +172,13 @@
|
|||||||
; CHECK-O-NEXT: Finished Loop pass manager run.
|
; CHECK-O-NEXT: Finished Loop pass manager run.
|
||||||
; CHECK-Os-NEXT: Running pass: MergedLoadStoreMotionPass
|
; CHECK-Os-NEXT: Running pass: MergedLoadStoreMotionPass
|
||||||
; CHECK-Os-NEXT: Running pass: GVN
|
; CHECK-Os-NEXT: Running pass: GVN
|
||||||
; CHECK-Os-NEXT: Running analysis: MemoryDependenceAnalysis
|
|
||||||
; CHECK-Oz-NEXT: Running pass: MergedLoadStoreMotionPass
|
; CHECK-Oz-NEXT: Running pass: MergedLoadStoreMotionPass
|
||||||
; CHECK-Oz-NEXT: Running pass: GVN
|
; CHECK-Oz-NEXT: Running pass: GVN
|
||||||
; CHECK-Oz-NEXT: Running analysis: MemoryDependenceAnalysis
|
|
||||||
; CHECK-O2-NEXT: Running pass: MergedLoadStoreMotionPass
|
; CHECK-O2-NEXT: Running pass: MergedLoadStoreMotionPass
|
||||||
; CHECK-O2-NEXT: Running pass: GVN
|
; CHECK-O2-NEXT: Running pass: GVN
|
||||||
; CHECK-O2-NEXT: Running analysis: MemoryDependenceAnalysis
|
|
||||||
; CHECK-O3-NEXT: Running pass: MergedLoadStoreMotionPass
|
; CHECK-O3-NEXT: Running pass: MergedLoadStoreMotionPass
|
||||||
; CHECK-O3-NEXT: Running pass: GVN
|
; CHECK-O3-NEXT: Running pass: GVN
|
||||||
; CHECK-O3-NEXT: Running analysis: MemoryDependenceAnalysis
|
|
||||||
; CHECK-O-NEXT: Running pass: MemCpyOptPass
|
; CHECK-O-NEXT: Running pass: MemCpyOptPass
|
||||||
; CHECK-O1-NEXT: Running analysis: MemoryDependenceAnalysis
|
|
||||||
; CHECK-O-NEXT: Running pass: SCCPPass
|
; CHECK-O-NEXT: Running pass: SCCPPass
|
||||||
; CHECK-O-NEXT: Running pass: BDCEPass
|
; CHECK-O-NEXT: Running pass: BDCEPass
|
||||||
; CHECK-O-NEXT: Running analysis: DemandedBitsAnalysis
|
; CHECK-O-NEXT: Running analysis: DemandedBitsAnalysis
|
||||||
@ -196,7 +194,6 @@
|
|||||||
; CHECK-O-NEXT: Finished llvm::Function pass manager run.
|
; CHECK-O-NEXT: Finished llvm::Function pass manager run.
|
||||||
; CHECK-EP-SCALAR-LATE-NEXT: Running pass: NoOpFunctionPass
|
; CHECK-EP-SCALAR-LATE-NEXT: Running pass: NoOpFunctionPass
|
||||||
; CHECK-O-NEXT: Running pass: ADCEPass
|
; CHECK-O-NEXT: Running pass: ADCEPass
|
||||||
; CHECK-O-NEXT: Running analysis: PostDominatorTreeAnalysis
|
|
||||||
; CHECK-O-NEXT: Running pass: SimplifyCFGPass
|
; CHECK-O-NEXT: Running pass: SimplifyCFGPass
|
||||||
; CHECK-O-NEXT: Running pass: InstCombinePass
|
; CHECK-O-NEXT: Running pass: InstCombinePass
|
||||||
; CHECK-EP-PEEPHOLE-NEXT: Running pass: NoOpFunctionPass
|
; CHECK-EP-PEEPHOLE-NEXT: Running pass: NoOpFunctionPass
|
||||||
|
@ -106,6 +106,9 @@
|
|||||||
; CHECK-O-NEXT: Running pass: SROA
|
; CHECK-O-NEXT: Running pass: SROA
|
||||||
; CHECK-O-NEXT: Running pass: EarlyCSEPass
|
; CHECK-O-NEXT: Running pass: EarlyCSEPass
|
||||||
; CHECK-O-NEXT: Running analysis: MemorySSAAnalysis
|
; CHECK-O-NEXT: Running analysis: MemorySSAAnalysis
|
||||||
|
; CHECK-O-NEXT: Running pass: GVNHoistPass on foo
|
||||||
|
; CHECK-O-NEXT: Running analysis: PostDominatorTreeAnalysis on foo
|
||||||
|
; CHECK-O-NEXT: Running analysis: MemoryDependenceAnalysis on foo
|
||||||
; CHECK-O-NEXT: Running pass: SpeculativeExecutionPass
|
; CHECK-O-NEXT: Running pass: SpeculativeExecutionPass
|
||||||
; CHECK-O-NEXT: Running pass: JumpThreadingPass
|
; CHECK-O-NEXT: Running pass: JumpThreadingPass
|
||||||
; CHECK-O-NEXT: Running analysis: LazyValueAnalysis
|
; CHECK-O-NEXT: Running analysis: LazyValueAnalysis
|
||||||
@ -151,18 +154,13 @@
|
|||||||
; CHECK-O-NEXT: Finished Loop pass manager run.
|
; CHECK-O-NEXT: Finished Loop pass manager run.
|
||||||
; CHECK-Os-NEXT: Running pass: MergedLoadStoreMotionPass
|
; CHECK-Os-NEXT: Running pass: MergedLoadStoreMotionPass
|
||||||
; CHECK-Os-NEXT: Running pass: GVN
|
; CHECK-Os-NEXT: Running pass: GVN
|
||||||
; CHECK-Os-NEXT: Running analysis: MemoryDependenceAnalysis
|
|
||||||
; CHECK-Oz-NEXT: Running pass: MergedLoadStoreMotionPass
|
; CHECK-Oz-NEXT: Running pass: MergedLoadStoreMotionPass
|
||||||
; CHECK-Oz-NEXT: Running pass: GVN
|
; CHECK-Oz-NEXT: Running pass: GVN
|
||||||
; CHECK-Oz-NEXT: Running analysis: MemoryDependenceAnalysis
|
|
||||||
; CHECK-O2-NEXT: Running pass: MergedLoadStoreMotionPass
|
; CHECK-O2-NEXT: Running pass: MergedLoadStoreMotionPass
|
||||||
; CHECK-O2-NEXT: Running pass: GVN
|
; CHECK-O2-NEXT: Running pass: GVN
|
||||||
; CHECK-O2-NEXT: Running analysis: MemoryDependenceAnalysis
|
|
||||||
; CHECK-O3-NEXT: Running pass: MergedLoadStoreMotionPass
|
; CHECK-O3-NEXT: Running pass: MergedLoadStoreMotionPass
|
||||||
; CHECK-O3-NEXT: Running pass: GVN
|
; CHECK-O3-NEXT: Running pass: GVN
|
||||||
; CHECK-O3-NEXT: Running analysis: MemoryDependenceAnalysis
|
|
||||||
; CHECK-O-NEXT: Running pass: MemCpyOptPass
|
; CHECK-O-NEXT: Running pass: MemCpyOptPass
|
||||||
; CHECK-O1-NEXT: Running analysis: MemoryDependenceAnalysis
|
|
||||||
; CHECK-O-NEXT: Running pass: SCCPPass
|
; CHECK-O-NEXT: Running pass: SCCPPass
|
||||||
; CHECK-O-NEXT: Running pass: BDCEPass
|
; CHECK-O-NEXT: Running pass: BDCEPass
|
||||||
; CHECK-O-NEXT: Running analysis: DemandedBitsAnalysis
|
; CHECK-O-NEXT: Running analysis: DemandedBitsAnalysis
|
||||||
@ -176,7 +174,6 @@
|
|||||||
; CHECK-O-NEXT: Running pass: LCSSAPass
|
; CHECK-O-NEXT: Running pass: LCSSAPass
|
||||||
; CHECK-O-NEXT: Finished llvm::Function pass manager run
|
; CHECK-O-NEXT: Finished llvm::Function pass manager run
|
||||||
; CHECK-O-NEXT: Running pass: ADCEPass
|
; CHECK-O-NEXT: Running pass: ADCEPass
|
||||||
; CHECK-O-NEXT: Running analysis: PostDominatorTreeAnalysis
|
|
||||||
; CHECK-O-NEXT: Running pass: SimplifyCFGPass
|
; CHECK-O-NEXT: Running pass: SimplifyCFGPass
|
||||||
; CHECK-O-NEXT: Running pass: InstCombinePass
|
; CHECK-O-NEXT: Running pass: InstCombinePass
|
||||||
; CHECK-O-NEXT: Finished llvm::Function pass manager run.
|
; CHECK-O-NEXT: Finished llvm::Function pass manager run.
|
||||||
|
@ -58,7 +58,12 @@
|
|||||||
; CHECK-NEXT: Function Alias Analysis Results
|
; CHECK-NEXT: Function Alias Analysis Results
|
||||||
; CHECK-NEXT: Memory SSA
|
; CHECK-NEXT: Memory SSA
|
||||||
; CHECK-NEXT: Early CSE w/ MemorySSA
|
; CHECK-NEXT: Early CSE w/ MemorySSA
|
||||||
|
; CHECK-NEXT: Post-Dominator Tree Construction
|
||||||
|
; CHECK-NEXT: Function Alias Analysis Results
|
||||||
|
; CHECK-NEXT: Memory Dependence Analysis
|
||||||
|
; CHECK-NEXT: Early GVN Hoisting of Expressions
|
||||||
; CHECK-NEXT: Speculatively execute instructions if target has divergent branches
|
; CHECK-NEXT: Speculatively execute instructions if target has divergent branches
|
||||||
|
; CHECK-NEXT: Basic Alias Analysis (stateless AA impl)
|
||||||
; CHECK-NEXT: Function Alias Analysis Results
|
; CHECK-NEXT: Function Alias Analysis Results
|
||||||
; CHECK-NEXT: Lazy Value Information Analysis
|
; CHECK-NEXT: Lazy Value Information Analysis
|
||||||
; CHECK-NEXT: Jump Threading
|
; CHECK-NEXT: Jump Threading
|
||||||
|
@ -61,7 +61,12 @@
|
|||||||
; CHECK-NEXT: Function Alias Analysis Results
|
; CHECK-NEXT: Function Alias Analysis Results
|
||||||
; CHECK-NEXT: Memory SSA
|
; CHECK-NEXT: Memory SSA
|
||||||
; CHECK-NEXT: Early CSE w/ MemorySSA
|
; CHECK-NEXT: Early CSE w/ MemorySSA
|
||||||
|
; CHECK-NEXT: Post-Dominator Tree Construction
|
||||||
|
; CHECK-NEXT: Function Alias Analysis Results
|
||||||
|
; CHECK-NEXT: Memory Dependence Analysis
|
||||||
|
; CHECK-NEXT: Early GVN Hoist
|
||||||
; CHECK-NEXT: Speculatively execute instructions if target has divergent branches
|
; CHECK-NEXT: Speculatively execute instructions if target has divergent branches
|
||||||
|
; CHECK-NEXT: Basic Alias Analysis (stateless AA impl)
|
||||||
; CHECK-NEXT: Function Alias Analysis Results
|
; CHECK-NEXT: Function Alias Analysis Results
|
||||||
; CHECK-NEXT: Lazy Value Information Analysis
|
; CHECK-NEXT: Lazy Value Information Analysis
|
||||||
; CHECK-NEXT: Jump Threading
|
; CHECK-NEXT: Jump Threading
|
||||||
|
@ -58,7 +58,12 @@
|
|||||||
; CHECK-NEXT: Function Alias Analysis Results
|
; CHECK-NEXT: Function Alias Analysis Results
|
||||||
; CHECK-NEXT: Memory SSA
|
; CHECK-NEXT: Memory SSA
|
||||||
; CHECK-NEXT: Early CSE w/ MemorySSA
|
; CHECK-NEXT: Early CSE w/ MemorySSA
|
||||||
|
; CHECK-NEXT: Post-Dominator Tree Construction
|
||||||
|
; CHECK-NEXT: Function Alias Analysis Results
|
||||||
|
; CHECK-NEXT: Memory Dependence Analysis
|
||||||
|
; CHECK-NEXT: Early GVN Hoisting of Expressions
|
||||||
; CHECK-NEXT: Speculatively execute instructions if target has divergent branches
|
; CHECK-NEXT: Speculatively execute instructions if target has divergent branches
|
||||||
|
; CHECK-NEXT: Basic Alias Analysis (stateless AA impl)
|
||||||
; CHECK-NEXT: Function Alias Analysis Results
|
; CHECK-NEXT: Function Alias Analysis Results
|
||||||
; CHECK-NEXT: Lazy Value Information Analysis
|
; CHECK-NEXT: Lazy Value Information Analysis
|
||||||
; CHECK-NEXT: Jump Threading
|
; CHECK-NEXT: Jump Threading
|
||||||
|
Loading…
x
Reference in New Issue
Block a user