Small fixes for "[LoopInfo] empty() -> isInnermost(), add isOutermost()"

This commit is contained in:
Stefanos Baziotis 2020-09-22 23:59:34 +03:00
parent 90242caca2
commit a7873e5abc
4 changed files with 5 additions and 5 deletions

View File

@ -146,7 +146,7 @@ bool FalkorMarkStridedAccesses::run() {
bool FalkorMarkStridedAccesses::runOnLoop(Loop &L) {
// Only mark strided loads in the inner-most loop
if (!L.empty())
if (!L.isInnermost())
return false;
bool MadeChange = false;
@ -830,7 +830,7 @@ bool FalkorHWPFFix::runOnMachineFunction(MachineFunction &Fn) {
for (MachineLoop *I : LI)
for (auto L = df_begin(I), LE = df_end(I); L != LE; ++L)
// Only process inner-loops
if (L->empty())
if (L->isInnermost())
runOnLoop(**L, Fn);
return Modified;

View File

@ -1784,7 +1784,7 @@ bool ARMTTIImpl::preferPredicateOverEpilogue(Loop *L, LoopInfo *LI,
return false;
}
assert(L->empty() && "preferPredicateOverEpilogue: inner-loop expected");
assert(L->isInnermost() && "preferPredicateOverEpilogue: inner-loop expected");
HardwareLoopInfo HWLoopInfo(L);
if (!HWLoopInfo.canAnalyze(*LI)) {

View File

@ -87,7 +87,7 @@ void HexagonTTIImpl::getPeelingPreferences(Loop *L, ScalarEvolution &SE,
TTI::PeelingPreferences &PP) {
BaseT::getPeelingPreferences(L, SE, PP);
// Only try to peel innermost loops with small runtime trip counts.
if (L && L->empty() && canPeel(L) &&
if (L && L->isInnermost() && canPeel(L) &&
SE.getSmallConstantTripCount(L) == 0 &&
SE.getSmallConstantMaxTripCount(L) > 0 &&
SE.getSmallConstantMaxTripCount(L) <= 5) {

View File

@ -795,7 +795,7 @@ bool PPCLoopInstrFormPrep::runOnLoop(Loop *L) {
bool MadeChange = false;
// Only prep. the inner-most loop
if (!L->empty())
if (!L->isInnermost())
return MadeChange;
// Return if already done enough preparation.