Home
last modified time | relevance | path

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

1234567891011

/freebsd/contrib/llvm-project/llvm/lib/Target/PowerPC/
H A DPPCInstrAltivec.td292 : VXForm_1<xo, (outs vrrc:$VD), (ins vrrc:$VA, vrrc:$VB),
293 !strconcat(opc, " $VD, $VA, $VB"), IIC_VecFP,
294 [(set Ty:$VD, (IntID Ty:$VA, Ty:$VB))]>;
300 : VXForm_1<xo, (outs vrrc:$VD), (ins vrrc:$VA, vrrc:$VB),
301 !strconcat(opc, " $VD, $VA, $VB"), IIC_VecFP,
302 [(set OutTy:$VD, (IntID InTy:$VA, InTy:$VB))]>;
308 : VXForm_1<xo, (outs vrrc:$VD), (ins vrrc:$VA, vrrc:$VB),
309 !strconcat(opc, " $VD, $VA, $VB"), IIC_VecFP,
310 [(set OutTy:$VD, (IntID In1Ty:$VA, In2Ty:$VB))]>;
314 : VXForm_2<xo, (outs vrrc:$VD), (ins vrrc:$VB),
[all …]
H A DPPCInstrP10.td384 : VXForm_1<xo, (outs vrrc:$VD), (ins vrrc:$VDi, gprc:$VA, vrrc:$VB),
385 !strconcat(opc, " $VD, $VA, $VB"), IIC_VecGeneral, pattern>,
386 RegConstraint<"$VDi = $VD">, NoEncode<"$VDi">;
391 : VXForm_1<xo, (outs vrrc:$VD), (ins vrrc:$VDi, gprc:$VA, gprc:$VB),
392 !strconcat(opc, " $VD, $VA, $VB"), IIC_VecGeneral, pattern>,
393 RegConstraint<"$VDi = $VD">, NoEncode<"$VDi">;
1466 VXForm_1<207, (outs vrrc:$VD), (ins vrrc:$VDi, u4imm:$VA, gprc:$VB),
1467 "vinsw $VD, $VB, $VA", IIC_VecGeneral,
1468 [(set v4i32:$VD,
1470 RegConstraint<"$VDi = $VD">, NoEncode<"$VDi">;
[all …]
/freebsd/contrib/llvm-project/clang/lib/Analysis/
H A DFixitUtil.cpp22 clang::getPointeeTypeText(const DeclaratorDecl *VD, const SourceManager &SM, in getPointeeTypeText() argument
25 QualType Ty = VD->getType(); in getPointeeTypeText()
32 TypeLoc TyLoc = VD->getTypeSourceInfo()->getTypeLoc().getUnqualifiedLoc(); in getPointeeTypeText()
43 assert(isa<ParmVarDecl>(VD) && "An array type shall not be treated as a " in getPointeeTypeText()
59 SourceLocation IdentLoc = VD->getLocation(); in getPointeeTypeText()
98 getPointee2TypeText(const DeclaratorDecl *VD, const SourceManager &SM, in getPointee2TypeText() argument
102 QualType Ty = VD->getType(); in getPointee2TypeText()
113 TypeLoc TyLoc = VD->getTypeSourceInfo()->getTypeLoc().getUnqualifiedLoc(); in getPointee2TypeText()
141 SourceLocation IdentLoc = VD->getLocation(); in getPointee2TypeText()
199 clang::getVarDeclIdentifierText(const DeclaratorDecl *VD, in getVarDeclIdentifierText() argument
[all …]
H A DUninitializedValues.cpp266 if (const auto *VD = dyn_cast<VarDecl>(DRE->getDecl())) in findVar() local
267 if (isTrackedVar(VD, DC)) in findVar()
268 return FindVarResult(VD, DRE); in findVar()
285 bool isTrackedVar(const VarDecl *VD) const { in isTrackedVar()
286 return ::isTrackedVar(VD, DC); in isTrackedVar()
309 const auto *VD = dyn_cast<VarDecl>(DRE->getDecl()); in get() local
310 if (!VD || !isTrackedVar(VD)) in get()
319 static const DeclRefExpr *getSelfInitExpr(VarDecl *VD) { in getSelfInitExpr() argument
320 if (VD->getType()->isRecordType()) in getSelfInitExpr()
322 if (Expr *Init = VD->getInit()) { in getSelfInitExpr()
[all …]
H A DThreadSafetyCommon.cpp244 til::LiteralPtr *SExprBuilder::createVariable(const VarDecl *VD) { in createVariable() argument
245 return new (Arena) til::LiteralPtr(VD); in createVariable()
327 const auto *VD = cast<ValueDecl>(DRE->getDecl()->getCanonicalDecl()); in translateDeclRefExpr() local
330 if (const auto *PV = dyn_cast<ParmVarDecl>(VD)) { in translateDeclRefExpr()
351 VD = isa<FunctionDecl>(D) in translateDeclRefExpr()
357 return new (Arena) til::LiteralPtr(VD); in translateDeclRefExpr()
386 auto *VD = getValueDeclFromSExpr(E); in hasAnyPointerType() local
387 if (VD && VD->getType()->isAnyPointerType()) in hasAnyPointerType()
414 if (const auto *VD = dyn_cast<CXXMethodDecl>(D)) in translateMemberExpr() local
415 D = getFirstVirtualDecl(VD); in translateMemberExpr()
[all …]
H A DLiveVariables.cpp272 if (const VarDecl *VD = dyn_cast<VarDecl>(DS->getSingleDecl())) { in Visit() local
273 for (const VariableArrayType* VA = FindVA(VD->getType()); in Visit()
365 static bool writeShouldKill(const VarDecl *VD) { in writeShouldKill() argument
366 return VD && !VD->getType()->isReferenceType() && in writeShouldKill()
367 !isAlwaysAlive(VD); in writeShouldKill()
395 } else if (const auto *VD = dyn_cast<VarDecl>(D)) { in VisitBinaryOperator() local
396 Killed = writeShouldKill(VD); in VisitBinaryOperator()
398 val.liveDecls = LV.DSetFact.remove(val.liveDecls, VD); in VisitBinaryOperator()
409 for (const VarDecl *VD : in VisitBlockExpr() local
411 if (isAlwaysAlive(VD)) in VisitBlockExpr()
[all …]
H A DUnsafeBufferUsage.cpp1562 const VarDecl *VD = dyn_cast<VarDecl>(DS->getSingleDecl()); in matches() local
1563 if (!VD) in matches()
1565 const Expr *Init = VD->getAnyInitializer(); in matches()
1573 R.addNode(PointerInitLHSTag, DynTypedNode::create(*VD)); in matches()
2213 bool hasUnclaimedUses(const VarDecl *VD) const { in hasUnclaimedUses()
2215 return any_of(*Uses, [VD](const DeclRefExpr *DRE) { in hasUnclaimedUses()
2216 return DRE->getDecl()->getCanonicalDecl() == VD->getCanonicalDecl(); in hasUnclaimedUses()
2220 UseSetTy getUnclaimedUses(const VarDecl *VD) const { in getUnclaimedUses()
2223 if (use->getDecl()->getCanonicalDecl() == VD->getCanonicalDecl()) { in getUnclaimedUses()
2232 if (const auto *VD = dyn_cast<VarDecl>(D)) { in discoverDecl() local
[all …]
/freebsd/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/
H A DDeadStoresChecker.cpp264 void CheckVarDecl(const VarDecl *VD, const Expr *Ex, const Expr *Val, in CheckVarDecl() argument
268 if (!VD->hasLocalStorage()) in CheckVarDecl()
272 if (VD->getType()->getAs<ReferenceType>()) in CheckVarDecl()
275 if (!isLive(Live, VD) && in CheckVarDecl()
276 !(VD->hasAttr<UnusedAttr>() || VD->hasAttr<BlocksAttr>() || in CheckVarDecl()
277 VD->hasAttr<ObjCPreciseLifetimeAttr>())) { in CheckVarDecl()
281 Report(VD, dsk, ExLoc, Val->getSourceRange()); in CheckVarDecl()
287 if (const VarDecl *VD = dyn_cast<VarDecl>(DR->getDecl())) in CheckDeclRef() local
288 CheckVarDecl(VD, DR, Val, dsk, Live); in CheckDeclRef()
291 bool isIncrement(VarDecl *VD, const BinaryOperator* B) { in isIncrement() argument
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Utils/
H A DPredicateInfo.cpp133 std::pair<BasicBlock *, BasicBlock *> getBlockEdge(const ValueDFS &VD) const { in getBlockEdge()
134 if (VD.U) { in getBlockEdge()
135 auto *PHI = cast<PHINode>(VD.U->getUser()); in getBlockEdge()
136 return std::make_pair(PHI->getIncomingBlock(*VD.U), PHI->getParent()); in getBlockEdge()
139 return ::getBlockEdge(VD.PInfo); in getBlockEdge()
175 const Instruction *getDefOrUser(const ValueDFS &VD) const { in getDefOrUser()
176 if (VD.U) in getDefOrUser()
177 return cast<Instruction>(VD.U->getUser()); in getDefOrUser()
181 assert(VD.PInfo && "No use, and no predicateinfo should not occur"); in getDefOrUser()
182 assert(isa<PredicateAssume>(VD.PInfo) && in getDefOrUser()
[all …]
H A DInjectTLIMappings.cpp41 const VecDesc *VD) { in addVariantDeclaration() argument
48 VD->getVectorFunctionABIVariantString(), ScalarFTy); in addVariantDeclaration()
53 const StringRef VFName = VD->getVectorFnName(); in addVariantDeclaration()
58 if (auto CC = VD->getCallingConv()) in addVariantDeclaration()
95 const VecDesc *VD = TLI.getVectorMappingInfo(ScalarName, VF, Predicate); in addMappingsFromTLI() local
96 if (VD && !VD->getVectorFnName().empty()) { in addMappingsFromTLI()
97 std::string MangledName = VD->getVectorFunctionABIVariantString(); in addMappingsFromTLI()
102 Function *VariantF = M->getFunction(VD->getVectorFnName()); in addMappingsFromTLI()
104 addVariantDeclaration(CI, VF, VD); in addMappingsFromTLI()
/freebsd/contrib/llvm-project/clang/lib/Sema/
H A DSemaCUDA.cpp121 auto *VD = dyn_cast_or_null<VarDecl>(D); in CUDATargetContextRAII() local
122 if (VD && VD->hasGlobalStorage() && !VD->isStaticLocal()) { in CUDATargetContextRAII()
124 if ((hasAttr<CUDADeviceAttr>(VD, /*IgnoreImplicit=*/true) && in CUDATargetContextRAII()
125 !hasAttr<CUDAHostAttr>(VD, /*IgnoreImplicit=*/true)) || in CUDATargetContextRAII()
126 hasAttr<CUDASharedAttr>(VD, /*IgnoreImplicit=*/true) || in CUDATargetContextRAII()
127 hasAttr<CUDAConstantAttr>(VD, /*IgnoreImplicit=*/true)) in CUDATargetContextRAII()
129 S.CurCUDATargetCtx = {Target, K, VD}; in CUDATargetContextRAII()
624 bool IsDependentVar(VarDecl *VD) { in IsDependentVar() argument
625 if (VD->getType()->isDependentType()) in IsDependentVar()
627 if (const auto *Init = VD->getInit()) in IsDependentVar()
[all …]
H A DSema.cpp827 if (const auto *VD = dyn_cast<VarDecl>(DRE->getDecl())) { in ImpCastExprToType() local
828 if (VD->getStorageClass() == SC_Register) { in ImpCastExprToType()
895 if (const VarDecl *VD = dyn_cast<VarDecl>(D)) { in ShouldRemoveFromUnused() local
901 if (VD->isReferenced() && in ShouldRemoveFromUnused()
902 VD->mightBeUsableInConstantExpressions(SemaRef->Context)) in ShouldRemoveFromUnused()
905 if (VarTemplateDecl *Template = VD->getDescribedVarTemplate()) in ShouldRemoveFromUnused()
914 const VarDecl *DeclToCheck = VD->getDefinition(); in ShouldRemoveFromUnused()
920 DeclToCheck = VD->getMostRecentDecl(); in ShouldRemoveFromUnused()
921 if (DeclToCheck != VD) in ShouldRemoveFromUnused()
936 bool Sema::isExternalWithNoLinkageType(const ValueDecl *VD) const { in isExternalWithNoLinkageType()
[all …]
H A DSemaHLSL.cpp159 DeclBindingInfo *ResourceBindings::addDeclBindingInfo(const VarDecl *VD, in addDeclBindingInfo() argument
161 assert(getDeclBindingInfo(VD, ResClass) == nullptr && in addDeclBindingInfo()
163 assert(!hasBindingInfoForDecl(VD) || BindingsList.back().Decl == VD); in addDeclBindingInfo()
168 DeclToBindingListIndex.try_emplace(VD, BindingsList.size()); in addDeclBindingInfo()
169 return &BindingsList.emplace_back(VD, ResClass); in addDeclBindingInfo()
172 DeclBindingInfo *ResourceBindings::getDeclBindingInfo(const VarDecl *VD, in getDeclBindingInfo() argument
174 auto Entry = DeclToBindingListIndex.find(VD); in getDeclBindingInfo()
177 Index < BindingsList.size() && BindingsList[Index].Decl == VD; in getDeclBindingInfo()
186 bool ResourceBindings::hasBindingInfoForDecl(const VarDecl *VD) const { in hasBindingInfoForDecl()
187 return DeclToBindingListIndex.contains(VD); in hasBindingInfoForDecl()
[all …]
H A DCheckExprLifetime.cpp236 static bool isVarOnPath(const IndirectLocalPath &Path, VarDecl *VD) { in isVarOnPath() argument
238 if (E.Kind == IndirectLocalPathEntry::VarInit && E.D == VD) in isVarOnPath()
772 auto *VD = dyn_cast<VarDecl>(DRE->getDecl()); in visitLocalsRetainedByReferenceBinding() local
773 if (VD && VD->hasLocalStorage() && in visitLocalsRetainedByReferenceBinding()
775 if (!VD->getType()->isReferenceType()) { in visitLocalsRetainedByReferenceBinding()
781 } else if (VD->getInit() && !isVarOnPath(Path, VD)) { in visitLocalsRetainedByReferenceBinding()
782 Path.push_back({IndirectLocalPathEntry::VarInit, DRE, VD}); in visitLocalsRetainedByReferenceBinding()
783 visitLocalsRetainedByReferenceBinding(Path, VD->getInit(), in visitLocalsRetainedByReferenceBinding()
872 auto *VD = dyn_cast<VarDecl>(DRE->getDecl()); in visitLocalsRetainedByInitializer() local
873 if (VD && VD->getType().isConstQualified() && VD->getInit() && in visitLocalsRetainedByInitializer()
[all …]
/freebsd/contrib/llvm-project/clang/lib/CodeGen/
H A DCGOpenMPRuntimeGPU.cpp135 const ValueDecl *VD = Pair.second; in buildRecordForGlobalizedVars() local
136 QualType Type = VD->getType(); in buildRecordForGlobalizedVars()
141 SourceLocation Loc = VD->getLocation(); in buildRecordForGlobalizedVars()
143 if (SingleEscaped.count(VD)) { in buildRecordForGlobalizedVars()
145 C, GlobalizedRD, Loc, Loc, VD->getIdentifier(), Type, in buildRecordForGlobalizedVars()
150 if (VD->hasAttrs()) { in buildRecordForGlobalizedVars()
151 for (specific_attr_iterator<AlignedAttr> I(VD->getAttrs().begin()), in buildRecordForGlobalizedVars()
152 E(VD->getAttrs().end()); in buildRecordForGlobalizedVars()
163 C, GlobalizedRD, Loc, Loc, VD->getIdentifier(), Type, in buildRecordForGlobalizedVars()
177 MappedDeclsFields.try_emplace(VD, Field); in buildRecordForGlobalizedVars()
[all …]
H A DCGCXXABI.cpp161 bool CGCXXABI::mayNeedDestruction(const VarDecl *VD) const { in mayNeedDestruction()
162 if (VD->needsDestruction(getContext())) in mayNeedDestruction()
167 const Type *T = VD->getType()->getBaseElementTypeUnsafe(); in mayNeedDestruction()
175 const VarDecl *VD, bool InspectInitForWeakDef) const { in isEmittedWithConstantInitializer() argument
176 VD = VD->getMostRecentDecl(); in isEmittedWithConstantInitializer()
177 if (VD->hasAttr<ConstInitAttr>()) in isEmittedWithConstantInitializer()
182 if (!InspectInitForWeakDef && (VD->isWeak() || VD->hasAttr<SelectAnyAttr>())) in isEmittedWithConstantInitializer()
185 const VarDecl *InitDecl = VD->getInitializingDeclaration(); in isEmittedWithConstantInitializer()
195 if (isUniqueGVALinkage(getContext().GetGVALinkageForVariable(VD))) in isEmittedWithConstantInitializer()
196 return !mayNeedDestruction(VD) && InitDecl->evaluateValue(); in isEmittedWithConstantInitializer()
H A DVarBypassDetector.cpp37 const VarDecl *VD = dyn_cast<VarDecl>(D); in BuildScopeInformation() local
38 if (VD && VD->hasLocalStorage()) { in BuildScopeInformation()
39 Scopes.push_back({ParentScope, VD}); in BuildScopeInformation()
43 if (const VarDecl *VD = dyn_cast<VarDecl>(D)) in BuildScopeInformation() local
44 if (const Expr *Init = VD->getInit()) in BuildScopeInformation()
/freebsd/contrib/llvm-project/clang/lib/AST/
H A DStmtIterator.cpp47 if (VarDecl* VD = dyn_cast<VarDecl>(*DGI)) in NextVA() local
48 if (VD->hasInit()) in NextVA()
74 if (VarDecl* VD = dyn_cast<VarDecl>(D)) { in HandleDecl() local
75 if (const VariableArrayType* VAPtr = FindVA(VD->getType().getTypePtr())) { in HandleDecl()
80 if (VD->getInit()) in HandleDecl()
115 VarDecl* VD = cast<VarDecl>(*DGI); in GetDeclExpr() local
116 return *VD->getInitAddress(); in GetDeclExpr()
H A DAttrImpl.cpp153 OMPDeclareTargetDeclAttr::getActiveAttr(const ValueDecl *VD) { in getActiveAttr() argument
154 if (llvm::all_of(VD->redecls(), [](const Decl *D) { return !D->hasAttrs(); })) in getActiveAttr()
158 for (const Decl *D : VD->redecls()) { in getActiveAttr()
172 OMPDeclareTargetDeclAttr::isDeclareTargetDeclaration(const ValueDecl *VD) { in isDeclareTargetDeclaration() argument
173 std::optional<OMPDeclareTargetDeclAttr *> ActiveAttr = getActiveAttr(VD); in isDeclareTargetDeclaration()
180 OMPDeclareTargetDeclAttr::getDeviceType(const ValueDecl *VD) { in getDeviceType() argument
181 std::optional<OMPDeclareTargetDeclAttr *> ActiveAttr = getActiveAttr(VD); in getDeviceType()
188 OMPDeclareTargetDeclAttr::getLocation(const ValueDecl *VD) { in getLocation() argument
189 std::optional<OMPDeclareTargetDeclAttr *> ActiveAttr = getActiveAttr(VD); in getLocation()
/freebsd/contrib/llvm-project/clang/lib/AST/ByteCode/
H A DProgram.cpp115 std::optional<unsigned> Program::getGlobal(const ValueDecl *VD) { in getGlobal() argument
116 if (auto It = GlobalIndices.find(VD); It != GlobalIndices.end()) in getGlobal()
121 for (const Decl *P = VD->getPreviousDecl(); P; P = P->getPreviousDecl()) { in getGlobal()
130 GlobalIndices[VD] = *Index; in getGlobal()
141 std::optional<unsigned> Program::getOrCreateGlobal(const ValueDecl *VD, in getOrCreateGlobal() argument
143 if (auto Idx = getGlobal(VD)) in getOrCreateGlobal()
146 if (auto Idx = createGlobal(VD, Init)) { in getOrCreateGlobal()
147 GlobalIndices[VD] = *Idx; in getOrCreateGlobal()
165 const auto *VD = cast<ValueDecl>(cast<const Decl *>(D)); in getOrCreateDummy() local
166 IsWeak = VD->isWeak(); in getOrCreateDummy()
[all …]
/freebsd/contrib/llvm-project/clang/lib/StaticAnalyzer/Core/
H A 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()
193 static bool isFoundInStmt(const Stmt *S, const VarDecl *VD) { in isFoundInStmt() argument
197 if (D->getCanonicalDecl() == VD) in isFoundInStmt()
210 const VarDecl *VD = cast<VarDecl>(DR->getDecl()->getCanonicalDecl()); in isPossiblyEscaped() local
211 assert(VD); in isPossiblyEscaped()
213 if (VD->hasGlobalStorage()) in isPossiblyEscaped()
217 isa<ParmVarDecl>(VD) || DR->refersToEnclosingVariableOrCapture(); in isPossiblyEscaped()
221 (IsRefParamOrCapture && VD->getType()->isReferenceType())) in isPossiblyEscaped()
[all …]
H A DCheckerHelpers.cpp58 if (const VarDecl *VD = dyn_cast<VarDecl>(DR->getDecl())) in containsStaticLocal() local
59 if (VD->isStaticLocal()) in containsStaticLocal()
84 const VarDecl *VD = nullptr; in parseAssignment() local
92 VD = dyn_cast_or_null<VarDecl>(DE->getDecl()); in parseAssignment()
97 VD = cast<VarDecl>(PD->getSingleDecl()); in parseAssignment()
98 RHS = VD->getAnyInitializer(); in parseAssignment()
101 return std::make_pair(VD, RHS); in parseAssignment()
/freebsd/contrib/llvm-project/clang/lib/Frontend/
H A DInterfaceStubFunctionsConsumer.cpp57 if (const VarDecl *VD = dyn_cast<VarDecl>(ND)) { in WriteNamedDecl() local
58 if (const auto *Parent = VD->getParentFunctionOrMethod()) in WriteNamedDecl()
62 if ((VD->getStorageClass() == StorageClass::SC_Extern) || in WriteNamedDecl()
63 (VD->getStorageClass() == StorageClass::SC_Static && in WriteNamedDecl()
64 VD->getParentFunctionOrMethod() == nullptr)) in WriteNamedDecl()
86 if (const VarDecl *VD = dyn_cast<VarDecl>(ND)) in WriteNamedDecl() local
88 dyn_cast_or_null<FunctionDecl>(VD->getParentFunctionOrMethod())) in WriteNamedDecl()
214 const auto *VD = cast<VarDecl>(ND); in HandleNamedDecl() local
216 if (VD->isTemplated() || VD->getType()->isDependentType()) in HandleNamedDecl()
253 if (const auto *VD = dyn_cast<ValueDecl>(ND)) { in HandleTranslationUnit() local
[all …]
/freebsd/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/WebKit/
H A DRawPtrRefLambdaCapturesChecker.cpp100 bool VisitVarDecl(VarDecl *VD) override { in checkASTDecl()
101 auto *Init = VD->getInit(); in checkASTDecl()
114 auto *VD = dyn_cast_or_null<VarDecl>(DRE->getDecl()); in checkASTDecl() local
115 if (!VD) in checkASTDecl()
117 auto *Init = VD->getInit(); in checkASTDecl()
228 auto *VD = dyn_cast_or_null<VarDecl>(DRE->getDecl()); in checkASTDecl() local
229 if (!VD) in checkASTDecl()
231 auto *Init = VD->getInit(); in checkASTDecl()
263 auto *VD = dyn_cast_or_null<VarDecl>(ArgRef->getDecl()); in checkASTDecl() local
264 if (!VD) in checkASTDecl()
[all …]
/freebsd/contrib/llvm-project/clang/include/clang/Analysis/Analyses/
H A DUnsafeBufferUsage.h73 void set(const VarDecl *VD, Kind K) { Map[VD] = K; } in set() argument
75 Kind lookup(const VarDecl *VD) const { in lookup() argument
76 auto I = Map.find(VD); in lookup()
149 void addDebugNoteForVar(const VarDecl *VD, SourceLocation Loc, in addDebugNoteForVar() argument
152 DebugNotesByVar[VD].push_back(std::make_pair(Loc, Text)); in addDebugNoteForVar()

1234567891011