forked from OSchip/llvm-project
ScopInfo: Ensure the RegionInfo analysis is always available
This fixes a crash that appeared when generating dotty graphs for functions without loops (for which we do not calculate polyhedral information). llvm-svn: 198364
This commit is contained in:
parent
860fa9052e
commit
9a26f2986c
|
@ -714,12 +714,12 @@ void ScopDetection::printLocations(llvm::Function &F) {
|
|||
|
||||
bool ScopDetection::runOnFunction(llvm::Function &F) {
|
||||
LI = &getAnalysis<LoopInfo>();
|
||||
RI = &getAnalysis<RegionInfo>();
|
||||
if (!DetectScopsWithoutLoops && LI->empty())
|
||||
return false;
|
||||
|
||||
AA = &getAnalysis<AliasAnalysis>();
|
||||
SE = &getAnalysis<ScalarEvolution>();
|
||||
RI = &getAnalysis<RegionInfo>();
|
||||
Region *TopRegion = RI->getTopLevelRegion();
|
||||
|
||||
releaseMemory();
|
||||
|
|
Loading…
Reference in New Issue