llvm.org GIT mirror llvm / 59b282a
Do not call Loop::getName on possibly dead loops This fixes PR34832. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@314938 91177308-0d34-0410-b5e6-96231b3b80d8 Sanjoy Das 1 year, 11 months ago
2 changed file(s) with 12 addition(s) and 10 deletion(s). Raw diff Collapse all Expand all
5555 // analysis manager's cache. So we just walk the keys and forcibly clear
5656 // those results. Note that the order doesn't matter here as this will just
5757 // directly destroy the results without calling methods on them.
58 for (Loop *L : PreOrderLoops)
59 InnerAM->clear(*L, L->getName());
58 for (Loop *L : PreOrderLoops) {
59 // NB! `L` may not be in a good enough state to run Loop::getName.
60 InnerAM->clear(*L, "");
61 }
6062
6163 // We also need to null out the inner AM so that when the object gets
6264 // destroyed as invalid we don't try to clear the inner AM again. At that
5656 ; CHECK-LOOP-INV-NEXT: Finished {{.*}}Loop pass manager run.
5757 ; CHECK-LOOP-INV-NEXT: Running pass: InvalidateAnalysisPass<{{.*}}LoopAnalysis
5858 ; CHECK-LOOP-INV-NEXT: Invalidating all non-preserved analyses
59 ; CHECK-LOOP-INV-NEXT: Clearing all analysis results for: l0.header
59 ; CHECK-LOOP-INV-NEXT: Clearing all analysis results for:
6060 ; CHECK-LOOP-INV-NEXT: Invalidating analysis: LoopAnalysis
6161 ; CHECK-LOOP-INV-NEXT: Invalidating analysis: ScalarEvolutionAnalysis
6262 ; CHECK-LOOP-INV-NEXT: Invalidating analysis: InnerAnalysisManagerProxy<{{.*}}Loop
8383 ; CHECK-SCEV-INV-NEXT: Finished {{.*}}Loop pass manager run.
8484 ; CHECK-SCEV-INV-NEXT: Running pass: InvalidateAnalysisPass<{{.*}}ScalarEvolutionAnalysis
8585 ; CHECK-SCEV-INV-NEXT: Invalidating all non-preserved analyses
86 ; CHECK-SCEV-INV-NEXT: Clearing all analysis results for: l0.header
86 ; CHECK-SCEV-INV-NEXT: Clearing all analysis results for:
8787 ; CHECK-SCEV-INV-NEXT: Invalidating analysis: ScalarEvolutionAnalysis
8888 ; CHECK-SCEV-INV-NEXT: Invalidating analysis: InnerAnalysisManagerProxy<{{.*}}Loop
8989 ; CHECK-SCEV-INV-NEXT: Running pass: FunctionToLoopPassAdaptor<{{.*}}> on one_loop
123123 ; CHECK-LOOP-INV: Finished {{.*}}Loop pass manager run.
124124 ; CHECK-LOOP-INV-NEXT: Running pass: InvalidateAnalysisPass<{{.*}}LoopAnalysis
125125 ; CHECK-LOOP-INV-NEXT: Invalidating all non-preserved analyses
126 ; CHECK-LOOP-INV-NEXT: Clearing all analysis results for: l.0.header
127 ; CHECK-LOOP-INV-NEXT: Clearing all analysis results for: l.0.0.header
126 ; CHECK-LOOP-INV-NEXT: Clearing all analysis results for:
127 ; CHECK-LOOP-INV-NEXT: Clearing all analysis results for:
128128 ; CHECK-LOOP-INV-NEXT: Invalidating analysis: LoopAnalysis
129129 ; CHECK-LOOP-INV-NEXT: Invalidating analysis: ScalarEvolutionAnalysis
130130 ; CHECK-LOOP-INV-NEXT: Invalidating analysis: InnerAnalysisManagerProxy<{{.*}}Loop
157157 ; CHECK-SCEV-INV: Finished {{.*}}Loop pass manager run.
158158 ; CHECK-SCEV-INV-NEXT: Running pass: InvalidateAnalysisPass<{{.*}}ScalarEvolutionAnalysis
159159 ; CHECK-SCEV-INV-NEXT: Invalidating all non-preserved analyses
160 ; CHECK-SCEV-INV-NEXT: Clearing all analysis results for: l.0.header
161 ; CHECK-SCEV-INV-NEXT: Clearing all analysis results for: l.0.0.header
160 ; CHECK-SCEV-INV-NEXT: Clearing all analysis results for:
161 ; CHECK-SCEV-INV-NEXT: Clearing all analysis results for:
162162 ; CHECK-SCEV-INV-NEXT: Invalidating analysis: ScalarEvolutionAnalysis
163163 ; CHECK-SCEV-INV-NEXT: Invalidating analysis: InnerAnalysisManagerProxy<{{.*}}Loop
164164 ; CHECK-SCEV-INV-NEXT: Running pass: FunctionToLoopPassAdaptor<{{.*}}> on nested_loops
205205 ; CHECK-LOOP-INV-NEXT: Finished {{.*}}Loop pass manager run.
206206 ; CHECK-LOOP-INV-NEXT: Running pass: InvalidateAnalysisPass<{{.*}}LoopAnalysis
207207 ; CHECK-LOOP-INV-NEXT: Invalidating all non-preserved analyses
208 ; CHECK-LOOP-INV-NEXT: Clearing all analysis results for: l0.header
208 ; CHECK-LOOP-INV-NEXT: Clearing all analysis results for:
209209 ; CHECK-LOOP-INV-NEXT: Invalidating analysis: LoopAnalysis
210210 ; CHECK-LOOP-INV-NEXT: Invalidating analysis: ScalarEvolutionAnalysis
211211 ; CHECK-LOOP-INV-NEXT: Invalidating analysis: InnerAnalysisManagerProxy<{{.*}}Loop
232232 ; CHECK-SCEV-INV-NEXT: Finished {{.*}}Loop pass manager run.
233233 ; CHECK-SCEV-INV-NEXT: Running pass: InvalidateAnalysisPass<{{.*}}ScalarEvolutionAnalysis
234234 ; CHECK-SCEV-INV-NEXT: Invalidating all non-preserved analyses
235 ; CHECK-SCEV-INV-NEXT: Clearing all analysis results for: l0.header
235 ; CHECK-SCEV-INV-NEXT: Clearing all analysis results for:
236236 ; CHECK-SCEV-INV-NEXT: Invalidating analysis: ScalarEvolutionAnalysis
237237 ; CHECK-SCEV-INV-NEXT: Invalidating analysis: InnerAnalysisManagerProxy<{{.*}}Loop
238238 ; CHECK-SCEV-INV-NEXT: Running pass: FunctionToLoopPassAdaptor<{{.*}}> on dead_loop