Change LoopInfo::empty to isInnermost after D82895
authorFangrui Song <i@maskray.me>
Tue, 22 Sep 2020 21:07:39 +0000 (14:07 -0700)
committerFangrui Song <i@maskray.me>
Tue, 22 Sep 2020 21:07:40 +0000 (14:07 -0700)
llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp

index fb954e6..78dc20b 100644 (file)
@@ -232,7 +232,7 @@ void AMDGPUTTIImpl::getUnrollingPreferences(Loop *L, ScalarEvolution &SE,
 
     // If we got a GEP in a small BB from inner loop then increase max trip
     // count to analyze for better estimation cost in unroll
-    if (L->empty() && BB->size() < UnrollMaxBlockToAnalyze)
+    if (L->isInnermost() && BB->size() < UnrollMaxBlockToAnalyze)
       UP.MaxIterationsCountToAnalyze = 32;
   }
 }