Lines Matching refs:scope
14 // control transfers out of a particular scope. This can be
90 /// Push an entry of the given size onto this protected-scope stack.
156 EHCleanupScope *Scope =
169 return Scope->getCleanupBuffer();
216 EHCatchScope *scope =
219 return scope;
374 EHCleanupScope &Scope = cast<EHCleanupScope>(*EHStack.begin());
376 // As long as Old strictly encloses the scope's enclosing normal
380 Old.strictlyEncloses(Scope.getEnclosingNormalCleanup());
387 EHCleanupScope &Scope) {
388 assert(Scope.isNormalCleanup());
389 llvm::BasicBlock *Entry = Scope.getNormalBlock();
392 Scope.setNormalBlock(Entry);
440 // EH cleanups always occur within a terminate scope.
463 // Leave the terminate scope.
492 EHCleanupScope &scope) {
493 llvm::BasicBlock *entry = scope.getNormalBlock();
534 EHCleanupScope &Scope = cast<EHCleanupScope>(*EHStack.begin());
535 assert(Scope.getFixupDepth() <= EHStack.getNumBranchFixups());
538 bool IsActive = Scope.isActive();
540 Scope.shouldTestFlagInNormalCleanup() ? Scope.getActiveFlag() : 0;
542 Scope.shouldTestFlagInEHCleanup() ? Scope.getActiveFlag() : 0;
546 llvm::BasicBlock *EHEntry = Scope.getCachedEHDispatchBlock();
547 assert(Scope.hasEHBranches() == (EHEntry != 0));
549 EHScopeStack::stable_iterator EHParent = Scope.getEnclosingEHScope();
554 unsigned FixupDepth = Scope.getFixupDepth();
558 bool HasExistingBranches = Scope.hasBranches();
565 // end of the last cleanup, which points to the current scope. The
574 assert(!Scope.isNormalCleanup() || !HasPrebranchedFallthrough ||
575 (Scope.getNormalBlock() &&
577 == Scope.getNormalBlock()));
580 if (Scope.isNormalCleanup() &&
587 if (Scope.isNormalCleanup() && HasPrebranchedFallthrough && !IsActive) {
594 EHScope &enclosing = *EHStack.find(Scope.getEnclosingNormalCleanup());
606 llvm::BasicBlock *normalEntry = Scope.getNormalBlock();
615 destroyOptimisticNormalEntry(*this, Scope);
626 CleanupBuffer.reserve(Scope.getCleanupSize());
628 Scope.getCleanupBuffer(), Scope.getCleanupSize());
629 CleanupBuffer.set_size(Scope.getCleanupSize());
634 if (Scope.isNormalCleanup())
636 if (Scope.isEHCleanup())
640 destroyOptimisticNormalEntry(*this, Scope);
648 destroyOptimisticNormalEntry(*this, Scope);
657 llvm::BasicBlock *NormalEntry = CreateNormalEntry(*this, Scope);
685 (Scope.getEnclosingNormalCleanup() != EHStack.stable_end());
688 // - if there are branch-throughs threaded through the scope
693 if (Scope.hasBranchThroughs() ||
697 EHScope &S = *EHStack.find(Scope.getEnclosingNormalCleanup());
706 if (!Scope.hasBranchThroughs() && !HasFixups && !HasFallthrough &&
707 Scope.getNumBranchAfters() == 1) {
711 llvm::BasicBlock *BranchAfter = Scope.getBranchAfterBlock(0);
715 // - if there are branch-afters threaded through the scope
719 } else if (Scope.getNumBranchAfters() ||
744 for (unsigned I = 0, E = Scope.getNumBranchAfters(); I != E; ++I) {
745 Switch->addCase(Scope.getBranchAfterIndex(I),
746 Scope.getBranchAfterBlock(I));
858 // If we're not in an active normal cleanup scope, or if the
859 // destination scope is within the innermost active normal cleanup
860 // scope, we don't need to worry about fixups.
871 /// the current cleanup-protected scope. The target scope may not yet
889 // If we're not in an active normal cleanup scope, or if the
890 // destination scope is within the innermost active normal cleanup
891 // scope, we don't need to worry about fixups.
898 // If we can't resolve the destination cleanup scope, just add this
899 // to the current cleanup scope as a branch fixup.
911 // Otherwise, thread through all the normal cleanups in scope.
919 EHCleanupScope &Scope =
921 BI->setSuccessor(0, CreateNormalEntry(*this, Scope));
929 EHCleanupScope &Scope = cast<EHCleanupScope>(*EHStack.find(I));
930 assert(Scope.isNormalCleanup());
931 I = Scope.getEnclosingNormalCleanup();
936 Scope.addBranchAfter(Index, Dest.getBlock());
940 // Otherwise, tell the scope that there's a jump propoagating
943 if (!Scope.addBranchThrough(Dest.getBlock()))
981 EHScope &scope = *EHStack.find(i);
982 if (scope.hasEHBranches())
985 i = scope.getEnclosingEHScope();
1004 EHCleanupScope &Scope = cast<EHCleanupScope>(*CGF.EHStack.find(C));
1014 if (Scope.isNormalCleanup() && IsUsedAsNormalCleanup(CGF.EHStack, C)) {
1015 Scope.setTestFlagInNormalCleanup();
1020 if (Scope.isEHCleanup() && IsUsedAsEHCleanup(CGF.EHStack, C)) {
1021 Scope.setTestFlagInEHCleanup();
1028 llvm::AllocaInst *Var = Scope.getActiveFlag();
1031 Scope.setActiveFlag(Var);
1044 EHCleanupScope &Scope = cast<EHCleanupScope>(*EHStack.find(C));
1045 assert(!Scope.isActive() && "double activation");
1049 Scope.setActive(true);
1055 EHCleanupScope &Scope = cast<EHCleanupScope>(*EHStack.find(C));
1056 assert(Scope.isActive() && "double deactivation");
1071 Scope.setActive(false);