mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-04 21:31:03 +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) {
|
bool inSubLoop(BasicBlock *BB) {
|
||||||
assert(CurLoop->contains(BB) && "Only valid if BB is IN the loop");
|
assert(CurLoop->contains(BB) && "Only valid if BB is IN the loop");
|
||||||
for (Loop::iterator I = CurLoop->begin(), E = CurLoop->end(); I != E; ++I)
|
return LI->getLoopFor(BB) != CurLoop;
|
||||||
if ((*I)->contains(BB))
|
|
||||||
return true; // A subloop actually contains this block!
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// sink - When an instruction is found to only be used outside of the loop,
|
/// sink - When an instruction is found to only be used outside of the loop,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user