/freebsd/contrib/llvm-project/llvm/lib/Target/PowerPC/ |
H A D | PPCInstrAltivec.td | 292 : 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 D | PPCInstrP10.td | 374 : VXForm_1<xo, (outs vrrc:$VD), (ins vrrc:$VDi, gprc:$VA, vrrc:$VB), 375 !strconcat(opc, " $VD, $VA, $VB"), IIC_VecGeneral, pattern>, 376 RegConstraint<"$VDi = $VD">, NoEncode<"$VDi">; 381 : VXForm_1<xo, (outs vrrc:$VD), (ins vrrc:$VDi, gprc:$VA, gprc:$VB), 382 !strconcat(opc, " $VD, $VA, $VB"), IIC_VecGeneral, pattern>, 383 RegConstraint<"$VDi = $VD">, NoEncode<"$VDi">; 1460 VXForm_1<207, (outs vrrc:$VD), (ins vrrc:$VDi, u4imm:$VA, gprc:$VB), 1461 "vinsw $VD, $VB, $VA", IIC_VecGeneral, 1462 [(set v4i32:$VD, 1464 RegConstraint<"$VDi = $VD">, NoEncode<"$VDi">; [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Utils/ |
H A D | PredicateInfo.cpp | 145 std::pair<BasicBlock *, BasicBlock *> getBlockEdge(const ValueDFS &VD) const { in getBlockEdge() 146 if (!VD.Def && VD.U) { in getBlockEdge() 147 auto *PHI = cast<PHINode>(VD.U->getUser()); in getBlockEdge() 148 return std::make_pair(PHI->getIncomingBlock(*VD.U), PHI->getParent()); in getBlockEdge() 151 return ::getBlockEdge(VD.PInfo); in getBlockEdge() 188 Value *getMiddleDef(const ValueDFS &VD) const { in getMiddleDef() 189 if (VD.Def) in getMiddleDef() 190 return VD.Def; in getMiddleDef() 197 if (!VD.U) { in getMiddleDef() 198 assert(VD.PInfo && in getMiddleDef() [all …]
|
/freebsd/contrib/llvm-project/clang/lib/Sema/ |
H A D | SemaCUDA.cpp | 123 auto *VD = dyn_cast_or_null<VarDecl>(D); in CUDATargetContextRAII() local 124 if (VD && VD->hasGlobalStorage() && !VD->isStaticLocal()) { in CUDATargetContextRAII() 126 if ((hasAttr<CUDADeviceAttr>(VD, /*IgnoreImplicit=*/true) && in CUDATargetContextRAII() 127 !hasAttr<CUDAHostAttr>(VD, /*IgnoreImplicit=*/true)) || in CUDATargetContextRAII() 128 hasAttr<CUDASharedAttr>(VD, /*IgnoreImplicit=*/true) || in CUDATargetContextRAII() 129 hasAttr<CUDAConstantAttr>(VD, /*IgnoreImplicit=*/true)) in CUDATargetContextRAII() 131 S.CurCUDATargetCtx = {Target, K, VD}; in CUDATargetContextRAII() 609 bool IsDependentVar(VarDecl *VD) { in IsDependentVar() argument 610 if (VD->getType()->isDependentType()) in IsDependentVar() 612 if (const auto *Init = VD->getInit()) in IsDependentVar() [all …]
|
H A D | Sema.cpp | 754 if (const auto *VD = dyn_cast<VarDecl>(DRE->getDecl())) { in ImpCastExprToType() local 755 if (VD->getStorageClass() == SC_Register) { in ImpCastExprToType() 822 if (const VarDecl *VD = dyn_cast<VarDecl>(D)) { in ShouldRemoveFromUnused() local 828 if (VD->isReferenced() && in ShouldRemoveFromUnused() 829 VD->mightBeUsableInConstantExpressions(SemaRef->Context)) in ShouldRemoveFromUnused() 832 if (VarTemplateDecl *Template = VD->getDescribedVarTemplate()) in ShouldRemoveFromUnused() 841 const VarDecl *DeclToCheck = VD->getDefinition(); in ShouldRemoveFromUnused() 847 DeclToCheck = VD->getMostRecentDecl(); in ShouldRemoveFromUnused() 848 if (DeclToCheck != VD) in ShouldRemoveFromUnused() 863 bool Sema::isExternalWithNoLinkageType(const ValueDecl *VD) const { in isExternalWithNoLinkageType() [all …]
|
H A D | CheckExprLifetime.cpp | 224 static bool isVarOnPath(IndirectLocalPath &Path, VarDecl *VD) { in isVarOnPath() argument 226 if (E.Kind == IndirectLocalPathEntry::VarInit && E.D == VD) in isVarOnPath() 571 auto *VD = dyn_cast<VarDecl>(DRE->getDecl()); in visitLocalsRetainedByReferenceBinding() local 572 if (VD && VD->hasLocalStorage() && in visitLocalsRetainedByReferenceBinding() 574 if (!VD->getType()->isReferenceType()) { in visitLocalsRetainedByReferenceBinding() 580 } else if (VD->getInit() && !isVarOnPath(Path, VD)) { in visitLocalsRetainedByReferenceBinding() 581 Path.push_back({IndirectLocalPathEntry::VarInit, DRE, VD}); in visitLocalsRetainedByReferenceBinding() 582 visitLocalsRetainedByReferenceBinding(Path, VD->getInit(), in visitLocalsRetainedByReferenceBinding() 677 auto *VD = dyn_cast<VarDecl>(DRE->getDecl()); in visitLocalsRetainedByInitializer() local 678 if (VD && VD->getType().isConstQualified() && VD->getInit() && in visitLocalsRetainedByInitializer() [all …]
|
H A D | SemaOpenMP.cpp | 219 VarDecl *VD = nullptr; member 221 VarDecl *VD) in ImplicitDefaultFDInfoTy() 222 : FD(FD), StackLevel(StackLevel), VD(VD) {} in ImplicitDefaultFDInfoTy() 591 bool isTaskgroupReductionRef(const ValueDecl *VD, unsigned Level) const { in isTaskgroupReductionRef() argument 594 ->getDecl() == VD; in isTaskgroupReductionRef() 1018 const ValueDecl *VD, bool CurrentRegionOnly, in checkMappableExprComponentListsForDecl() argument 1037 auto MI = SI->MappedExprComponents.find(VD); in checkMappableExprComponentListsForDecl() 1050 const ValueDecl *VD, unsigned Level, in checkMappableExprComponentListsForDeclAtLevel() argument 1059 auto MI = StackElem.MappedExprComponents.find(VD); in checkMappableExprComponentListsForDeclAtLevel() 1071 const ValueDecl *VD, in addMappableExpressionComponents() argument [all …]
|
/freebsd/contrib/llvm-project/clang/lib/CodeGen/ |
H A D | CGOpenMPRuntimeGPU.cpp | 134 const ValueDecl *VD = Pair.second; in buildRecordForGlobalizedVars() local 135 QualType Type = VD->getType(); in buildRecordForGlobalizedVars() 140 SourceLocation Loc = VD->getLocation(); in buildRecordForGlobalizedVars() 142 if (SingleEscaped.count(VD)) { in buildRecordForGlobalizedVars() 144 C, GlobalizedRD, Loc, Loc, VD->getIdentifier(), Type, in buildRecordForGlobalizedVars() 149 if (VD->hasAttrs()) { in buildRecordForGlobalizedVars() 150 for (specific_attr_iterator<AlignedAttr> I(VD->getAttrs().begin()), in buildRecordForGlobalizedVars() 151 E(VD->getAttrs().end()); in buildRecordForGlobalizedVars() 162 C, GlobalizedRD, Loc, Loc, VD->getIdentifier(), Type, in buildRecordForGlobalizedVars() 176 MappedDeclsFields.try_emplace(VD, Field); in buildRecordForGlobalizedVars() [all …]
|
H A D | CGCXXABI.cpp | 163 bool CGCXXABI::mayNeedDestruction(const VarDecl *VD) const { in mayNeedDestruction() 164 if (VD->needsDestruction(getContext())) in mayNeedDestruction() 169 const Type *T = VD->getType()->getBaseElementTypeUnsafe(); in mayNeedDestruction() 177 const VarDecl *VD, bool InspectInitForWeakDef) const { in isEmittedWithConstantInitializer() argument 178 VD = VD->getMostRecentDecl(); in isEmittedWithConstantInitializer() 179 if (VD->hasAttr<ConstInitAttr>()) in isEmittedWithConstantInitializer() 184 if (!InspectInitForWeakDef && (VD->isWeak() || VD->hasAttr<SelectAnyAttr>())) in isEmittedWithConstantInitializer() 187 const VarDecl *InitDecl = VD->getInitializingDeclaration(); in isEmittedWithConstantInitializer() 197 if (isUniqueGVALinkage(getContext().GetGVALinkageForVariable(VD))) in isEmittedWithConstantInitializer() 198 return !mayNeedDestruction(VD) && InitDecl->evaluateValue(); in isEmittedWithConstantInitializer()
|
H A D | VarBypassDetector.cpp | 36 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()
|
/freebsd/contrib/llvm-project/clang/lib/Analysis/ |
H A D | UninitializedValues.cpp | 269 if (const auto *VD = dyn_cast<VarDecl>(DRE->getDecl())) in findVar() local 270 if (isTrackedVar(VD, DC)) in findVar() 271 return FindVarResult(VD, DRE); in findVar() 294 bool isTrackedVar(const VarDecl *VD) const { in isTrackedVar() 295 return ::isTrackedVar(VD, DC); in isTrackedVar() 318 const auto *VD = dyn_cast<VarDecl>(DRE->getDecl()); in get() local 319 if (!VD || !isTrackedVar(VD)) in get() 328 static const DeclRefExpr *getSelfInitExpr(VarDecl *VD) { in getSelfInitExpr() argument 329 if (VD->getType()->isRecordType()) in getSelfInitExpr() 331 if (Expr *Init = VD->getInit()) { in getSelfInitExpr() [all …]
|
H A D | UnsafeBufferUsage.cpp | 1216 bool hasUnclaimedUses(const VarDecl *VD) const { in hasUnclaimedUses() 1218 return any_of(*Uses, [VD](const DeclRefExpr *DRE) { in hasUnclaimedUses() 1219 return DRE->getDecl()->getCanonicalDecl() == VD->getCanonicalDecl(); in hasUnclaimedUses() 1223 UseSetTy getUnclaimedUses(const VarDecl *VD) const { in getUnclaimedUses() 1226 if (use->getDecl()->getCanonicalDecl() == VD->getCanonicalDecl()) { in getUnclaimedUses() 1235 if (const auto *VD = dyn_cast<VarDecl>(D)) { in discoverDecl() local 1241 Defs[VD] = DS; in discoverDecl() 1246 const DeclStmt *lookupDecl(const VarDecl *VD) const { in lookupDecl() 1247 return Defs.lookup(VD); in lookupDecl() 1519 if (const auto *VD = dyn_cast<VarDecl>(DRE->getDecl())) { in groupWarningGadgetsByVar() local [all …]
|
H A D | ThreadSafetyCommon.cpp | 221 til::LiteralPtr *SExprBuilder::createVariable(const VarDecl *VD) { in createVariable() argument 222 return new (Arena) til::LiteralPtr(VD); in createVariable() 310 const auto *VD = cast<ValueDecl>(DRE->getDecl()->getCanonicalDecl()); in translateDeclRefExpr() local 313 if (const auto *PV = dyn_cast<ParmVarDecl>(VD)) { in translateDeclRefExpr() 334 VD = isa<FunctionDecl>(D) in translateDeclRefExpr() 340 return new (Arena) til::LiteralPtr(VD); in translateDeclRefExpr() 369 auto *VD = getValueDeclFromSExpr(E); in hasAnyPointerType() local 370 if (VD && VD->getType()->isAnyPointerType()) in hasAnyPointerType() 397 if (const auto *VD = dyn_cast<CXXMethodDecl>(D)) in translateMemberExpr() local 398 D = getFirstVirtualDecl(VD); in translateMemberExpr() [all …]
|
H A D | LiveVariables.cpp | 255 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 …]
|
/freebsd/contrib/llvm-project/clang/lib/AST/Interp/ |
H A D | Program.cpp | 109 std::optional<unsigned> Program::getGlobal(const ValueDecl *VD) { in getGlobal() argument 110 if (auto It = GlobalIndices.find(VD); It != GlobalIndices.end()) in getGlobal() 115 for (const Decl *P = VD->getPreviousDecl(); P; P = P->getPreviousDecl()) { in getGlobal() 124 GlobalIndices[VD] = *Index; in getGlobal() 135 std::optional<unsigned> Program::getOrCreateGlobal(const ValueDecl *VD, in getOrCreateGlobal() argument 137 if (auto Idx = getGlobal(VD)) in getOrCreateGlobal() 140 if (auto Idx = createGlobal(VD, Init)) { in getOrCreateGlobal() 141 GlobalIndices[VD] = *Idx; in getOrCreateGlobal() 147 std::optional<unsigned> Program::getOrCreateDummy(const ValueDecl *VD) { in getOrCreateDummy() argument 149 if (auto It = DummyVariables.find(VD); It != DummyVariables.end()) in getOrCreateDummy() [all …]
|
H A D | Interp.cpp | 62 const ValueDecl *VD) { in diagnoseMissingInitializer() argument 64 S.FFDiag(E, diag::note_constexpr_var_init_unknown, 1) << VD; in diagnoseMissingInitializer() 65 S.Note(VD->getLocation(), diag::note_declared_at) << VD->getSourceRange(); in diagnoseMissingInitializer() 69 const ValueDecl *VD); 86 else if (const auto *VD = dyn_cast<VarDecl>(D); in diagnoseUnknownDecl() local 87 VD && !VD->getAnyInitializer()) in diagnoseUnknownDecl() 88 diagnoseMissingInitializer(S, OpPC, VD); in diagnoseUnknownDecl() 94 const ValueDecl *VD) { in diagnoseNonConstVariable() argument 99 if (const auto *VarD = dyn_cast<VarDecl>(VD); in diagnoseNonConstVariable() 102 diagnoseMissingInitializer(S, OpPC, VD); in diagnoseNonConstVariable() [all …]
|
H A D | Compiler.cpp | 30 DeclScope(Compiler<Emitter> *Ctx, const ValueDecl *VD) in DeclScope() argument 31 : LocalScope<Emitter>(Ctx, VD), Scope(Ctx->P, VD), in DeclScope() 34 Ctx->GlobalDecl = Context::shouldBeGloballyIndexed(VD); in DeclScope() 35 Ctx->InitializingDecl = VD; in DeclScope() 36 Ctx->InitStack.push_back(InitLink::Decl(VD)); in DeclScope() 1741 if (const auto *VD = dyn_cast<VarDecl>(Member)) { in VisitMemberExpr() local 1745 if (auto GlobalIndex = P.getGlobal(VD)) in VisitMemberExpr() 3466 if (const auto *VD = in allocateLocalPrimitive() local 3468 assert(!P.getGlobal(VD)); in allocateLocalPrimitive() 3469 assert(!Locals.contains(VD)); in allocateLocalPrimitive() [all …]
|
H A D | Program.h | 79 std::optional<unsigned> getGlobal(const ValueDecl *VD); 83 std::optional<unsigned> getOrCreateGlobal(const ValueDecl *VD, 87 std::optional<unsigned> getOrCreateDummy(const ValueDecl *VD); 90 std::optional<unsigned> createGlobal(const ValueDecl *VD, const Expr *Init); 135 DeclScope(Program &P, const ValueDecl *VD) : P(P) { in DeclScope() argument 136 P.startDeclaration(VD); in DeclScope()
|
/freebsd/contrib/llvm-project/clang/lib/AST/ |
H A D | StmtIterator.cpp | 48 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()
|
H A D | AttrImpl.cpp | 153 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/StaticAnalyzer/Core/ |
H A D | LoopUnrolling.cpp | 186 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 D | CheckerHelpers.cpp | 58 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 D | InterfaceStubFunctionsConsumer.cpp | 57 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/include/clang/Analysis/Analyses/ |
H A D | UnsafeBufferUsage.h | 71 void set(const VarDecl *VD, Kind K) { Map[VD] = K; } in set() argument 73 Kind lookup(const VarDecl *VD) const { in lookup() argument 74 auto I = Map.find(VD); in lookup() 133 void addDebugNoteForVar(const VarDecl *VD, SourceLocation Loc, in addDebugNoteForVar() argument 136 DebugNotesByVar[VD].push_back(std::make_pair(Loc, Text)); in addDebugNoteForVar()
|
/freebsd/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/ |
H A D | CastToStructChecker.cpp | 78 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()
|