[PATCH] D47149: [SCCP] Mark DominatorTreeAnalysis as preserved.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 22 09:43:37 PDT 2018
fhahn updated this revision to Diff 148029.
fhahn added a comment.
Removed DT preservation for IPSCCP, which uses changeToUnreachable. SCCP uses removeAllNonTerminatorInstruction... and should not change the CFG.
https://reviews.llvm.org/D47149
Files:
lib/Transforms/Scalar/SCCP.cpp
test/Other/opt-O2-pipeline.ll
test/Other/opt-O3-pipeline.ll
test/Other/opt-Os-pipeline.ll
Index: test/Other/opt-Os-pipeline.ll
===================================================================
--- test/Other/opt-Os-pipeline.ll
+++ test/Other/opt-Os-pipeline.ll
@@ -120,7 +120,6 @@
; CHECK-NEXT: Memory Dependence Analysis
; CHECK-NEXT: MemCpy Optimization
; CHECK-NEXT: Sparse Conditional Constant Propagation
-; CHECK-NEXT: Dominator Tree Construction
; CHECK-NEXT: Demanded bits analysis
; CHECK-NEXT: Bit-Tracking Dead Code Elimination
; CHECK-NEXT: Basic Alias Analysis (stateless AA impl)
Index: test/Other/opt-O3-pipeline.ll
===================================================================
--- test/Other/opt-O3-pipeline.ll
+++ test/Other/opt-O3-pipeline.ll
@@ -138,7 +138,6 @@
; CHECK-NEXT: Memory Dependence Analysis
; CHECK-NEXT: MemCpy Optimization
; CHECK-NEXT: Sparse Conditional Constant Propagation
-; CHECK-NEXT: Dominator Tree Construction
; CHECK-NEXT: Demanded bits analysis
; CHECK-NEXT: Bit-Tracking Dead Code Elimination
; CHECK-NEXT: Basic Alias Analysis (stateless AA impl)
Index: test/Other/opt-O2-pipeline.ll
===================================================================
--- test/Other/opt-O2-pipeline.ll
+++ test/Other/opt-O2-pipeline.ll
@@ -134,7 +134,6 @@
; CHECK-NEXT: Memory Dependence Analysis
; CHECK-NEXT: MemCpy Optimization
; CHECK-NEXT: Sparse Conditional Constant Propagation
-; CHECK-NEXT: Dominator Tree Construction
; CHECK-NEXT: Demanded bits analysis
; CHECK-NEXT: Bit-Tracking Dead Code Elimination
; CHECK-NEXT: Basic Alias Analysis (stateless AA impl)
Index: lib/Transforms/Scalar/SCCP.cpp
===================================================================
--- lib/Transforms/Scalar/SCCP.cpp
+++ lib/Transforms/Scalar/SCCP.cpp
@@ -1776,6 +1776,7 @@
return PreservedAnalyses::all();
auto PA = PreservedAnalyses();
+ PA.preserve<DominatorTreeAnalysis>();
PA.preserve<GlobalsAA>();
return PA;
}
@@ -1798,6 +1799,7 @@
void getAnalysisUsage(AnalysisUsage &AU) const override {
AU.addRequired<TargetLibraryInfoWrapperPass>();
+ AU.addPreserved<DominatorTreeWrapperPass>();
AU.addPreserved<GlobalsAAWrapperPass>();
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47149.148029.patch
Type: text/x-patch
Size: 2304 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180522/18b8ffaf/attachment.bin>
More information about the llvm-commits
mailing list