forked from OSchip/llvm-project
[LoopUnrollRuntime] Remove unnecessary pointer BECount check (NFC)
BECounts are guaranteed to be integers nowadays.
This commit is contained in:
parent
67704801c6
commit
84b978da3b
|
@ -623,15 +623,13 @@ bool llvm::UnrollRuntimeLoopRemainder(
|
|||
if (!SE)
|
||||
return false;
|
||||
|
||||
// Only unroll loops with a computable trip count, and the trip count needs
|
||||
// to be an int value (allowing a pointer type is a TODO item).
|
||||
// Only unroll loops with a computable trip count.
|
||||
// We calculate the backedge count by using getExitCount on the Latch block,
|
||||
// which is proven to be the only exiting block in this loop. This is same as
|
||||
// calculating getBackedgeTakenCount on the loop (which computes SCEV for all
|
||||
// exiting blocks).
|
||||
const SCEV *BECountSC = SE->getExitCount(L, Latch);
|
||||
if (isa<SCEVCouldNotCompute>(BECountSC) ||
|
||||
!BECountSC->getType()->isIntegerTy()) {
|
||||
if (isa<SCEVCouldNotCompute>(BECountSC)) {
|
||||
LLVM_DEBUG(dbgs() << "Could not compute exit block SCEV\n");
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue