HomePhabricator

[NPM] Properly reset parent loop after loop passes

Authored by TaWeiTu on Feb 18 2021, 10:50 AM.

Description

[NPM] Properly reset parent loop after loop passes

This fixes https://bugs.llvm.org/show_bug.cgi?id=49185

When NDEBUG is not set, LPMUpdater checks if the added loops have the same parent loop as the current one in addSiblingLoops.
If multiple loop passes are executed through LoopPassManager, U.ParentL will be the same across all passes.
However, the parent loop might change after running a loop pass, resulting in assertion failures in subsequent passes.

This patch resets U.ParentL after running individual loop passes in LoopPassManager.

Reviewed By: asbirlea, ychen

Differential Revision: https://reviews.llvm.org/D96727

Details

Committed
TaWeiTuFeb 18 2021, 10:50 AM
Reviewer
asbirlea
Differential Revision
D96727: [NPM] Properly reset parent loop after loop passes
Parents
rGa77e91801604: libcxx: use early returns
Branches
Unknown
Tags
Unknown