mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-26 21:20:37 +00:00
Provide fast path as Jakob suggested.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137478 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3f3570a38b
commit
2e85b1bfa7
@ -256,6 +256,13 @@ getMachineBasicBlocks(DebugLoc DL,
|
||||
if (!Scope)
|
||||
return;
|
||||
|
||||
if (Scope == CurrentFnLexicalScope) {
|
||||
for (MachineFunction::const_iterator I = MF->begin(), E = MF->end();
|
||||
I != E; ++I)
|
||||
MBBs.insert(I);
|
||||
return;
|
||||
}
|
||||
|
||||
SmallVector<InsnRange, 4> &InsnRanges = Scope->getRanges();
|
||||
for (SmallVector<InsnRange, 4>::iterator I = InsnRanges.begin(),
|
||||
E = InsnRanges.end(); I != E; ++I) {
|
||||
@ -270,6 +277,11 @@ bool LexicalScopes::dominates(DebugLoc DL, MachineBasicBlock *MBB) {
|
||||
LexicalScope *Scope = getOrCreateLexicalScope(DL);
|
||||
if (!Scope)
|
||||
return false;
|
||||
|
||||
// Current function scope covers all basic blocks in the function.
|
||||
if (Scope == CurrentFnLexicalScope && MBB->getParent() == MF)
|
||||
return true;
|
||||
|
||||
bool Result = false;
|
||||
for (MachineBasicBlock::iterator I = MBB->begin(), E = MBB->end();
|
||||
I != E; ++I) {
|
||||
|
Loading…
Reference in New Issue
Block a user