Lines Matching refs:Scope

125   DILocalScope *Scope = DL->getScope();  in findLexicalScope()  local
126 if (!Scope) in findLexicalScope()
131 Scope = Scope->getNonLexicalBlockFileScope(); in findLexicalScope()
134 auto I = InlinedLexicalScopeMap.find(std::make_pair(Scope, IA)); in findLexicalScope()
137 return findLexicalScope(Scope); in findLexicalScope()
142 LexicalScope *LexicalScopes::getOrCreateLexicalScope(const DILocalScope *Scope, in getOrCreateLexicalScope() argument
146 if (Scope->getSubprogram()->getUnit()->getEmissionKind() == in getOrCreateLexicalScope()
150 getOrCreateAbstractScope(Scope); in getOrCreateLexicalScope()
152 return getOrCreateInlinedScope(Scope, IA); in getOrCreateLexicalScope()
155 return getOrCreateRegularScope(Scope); in getOrCreateLexicalScope()
160 LexicalScopes::getOrCreateRegularScope(const DILocalScope *Scope) { in getOrCreateRegularScope() argument
161 assert(Scope && "Invalid Scope encoding!"); in getOrCreateRegularScope()
162 Scope = Scope->getNonLexicalBlockFileScope(); in getOrCreateRegularScope()
164 auto I = LexicalScopeMap.find(Scope); in getOrCreateRegularScope()
170 if (auto *Block = dyn_cast<DILexicalBlockBase>(Scope)) in getOrCreateRegularScope()
173 std::forward_as_tuple(Scope), in getOrCreateRegularScope()
174 std::forward_as_tuple(Parent, Scope, nullptr, in getOrCreateRegularScope()
178 assert(cast<DISubprogram>(Scope)->describes(&MF->getFunction())); in getOrCreateRegularScope()
188 LexicalScopes::getOrCreateInlinedScope(const DILocalScope *Scope, in getOrCreateInlinedScope() argument
190 assert(Scope && "Invalid Scope encoding!"); in getOrCreateInlinedScope()
191 Scope = Scope->getNonLexicalBlockFileScope(); in getOrCreateInlinedScope()
192 std::pair<const DILocalScope *, const DILocation *> P(Scope, InlinedAt); in getOrCreateInlinedScope()
198 if (auto *Block = dyn_cast<DILexicalBlockBase>(Scope)) in getOrCreateInlinedScope()
205 std::forward_as_tuple(Parent, Scope, InlinedAt, false)) in getOrCreateInlinedScope()
212 LexicalScopes::getOrCreateAbstractScope(const DILocalScope *Scope) { in getOrCreateAbstractScope() argument
213 assert(Scope && "Invalid Scope encoding!"); in getOrCreateAbstractScope()
214 Scope = Scope->getNonLexicalBlockFileScope(); in getOrCreateAbstractScope()
215 auto I = AbstractScopeMap.find(Scope); in getOrCreateAbstractScope()
221 if (auto *Block = dyn_cast<DILexicalBlockBase>(Scope)) in getOrCreateAbstractScope()
225 std::forward_as_tuple(Scope), in getOrCreateAbstractScope()
226 std::forward_as_tuple(Parent, Scope, in getOrCreateAbstractScope()
228 if (isa<DISubprogram>(Scope)) in getOrCreateAbstractScope()
236 void LexicalScopes::constructScopeNest(LexicalScope *Scope) { in constructScopeNest() argument
237 assert(Scope && "Unable to calculate scope dominance graph!"); in constructScopeNest()
239 WorkStack.push_back(std::make_pair(Scope, 0)); in constructScopeNest()
285 LexicalScope *Scope = getOrCreateLexicalScope(DL); in getMachineBasicBlocks() local
286 if (!Scope) in getMachineBasicBlocks()
289 if (Scope == CurrentFnLexicalScope) { in getMachineBasicBlocks()
298 SmallVectorImpl<InsnRange> &InsnRanges = Scope->getRanges(); in getMachineBasicBlocks()
308 LexicalScope *Scope = getOrCreateLexicalScope(DL); in dominates() local
309 if (!Scope) in dominates()
313 if (Scope == CurrentFnLexicalScope && MBB->getParent() == MF) in dominates()