The test case requires the peeled loop to be forgotten after peeling,
even though it does not have a parent. When called via the unroller,
SE->forgetTopmostLoop is also called, so the test case would also pass
without any SCEV invalidation, but peelLoop is exposed as utility
function. Also, in the test case, simplifyLoop will make changes,
removing the loop from SCEV, but it is better to not rely on this
behavior.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
- Build Status
Buildable 28107 Build 28106: arc lint + arc unit
Event Timeline
Comment Actions
LGTM, but use forgetTopmostLoop instead.
llvm/lib/Transforms/Utils/LoopUnrollPeel.cpp | ||
---|---|---|
668 | The correct way of doing this is L->forgetTopmostLoop(). Please us it to avoid potential sneaky bugs with containing loops in the future. |
Comment Actions
Use forgetTopmostLoop and get rid of getting the parent loop, as it is not
required any longer.
The correct way of doing this is L->forgetTopmostLoop(). Please us it to avoid potential sneaky bugs with containing loops in the future.