mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 04:30:23 +00:00
make inSubLoop much more efficient.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122703 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
83fc584ea8
commit
81a866d615
@ -131,10 +131,7 @@ namespace {
|
||||
///
|
||||
bool inSubLoop(BasicBlock *BB) {
|
||||
assert(CurLoop->contains(BB) && "Only valid if BB is IN the loop");
|
||||
for (Loop::iterator I = CurLoop->begin(), E = CurLoop->end(); I != E; ++I)
|
||||
if ((*I)->contains(BB))
|
||||
return true; // A subloop actually contains this block!
|
||||
return false;
|
||||
return LI->getLoopFor(BB) != CurLoop;
|
||||
}
|
||||
|
||||
/// sink - When an instruction is found to only be used outside of the loop,
|
||||
|
Loading…
Reference in New Issue
Block a user