[AMDGPU] Add divergence analysis as a dependency for ISel
authorStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>
Mon, 21 May 2018 18:18:52 +0000 (18:18 +0000)
committerStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>
Mon, 21 May 2018 18:18:52 +0000 (18:18 +0000)
AMDGPUDAGToDAGISel adds DivergenceAnalysis in getAnalysisUsage
but does not list it in pass dependencies which may lead to
crash.

Differential Revision: https://reviews.llvm.org/D47151

llvm-svn: 332862

llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp

index e0114b8..0a35661 100644 (file)
@@ -241,6 +241,7 @@ public:
 INITIALIZE_PASS_BEGIN(AMDGPUDAGToDAGISel, "isel",
                       "AMDGPU DAG->DAG Pattern Instruction Selection", false, false)
 INITIALIZE_PASS_DEPENDENCY(AMDGPUArgumentUsageInfo)
+INITIALIZE_PASS_DEPENDENCY(DivergenceAnalysis)
 INITIALIZE_PASS_END(AMDGPUDAGToDAGISel, "isel",
                     "AMDGPU DAG->DAG Pattern Instruction Selection", false, false)