Home
last modified time | relevance | path

Searched refs:VD (Results 1 – 25 of 213) sorted by relevance

123456789

/openbsd/src/gnu/llvm/llvm/lib/Transforms/Utils/
DPredicateInfo.cpp152 std::pair<BasicBlock *, BasicBlock *> getBlockEdge(const ValueDFS &VD) const { in getBlockEdge()
153 if (!VD.Def && VD.U) { in getBlockEdge()
154 auto *PHI = cast<PHINode>(VD.U->getUser()); in getBlockEdge()
155 return std::make_pair(PHI->getIncomingBlock(*VD.U), PHI->getParent()); in getBlockEdge()
158 return ::getBlockEdge(VD.PInfo); in getBlockEdge()
195 Value *getMiddleDef(const ValueDFS &VD) const { in getMiddleDef()
196 if (VD.Def) in getMiddleDef()
197 return VD.Def; in getMiddleDef()
204 if (!VD.U) { in getMiddleDef()
205 assert(VD.PInfo && in getMiddleDef()
[all …]
/openbsd/src/gnu/llvm/clang/lib/StaticAnalyzer/Checkers/
DDeadStoresChecker.cpp265 void CheckVarDecl(const VarDecl *VD, const Expr *Ex, const Expr *Val, in CheckVarDecl() argument
269 if (!VD->hasLocalStorage()) in CheckVarDecl()
273 if (VD->getType()->getAs<ReferenceType>()) in CheckVarDecl()
276 if (!isLive(Live, VD) && in CheckVarDecl()
277 !(VD->hasAttr<UnusedAttr>() || VD->hasAttr<BlocksAttr>() || in CheckVarDecl()
278 VD->hasAttr<ObjCPreciseLifetimeAttr>())) { in CheckVarDecl()
282 Report(VD, dsk, ExLoc, Val->getSourceRange()); in CheckVarDecl()
288 if (const VarDecl *VD = dyn_cast<VarDecl>(DR->getDecl())) in CheckDeclRef() local
289 CheckVarDecl(VD, DR, Val, dsk, Live); in CheckDeclRef()
292 bool isIncrement(VarDecl *VD, const BinaryOperator* B) { in isIncrement() argument
[all …]
DUndefCapturedBlockVarChecker.cpp38 const VarDecl *VD) { in FindBlockDeclRefExpr() argument
40 if (BR->getDecl() == VD) in FindBlockDeclRefExpr()
45 if (const DeclRefExpr *BR = FindBlockDeclRefExpr(Child, VD)) in FindBlockDeclRefExpr()
67 const VarDecl *VD = VR->getDecl(); in checkPostStmt() local
69 if (VD->hasAttr<BlocksAttr>() || !VD->hasLocalStorage()) in checkPostStmt()
84 os << "Variable '" << VD->getName() in checkPostStmt()
88 if (const Expr *Ex = FindBlockDeclRefExpr(BE->getBody(), VD)) in checkPostStmt()
DCastToStructChecker.cpp78 const ValueDecl *VD = nullptr; in VisitCastExpr() local
80 VD = SE->getDecl(); in VisitCastExpr()
82 VD = SE->getMemberDecl(); in VisitCastExpr()
83 if (!VD || VD->getType()->isReferenceType()) in VisitCastExpr()
/openbsd/src/gnu/llvm/clang/lib/Sema/
DSemaCUDA.cpp558 bool IsDependentVar(VarDecl *VD) { in IsDependentVar() argument
559 if (VD->getType()->isDependentType()) in IsDependentVar()
561 if (const auto *Init = VD->getInit()) in IsDependentVar()
575 bool HasAllowedCUDADeviceStaticInitializer(Sema &S, VarDecl *VD, in HasAllowedCUDADeviceStaticInitializer() argument
577 assert(!VD->isInvalidDecl() && VD->hasGlobalStorage()); in HasAllowedCUDADeviceStaticInitializer()
578 assert(!IsDependentVar(VD) && "do not check dependent var"); in HasAllowedCUDADeviceStaticInitializer()
579 const Expr *Init = VD->getInit(); in HasAllowedCUDADeviceStaticInitializer()
584 return S.isEmptyCudaConstructor(VD->getLocation(), CE->getConstructor()); in HasAllowedCUDADeviceStaticInitializer()
593 VD->getType()->isReferenceType()); in HasAllowedCUDADeviceStaticInitializer()
595 auto HasEmptyDtor = [&](VarDecl *VD) { in HasAllowedCUDADeviceStaticInitializer() argument
[all …]
DSema.cpp678 if (const auto *VD = dyn_cast<VarDecl>(DRE->getDecl())) { in ImpCastExprToType() local
679 if (VD->getStorageClass() == SC_Register) { in ImpCastExprToType()
748 if (const VarDecl *VD = dyn_cast<VarDecl>(D)) { in ShouldRemoveFromUnused() local
754 if (VD->isReferenced() && in ShouldRemoveFromUnused()
755 VD->mightBeUsableInConstantExpressions(SemaRef->Context)) in ShouldRemoveFromUnused()
758 if (VarTemplateDecl *Template = VD->getDescribedVarTemplate()) in ShouldRemoveFromUnused()
767 const VarDecl *DeclToCheck = VD->getDefinition(); in ShouldRemoveFromUnused()
773 DeclToCheck = VD->getMostRecentDecl(); in ShouldRemoveFromUnused()
774 if (DeclToCheck != VD) in ShouldRemoveFromUnused()
789 bool Sema::isExternalWithNoLinkageType(ValueDecl *VD) { in isExternalWithNoLinkageType() argument
[all …]
DSemaOpenMP.cpp209 VarDecl *VD = nullptr; member
211 VarDecl *VD) in ImplicitDefaultFDInfoTy()
212 : FD(FD), StackLevel(StackLevel), VD(VD) {} in ImplicitDefaultFDInfoTy()
581 bool isTaskgroupReductionRef(const ValueDecl *VD, unsigned Level) const { in isTaskgroupReductionRef() argument
584 ->getDecl() == VD; in isTaskgroupReductionRef()
990 const ValueDecl *VD, bool CurrentRegionOnly, in checkMappableExprComponentListsForDecl() argument
1009 auto MI = SI->MappedExprComponents.find(VD); in checkMappableExprComponentListsForDecl()
1022 const ValueDecl *VD, unsigned Level, in checkMappableExprComponentListsForDeclAtLevel() argument
1031 auto MI = StackElem.MappedExprComponents.find(VD); in checkMappableExprComponentListsForDeclAtLevel()
1043 const ValueDecl *VD, in addMappableExpressionComponents() argument
[all …]
DScope.cpp131 void Scope::updateNRVOCandidate(VarDecl *VD) { in updateNRVOCandidate() argument
132 auto UpdateReturnSlotsInScopeForVD = [VD](Scope *S) -> bool { in updateNRVOCandidate()
133 bool IsReturnSlotFound = S->ReturnSlots.contains(VD); in updateNRVOCandidate()
141 S->ReturnSlots.insert(VD); in updateNRVOCandidate()
157 NRVO = CanBePutInReturnSlot ? VD : nullptr; in updateNRVOCandidate()
/openbsd/src/gnu/llvm/clang/lib/Analysis/
DUnsafeBufferUsage.cpp400 bool hasUnclaimedUses(const VarDecl *VD) const { in hasUnclaimedUses()
402 return any_of(*Uses, [VD](const DeclRefExpr *DRE) { in hasUnclaimedUses()
403 return DRE->getDecl()->getCanonicalDecl() == VD->getCanonicalDecl(); in hasUnclaimedUses()
409 if (const auto *VD = dyn_cast<VarDecl>(D)) { in discoverDecl() local
415 Defs[VD] = DS; in discoverDecl()
420 const DeclStmt *lookupDecl(const VarDecl *VD) const { in lookupDecl()
421 auto It = Defs.find(VD); in lookupDecl()
453 void set(const VarDecl *VD, Kind K) { in set() argument
454 Map[VD] = K; in set()
457 Kind lookup(const VarDecl *VD) const { in lookup()
[all …]
DUninitializedValues.cpp251 if (const auto *VD = dyn_cast<VarDecl>(DRE->getDecl())) in findVar() local
252 if (isTrackedVar(VD, DC)) in findVar()
253 return FindVarResult(VD, DRE); in findVar()
276 bool isTrackedVar(const VarDecl *VD) const { in isTrackedVar()
277 return ::isTrackedVar(VD, DC); in isTrackedVar()
300 const auto *VD = dyn_cast<VarDecl>(DRE->getDecl()); in get() local
301 if (!VD || !isTrackedVar(VD)) in get()
310 static const DeclRefExpr *getSelfInitExpr(VarDecl *VD) { in getSelfInitExpr() argument
311 if (VD->getType()->isRecordType()) in getSelfInitExpr()
313 if (Expr *Init = VD->getInit()) { in getSelfInitExpr()
[all …]
DThreadSafetyCommon.cpp219 til::LiteralPtr *SExprBuilder::createVariable(const VarDecl *VD) { in createVariable() argument
220 return new (Arena) til::LiteralPtr(VD); in createVariable()
308 const auto *VD = cast<ValueDecl>(DRE->getDecl()->getCanonicalDecl()); in translateDeclRefExpr() local
311 if (const auto *PV = dyn_cast<ParmVarDecl>(VD)) { in translateDeclRefExpr()
326 VD = isa<FunctionDecl>(D) in translateDeclRefExpr()
332 return new (Arena) til::LiteralPtr(VD); in translateDeclRefExpr()
361 auto *VD = getValueDeclFromSExpr(E); in hasAnyPointerType() local
362 if (VD && VD->getType()->isAnyPointerType()) in hasAnyPointerType()
389 if (const auto *VD = dyn_cast<CXXMethodDecl>(D)) in translateMemberExpr() local
390 D = getFirstVirtualDecl(VD); in translateMemberExpr()
[all …]
DLiveVariables.cpp255 if (const VarDecl *VD = dyn_cast<VarDecl>(DS->getSingleDecl())) { in Visit() local
256 for (const VariableArrayType* VA = FindVA(VD->getType()); in Visit()
328 static bool writeShouldKill(const VarDecl *VD) { in writeShouldKill() argument
329 return VD && !VD->getType()->isReferenceType() && in writeShouldKill()
330 !isAlwaysAlive(VD); in writeShouldKill()
358 } else if (const auto *VD = dyn_cast<VarDecl>(D)) { in VisitBinaryOperator() local
359 Killed = writeShouldKill(VD); in VisitBinaryOperator()
361 val.liveDecls = LV.DSetFact.remove(val.liveDecls, VD); in VisitBinaryOperator()
372 for (const VarDecl *VD : in VisitBlockExpr() local
374 if (isAlwaysAlive(VD)) in VisitBlockExpr()
[all …]
/openbsd/src/gnu/llvm/clang/lib/AST/Interp/
DByteCodeExprGen.cpp30 DeclScope(ByteCodeExprGen<Emitter> *Ctx, const VarDecl *VD) in DeclScope() argument
31 : LocalScope<Emitter>(Ctx), Scope(Ctx->P, VD) {} in DeclScope()
611 if (auto *VD = dyn_cast<VarDecl>(DE->getDecl())) in dereference() local
612 return dereferenceVar(LV, *T, VD, AK, Direct, Indirect); in dereference()
669 const Expr *LV, PrimType T, const VarDecl *VD, DerefKind AK, in dereferenceVar() argument
672 auto It = Locals.find(VD); in dereferenceVar()
697 } else if (auto Idx = P.getGlobal(VD)) { in dereferenceVar()
726 if (VD->hasLocalStorage() && VD->hasInit() && !VD->isConstexpr()) { in dereferenceVar()
727 QualType VT = VD->getType(); in dereferenceVar()
729 return this->visit(VD->getInit()); in dereferenceVar()
[all …]
DProgram.cpp104 std::optional<unsigned> Program::getGlobal(const ValueDecl *VD) { in getGlobal() argument
105 auto It = GlobalIndices.find(VD); in getGlobal()
111 for (const Decl *P = VD; P; P = P->getPreviousDecl()) { in getGlobal()
121 GlobalIndices[VD] = *Index; in getGlobal()
128 std::optional<unsigned> Program::getOrCreateGlobal(const ValueDecl *VD, in getOrCreateGlobal() argument
130 if (auto Idx = getGlobal(VD)) in getOrCreateGlobal()
133 if (auto Idx = createGlobal(VD, Init)) { in getOrCreateGlobal()
134 GlobalIndices[VD] = *Idx; in getOrCreateGlobal()
159 std::optional<unsigned> Program::createGlobal(const ValueDecl *VD, in createGlobal() argument
161 assert(!getGlobal(VD)); in createGlobal()
[all …]
/openbsd/src/gnu/llvm/clang/lib/AST/
DStmtIterator.cpp48 if (VarDecl* VD = dyn_cast<VarDecl>(*DGI)) in NextVA() local
49 if (VD->hasInit()) in NextVA()
75 if (VarDecl* VD = dyn_cast<VarDecl>(D)) { in HandleDecl() local
76 if (const VariableArrayType* VAPtr = FindVA(VD->getType().getTypePtr())) { in HandleDecl()
81 if (VD->getInit()) in HandleDecl()
116 VarDecl* VD = cast<VarDecl>(*DGI); in GetDeclExpr() local
117 return *VD->getInitAddress(); in GetDeclExpr()
DAttrImpl.cpp153 OMPDeclareTargetDeclAttr::getActiveAttr(const ValueDecl *VD) { in getActiveAttr() argument
154 if (!VD->hasAttrs()) in getActiveAttr()
158 for (auto *Attr : VD->specific_attrs<OMPDeclareTargetDeclAttr>()) { in getActiveAttr()
170 OMPDeclareTargetDeclAttr::isDeclareTargetDeclaration(const ValueDecl *VD) { in isDeclareTargetDeclaration() argument
171 std::optional<OMPDeclareTargetDeclAttr *> ActiveAttr = getActiveAttr(VD); in isDeclareTargetDeclaration()
178 OMPDeclareTargetDeclAttr::getDeviceType(const ValueDecl *VD) { in getDeviceType() argument
179 std::optional<OMPDeclareTargetDeclAttr *> ActiveAttr = getActiveAttr(VD); in getDeviceType()
186 OMPDeclareTargetDeclAttr::getLocation(const ValueDecl *VD) { in getLocation() argument
187 std::optional<OMPDeclareTargetDeclAttr *> ActiveAttr = getActiveAttr(VD); in getLocation()
DItaniumCXXABI.cpp45 static const IdentifierInfo *findAnonymousUnionVarDeclName(const VarDecl& VD) { in findAnonymousUnionVarDeclName() argument
46 const RecordType *RT = VD.getType()->getAs<RecordType>(); in findAnonymousUnionVarDeclName()
160 unsigned getStaticLocalNumber(const VarDecl *VD) override { in getStaticLocalNumber() argument
165 unsigned getManglingNumber(const VarDecl *VD, unsigned) override { in getManglingNumber() argument
166 if (auto *DD = dyn_cast<DecompositionDecl>(VD)) { in getManglingNumber()
171 const IdentifierInfo *Identifier = VD->getIdentifier(); in getManglingNumber()
175 Identifier = findAnonymousUnionVarDeclName(*VD); in getManglingNumber()
/openbsd/src/gnu/llvm/clang/lib/Frontend/
DInterfaceStubFunctionsConsumer.cpp56 if (const VarDecl *VD = dyn_cast<VarDecl>(ND)) { in WriteNamedDecl() local
57 if (const auto *Parent = VD->getParentFunctionOrMethod()) in WriteNamedDecl()
61 if ((VD->getStorageClass() == StorageClass::SC_Extern) || in WriteNamedDecl()
62 (VD->getStorageClass() == StorageClass::SC_Static && in WriteNamedDecl()
63 VD->getParentFunctionOrMethod() == nullptr)) in WriteNamedDecl()
85 if (const VarDecl *VD = dyn_cast<VarDecl>(ND)) in WriteNamedDecl() local
87 dyn_cast_or_null<FunctionDecl>(VD->getParentFunctionOrMethod())) in WriteNamedDecl()
213 const auto *VD = cast<VarDecl>(ND); in HandleNamedDecl() local
215 if (VD->isTemplated() || VD->getType()->isDependentType()) in HandleNamedDecl()
252 if (const auto *VD = dyn_cast<ValueDecl>(ND)) { in HandleTranslationUnit() local
[all …]
/openbsd/src/gnu/llvm/clang/lib/CodeGen/
DCGOpenMPRuntimeGPU.cpp154 const ValueDecl *VD = Pair.second; in buildRecordForGlobalizedVars() local
155 QualType Type = VD->getType(); in buildRecordForGlobalizedVars()
160 SourceLocation Loc = VD->getLocation(); in buildRecordForGlobalizedVars()
162 if (SingleEscaped.count(VD)) { in buildRecordForGlobalizedVars()
164 C, GlobalizedRD, Loc, Loc, VD->getIdentifier(), Type, in buildRecordForGlobalizedVars()
169 if (VD->hasAttrs()) { in buildRecordForGlobalizedVars()
170 for (specific_attr_iterator<AlignedAttr> I(VD->getAttrs().begin()), in buildRecordForGlobalizedVars()
171 E(VD->getAttrs().end()); in buildRecordForGlobalizedVars()
180 C, GlobalizedRD, Loc, Loc, VD->getIdentifier(), Type, in buildRecordForGlobalizedVars()
185 llvm::APInt Align(32, std::max(C.getDeclAlign(VD).getQuantity(), in buildRecordForGlobalizedVars()
[all …]
DCGCXXABI.cpp156 bool CGCXXABI::mayNeedDestruction(const VarDecl *VD) const { in mayNeedDestruction()
157 if (VD->needsDestruction(getContext())) in mayNeedDestruction()
162 const Type *T = VD->getType()->getBaseElementTypeUnsafe(); in mayNeedDestruction()
170 const VarDecl *VD, bool InspectInitForWeakDef) const { in isEmittedWithConstantInitializer() argument
171 VD = VD->getMostRecentDecl(); in isEmittedWithConstantInitializer()
172 if (VD->hasAttr<ConstInitAttr>()) in isEmittedWithConstantInitializer()
177 if (!InspectInitForWeakDef && (VD->isWeak() || VD->hasAttr<SelectAnyAttr>())) in isEmittedWithConstantInitializer()
180 const VarDecl *InitDecl = VD->getInitializingDeclaration(); in isEmittedWithConstantInitializer()
190 if (isUniqueGVALinkage(getContext().GetGVALinkageForVariable(VD))) in isEmittedWithConstantInitializer()
191 return !mayNeedDestruction(VD) && InitDecl->evaluateValue(); in isEmittedWithConstantInitializer()
DVarBypassDetector.cpp36 const VarDecl *VD = dyn_cast<VarDecl>(D); in BuildScopeInformation() local
37 if (VD && VD->hasLocalStorage()) { in BuildScopeInformation()
38 Scopes.push_back({ParentScope, VD}); in BuildScopeInformation()
42 if (const VarDecl *VD = dyn_cast<VarDecl>(D)) in BuildScopeInformation() local
43 if (const Expr *Init = VD->getInit()) in BuildScopeInformation()
/openbsd/src/gnu/llvm/clang/lib/StaticAnalyzer/Core/
DCheckerHelpers.cpp57 if (const VarDecl *VD = dyn_cast<VarDecl>(DR->getDecl())) in containsStaticLocal() local
58 if (VD->isStaticLocal()) in containsStaticLocal()
83 const VarDecl *VD = nullptr; in parseAssignment() local
91 VD = dyn_cast_or_null<VarDecl>(DE->getDecl()); in parseAssignment()
96 VD = cast<VarDecl>(PD->getSingleDecl()); in parseAssignment()
97 RHS = VD->getAnyInitializer(); in parseAssignment()
100 return std::make_pair(VD, RHS); in parseAssignment()
DLoopUnrolling.cpp186 const VarDecl *VD = cast<VarDecl>(DR->getDecl()->getCanonicalDecl()); in isCapturedByReference() local
187 assert(VD); in isCapturedByReference()
188 const FieldDecl *FD = LambdaCaptureFields[VD]; in isCapturedByReference()
199 const VarDecl *VD = cast<VarDecl>(DR->getDecl()->getCanonicalDecl()); in isPossiblyEscaped() local
200 assert(VD); in isPossiblyEscaped()
202 if (VD->hasGlobalStorage()) in isPossiblyEscaped()
206 isa<ParmVarDecl>(VD) || DR->refersToEnclosingVariableOrCapture(); in isPossiblyEscaped()
210 (IsRefParamOrCapture && VD->getType()->isReferenceType())) in isPossiblyEscaped()
225 if (D->getCanonicalDecl() == VD) in isPossiblyEscaped()
235 match(stmt(anyOf(callByRef(equalsNode(VD)), getAddrTo(equalsNode(VD)), in isPossiblyEscaped()
[all …]
/openbsd/src/gnu/usr.bin/binutils-2.17/opcodes/
Dppc-opc.c524 #define VD VC + 1 macro
525 #define VS VD
530 #define SIMM VD + 1
2008 { "mfvscr", VX(4, 1540), VX_MASK, PPCVEC, { VD } },
2045 { "vaddcuw", VX(4, 384), VX_MASK, PPCVEC, { VD, VA, VB } },
2046 { "vaddfp", VX(4, 10), VX_MASK, PPCVEC, { VD, VA, VB } },
2047 { "vaddsbs", VX(4, 768), VX_MASK, PPCVEC, { VD, VA, VB } },
2048 { "vaddshs", VX(4, 832), VX_MASK, PPCVEC, { VD, VA, VB } },
2049 { "vaddsws", VX(4, 896), VX_MASK, PPCVEC, { VD, VA, VB } },
2050 { "vaddubm", VX(4, 0), VX_MASK, PPCVEC, { VD, VA, VB } },
[all …]
/openbsd/src/gnu/usr.bin/binutils/opcodes/
Dppc-opc.c515 #define VD VC + 1 macro
516 #define VS VD
521 #define SIMM VD + 1
1944 { "mfvscr", VX(4, 1540), VX_MASK, PPCVEC, { VD } },
1946 { "vaddcuw", VX(4, 384), VX_MASK, PPCVEC, { VD, VA, VB } },
1947 { "vaddfp", VX(4, 10), VX_MASK, PPCVEC, { VD, VA, VB } },
1948 { "vaddsbs", VX(4, 768), VX_MASK, PPCVEC, { VD, VA, VB } },
1949 { "vaddshs", VX(4, 832), VX_MASK, PPCVEC, { VD, VA, VB } },
1950 { "vaddsws", VX(4, 896), VX_MASK, PPCVEC, { VD, VA, VB } },
1951 { "vaddubm", VX(4, 0), VX_MASK, PPCVEC, { VD, VA, VB } },
[all …]

123456789