Please use GitHub pull requests for new patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
llvm/lib/Transforms/Scalar/LoopFlatten.cpp
Show First 20 Lines • Show All 780 Lines • ▼ Show 20 Lines | if (FI.Widened) | ||||
"flatten.trunciv"); | "flatten.trunciv"); | ||||
LLVM_DEBUG(dbgs() << "Replacing: "; V->dump(); dbgs() << "with: "; | LLVM_DEBUG(dbgs() << "Replacing: "; V->dump(); dbgs() << "with: "; | ||||
OuterValue->dump()); | OuterValue->dump()); | ||||
V->replaceAllUsesWith(OuterValue); | V->replaceAllUsesWith(OuterValue); | ||||
} | } | ||||
// Tell LoopInfo, SCEV and the pass manager that the inner loop has been | // Tell LoopInfo, SCEV and the pass manager that the inner loop has been | ||||
// deleted, and any information that have about the outer loop invalidated. | // deleted, and invalidate any outer loop information. | ||||
SE->forgetLoop(FI.OuterLoop); | SE->forgetLoop(FI.OuterLoop); | ||||
SE->forgetLoop(FI.InnerLoop); | |||||
SE->forgetBlockAndLoopDispositions(); | SE->forgetBlockAndLoopDispositions(); | ||||
if (U) | if (U) | ||||
U->markLoopAsDeleted(*FI.InnerLoop, FI.InnerLoop->getName()); | U->markLoopAsDeleted(*FI.InnerLoop, FI.InnerLoop->getName()); | ||||
LI->erase(FI.InnerLoop); | LI->erase(FI.InnerLoop); | ||||
// Increment statistic value. | // Increment statistic value. | ||||
NumFlattened++; | NumFlattened++; | ||||
▲ Show 20 Lines • Show All 224 Lines • Show Last 20 Lines |