Please use GitHub pull requests for new patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
lib/Transforms/Scalar/LoopRotation.cpp
Show First 20 Lines • Show All 628 Lines • ▼ Show 20 Lines | bool LoopRotate::processLoop(Loop *L) { | ||||
assert((!MadeChange || L->isLoopExiting(L->getLoopLatch())) && | assert((!MadeChange || L->isLoopExiting(L->getLoopLatch())) && | ||||
"Loop latch should be exiting after loop-rotate."); | "Loop latch should be exiting after loop-rotate."); | ||||
// Restore the loop metadata. | // Restore the loop metadata. | ||||
// NB! We presume LoopRotation DOESN'T ADD its own metadata. | // NB! We presume LoopRotation DOESN'T ADD its own metadata. | ||||
if ((MadeChange || SimplifiedLatch) && LoopMD) | if ((MadeChange || SimplifiedLatch) && LoopMD) | ||||
L->setLoopID(LoopMD); | L->setLoopID(LoopMD); | ||||
return MadeChange; | return MadeChange || SimplifiedLatch; | ||||
} | } | ||||
LoopRotatePass::LoopRotatePass(bool EnableHeaderDuplication) | LoopRotatePass::LoopRotatePass(bool EnableHeaderDuplication) | ||||
: EnableHeaderDuplication(EnableHeaderDuplication) {} | : EnableHeaderDuplication(EnableHeaderDuplication) {} | ||||
PreservedAnalyses LoopRotatePass::run(Loop &L, LoopAnalysisManager &AM, | PreservedAnalyses LoopRotatePass::run(Loop &L, LoopAnalysisManager &AM, | ||||
LoopStandardAnalysisResults &AR, | LoopStandardAnalysisResults &AR, | ||||
LPMUpdater &) { | LPMUpdater &) { | ||||
▲ Show 20 Lines • Show All 66 Lines • Show Last 20 Lines |