mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
LoopDeletion depends on loops having dedicated exits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86180 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f4e82d1f2e
commit
32cc5f47fa
@ -115,6 +115,10 @@ bool LoopDeletion::runOnLoop(Loop* L, LPPassManager& LPM) {
|
||||
if (!preheader)
|
||||
return false;
|
||||
|
||||
// If LoopSimplify form is not available, stay out of trouble.
|
||||
if (!L->hasDedicatedExits())
|
||||
return false;
|
||||
|
||||
// We can't remove loops that contain subloops. If the subloops were dead,
|
||||
// they would already have been removed in earlier executions of this pass.
|
||||
if (L->begin() != L->end())
|
||||
|
Loading…
Reference in New Issue
Block a user