Home | History | Annotate | Download | only in CodeGen

Lines Matching refs:Scope

13 // control transfers out of a particular scope.  This can be
105 /// Push an entry of the given size onto this protected-scope stack.
183 EHCleanupScope *Scope =
195 Scope->setLifetimeMarker();
197 // With Windows -EHa, Invoke llvm.seh.scope.begin() for EHCleanup
202 return Scope->getCleanupBuffer();
249 EHCatchScope *scope =
252 return scope;
427 EHCleanupScope &Scope = cast<EHCleanupScope>(*EHStack.begin());
428 HadBranches |= Scope.hasBranches();
430 // As long as Old strictly encloses the scope's enclosing normal
434 Old.strictlyEncloses(Scope.getEnclosingNormalCleanup());
509 EHCleanupScope &Scope) {
510 assert(Scope.isNormalCleanup());
511 llvm::BasicBlock *Entry = Scope.getNormalBlock();
514 Scope.setNormalBlock(Entry);
608 EHCleanupScope &scope) {
609 llvm::BasicBlock *entry = scope.getNormalBlock();
650 EHCleanupScope &Scope = cast<EHCleanupScope>(*EHStack.begin());
651 assert(Scope.getFixupDepth() <= EHStack.getNumBranchFixups());
654 bool IsActive = Scope.isActive();
656 Scope.shouldTestFlagInNormalCleanup() ? Scope.getActiveFlag()
659 Scope.shouldTestFlagInEHCleanup() ? Scope.getActiveFlag()
664 llvm::BasicBlock *EHEntry = Scope.getCachedEHDispatchBlock();
665 assert(Scope.hasEHBranches() == (EHEntry != nullptr));
667 EHScopeStack::stable_iterator EHParent = Scope.getEnclosingEHScope();
672 unsigned FixupDepth = Scope.getFixupDepth();
676 bool HasExistingBranches = Scope.hasBranches();
683 // end of the last cleanup, which points to the current scope. The
692 assert(!Scope.isNormalCleanup() || !HasPrebranchedFallthrough ||
693 (Scope.getNormalBlock() &&
695 == Scope.getNormalBlock()));
698 if (Scope.isNormalCleanup() &&
705 if (Scope.isNormalCleanup() && HasPrebranchedFallthrough && !IsActive) {
712 EHScope &enclosing = *EHStack.find(Scope.getEnclosingNormalCleanup());
724 llvm::BasicBlock *normalEntry = Scope.getNormalBlock();
733 destroyOptimisticNormalEntry(*this, Scope);
745 auto *CleanupSource = reinterpret_cast<char *>(Scope.getCleanupBuffer());
749 size_t CleanupSize = Scope.getCleanupSize();
762 if (Scope.isNormalCleanup())
764 if (Scope.isEHCleanup())
767 // Under -EHa, invoke seh.scope.end() to mark scope end before dtor
768 bool IsEHa = getLangOpts().EHAsynch && !Scope.isLifetimeMarker();
771 // Mark CPP scope end for passed-by-value Arg temp
777 destroyOptimisticNormalEntry(*this, Scope);
785 // mark SEH scope end for fall-through flow
793 destroyOptimisticNormalEntry(*this, Scope);
802 llvm::BasicBlock *NormalEntry = CreateNormalEntry(*this, Scope);
826 // intercept normal cleanup to mark SEH scope end
838 (Scope.getEnclosingNormalCleanup() != EHStack.stable_end());
841 // - if there are branch-throughs threaded through the scope
846 if (Scope.hasBranchThroughs() ||
850 EHScope &S = *EHStack.find(Scope.getEnclosingNormalCleanup());
859 if (!Scope.hasBranchThroughs() && !HasFixups && !HasFallthrough &&
860 Scope.getNumBranchAfters() == 1) {
872 llvm::BasicBlock *BranchAfter = Scope.getBranchAfterBlock(0);
876 // - if there are branch-afters threaded through the scope
880 } else if (Scope.getNumBranchAfters() ||
909 for (unsigned I = 0, E = Scope.getNumBranchAfters(); I != E; ++I) {
910 Switch->addCase(Scope.getBranchAfterIndex(I),
911 Scope.getBranchAfterBlock(I));
1003 // Push a terminate scope or cleanupendpad scope around the potentially
1037 // Leave the terminate scope.
1058 // If we're not in an active normal cleanup scope, or if the
1059 // destination scope is within the innermost active normal cleanup
1060 // scope, we don't need to worry about fixups.
1071 /// the current cleanup-protected scope. The target scope may not yet
1089 // If we're not in an active normal cleanup scope, or if the
1090 // destination scope is within the innermost active normal cleanup
1091 // scope, we don't need to worry about fixups.
1098 // If we can't resolve the destination cleanup scope, just add this
1099 // to the current cleanup scope as a branch fixup.
1111 // Otherwise, thread through all the normal cleanups in scope.
1119 EHCleanupScope &Scope =
1121 BI->setSuccessor(0, CreateNormalEntry(*this, Scope));
1129 EHCleanupScope &Scope = cast<EHCleanupScope>(*EHStack.find(I));
1130 assert(Scope.isNormalCleanup());
1131 I = Scope.getEnclosingNormalCleanup();
1136 Scope.addBranchAfter(Index, Dest.getBlock());
1140 // Otherwise, tell the scope that there's a jump propagating
1143 if (!Scope.addBranchThrough(Dest.getBlock()))
1181 EHScope &scope = *EHStack.find(i);
1182 if (scope.hasEHBranches())
1185 i = scope.getEnclosingEHScope();
1205 EHCleanupScope &Scope = cast<EHCleanupScope>(*CGF.EHStack.find(C));
1218 if (Scope.isNormalCleanup() &&
1220 Scope.setTestFlagInNormalCleanup();
1225 if (Scope.isEHCleanup() &&
1227 Scope.setTestFlagInEHCleanup();
1234 Address var = Scope.getActiveFlag();
1238 Scope.setActiveFlag(var);
1262 EHCleanupScope &Scope = cast<EHCleanupScope>(*EHStack.find(C));
1263 assert(!Scope.isActive() && "double activation");
1267 Scope.setActive(true);
1274 EHCleanupScope &Scope = cast<EHCleanupScope>(*EHStack.find(C));
1275 assert(Scope.isActive() && "double deactivation");
1283 if (!Scope.isNormalCleanup() && getLangOpts().EHAsynch) {
1298 Scope.setActive(false);
1331 // Invoke a llvm.seh.scope.begin at the beginning of a CPP scope for -EHa
1337 CGM.CreateRuntimeFunction(FTy, "llvm.seh.scope.begin");
1341 // Invoke a llvm.seh.scope.end at the end of a CPP scope for -EHa
1342 // llvm.seh.scope.end is emitted before popCleanup, so it's "invoked"
1348 CGM.CreateRuntimeFunction(FTy, "llvm.seh.scope.end");
1352 // Invoke a llvm.seh.try.begin at the beginning of a SEH scope for -EHa
1362 // Invoke a llvm.seh.try.end at the end of a SEH scope for -EHa