Home
last modified time | relevance | path

Searched refs:GV (Results 1 – 25 of 209) sorted by relevance

123456789

/freebsd-9-stable/contrib/llvm/lib/Transforms/IPO/
DConstantMerge.cpp48 bool hasKnownAlignment(GlobalVariable *GV) const;
52 unsigned getAlignment(GlobalVariable *GV) const;
74 GlobalValue *GV = cast<GlobalValue>(Operand); in FindUsedValues() local
75 UsedValues.insert(GV); in FindUsedValues()
91 bool ConstantMerge::hasKnownAlignment(GlobalVariable *GV) const { in hasKnownAlignment()
92 return TD || GV->getAlignment() != 0; in hasKnownAlignment()
95 unsigned ConstantMerge::getAlignment(GlobalVariable *GV) const { in getAlignment()
96 unsigned Align = GV->getAlignment(); in getAlignment()
100 return TD->getPreferredAlignment(GV); in getAlignment()
131 GlobalVariable *GV = GVI++; in runOnModule() local
[all …]
DGlobalOpt.cpp82 bool ProcessGlobal(GlobalVariable *GV,Module::global_iterator &GVI);
83 bool ProcessInternalGlobal(GlobalVariable *GV,Module::global_iterator &GVI,
103 static bool isLeakCheckerRoot(GlobalVariable *GV) { in isLeakCheckerRoot() argument
112 if (GV->hasPrivateLinkage()) in isLeakCheckerRoot()
116 Types.push_back(cast<PointerType>(GV->getType())->getElementType()); in isLeakCheckerRoot()
181 static bool CleanupPointerRootUsers(GlobalVariable *GV, in CleanupPointerRootUsers() argument
199 for (Value::use_iterator UI = GV->use_begin(), E = GV->use_end(); in CleanupPointerRootUsers()
238 CleanupPointerRootUsers(GV, TLI); in CleanupPointerRootUsers()
388 static bool IsUserOfGlobalSafeForSRA(User *U, GlobalValue *GV) { in IsUserOfGlobalSafeForSRA() argument
454 static bool GlobalUsersSafeToSRA(GlobalValue *GV) { in GlobalUsersSafeToSRA() argument
[all …]
DGlobalDCE.cpp49 void GlobalIsNeeded(GlobalValue *GV);
52 bool RemoveUnusedGlobalValue(GlobalValue &GV);
167 if (GlobalVariable *GV = dyn_cast<GlobalVariable>(G)) { in GlobalIsNeeded() local
170 if (GV->hasInitializer()) in GlobalIsNeeded()
171 MarkUsedGlobalsAsNeeded(GV->getInitializer()); in GlobalIsNeeded()
188 if (GlobalValue *GV = dyn_cast<GlobalValue>(*U)) in GlobalIsNeeded() local
189 GlobalIsNeeded(GV); in GlobalIsNeeded()
196 if (GlobalValue *GV = dyn_cast<GlobalValue>(C)) in MarkUsedGlobalsAsNeeded() local
197 return GlobalIsNeeded(GV); in MarkUsedGlobalsAsNeeded()
215 bool GlobalDCE::RemoveUnusedGlobalValue(GlobalValue &GV) { in RemoveUnusedGlobalValue() argument
[all …]
DExtractGV.cpp28 static void makeVisible(GlobalValue &GV, bool Delete) { in makeVisible() argument
29 bool Local = GV.hasLocalLinkage(); in makeVisible()
31 GV.setVisibility(GlobalValue::HiddenVisibility); in makeVisible()
34 GV.setLinkage(GlobalValue::ExternalLinkage); in makeVisible()
38 if (!GV.hasLinkOnceLinkage()) { in makeVisible()
39 assert(!GV.isDiscardableIfUnused()); in makeVisible()
44 switch(GV.getLinkage()) { in makeVisible()
48 GV.setLinkage(GlobalValue::WeakAnyLinkage); in makeVisible()
51 GV.setLinkage(GlobalValue::WeakODRLinkage); in makeVisible()
/freebsd-9-stable/contrib/llvm/lib/ExecutionEngine/
DExecutionEngine.cpp83 GVMemoryBlock(const GlobalVariable *GV) in GVMemoryBlock() argument
84 : CallbackVH(const_cast<GlobalVariable*>(GV)) {} in GVMemoryBlock()
89 static char *Create(const GlobalVariable *GV, const DataLayout& TD) { in Create() argument
90 Type *ElTy = GV->getType()->getElementType(); in Create()
94 TD.getPreferredAlignment(GV)) in Create()
96 new(RawMemory) GVMemoryBlock(GV); in Create()
110 char *ExecutionEngine::getMemoryForGV(const GlobalVariable *GV) { in getMemoryForGV() argument
111 return GVMemoryBlock::Create(GV, *getDataLayout()); in getMemoryForGV()
154 void ExecutionEngine::addGlobalMapping(const GlobalValue *GV, void *Addr) { in addGlobalMapping() argument
157 DEBUG(dbgs() << "JIT: Map \'" << GV->getName() in addGlobalMapping()
[all …]
/freebsd-9-stable/contrib/llvm/lib/Target/XCore/
DXCoreLowerThreadLocal.cpp49 bool lowerGlobal(GlobalVariable *GV);
163 static bool rewriteNonInstructionUses(GlobalVariable *GV, Pass *P) { in rewriteNonInstructionUses() argument
165 for (Value::use_iterator I = GV->use_begin(), E = GV->use_end(); I != E; ++I) in rewriteNonInstructionUses()
182 bool XCoreLowerThreadLocal::lowerGlobal(GlobalVariable *GV) { in lowerGlobal() argument
183 Module *M = GV->getParent(); in lowerGlobal()
185 if (!GV->isThreadLocal()) in lowerGlobal()
189 if (!rewriteNonInstructionUses(GV, this) || in lowerGlobal()
190 !GV->getType()->isSized() || isZeroLengthArray(GV->getType())) in lowerGlobal()
194 ArrayType *NewType = createLoweredType(GV->getType()->getElementType()); in lowerGlobal()
196 if (GV->hasInitializer()) in lowerGlobal()
[all …]
DXCoreAsmPrinter.cpp72 void emitArrayBound(MCSymbol *Sym, const GlobalVariable *GV);
73 virtual void EmitGlobalVariable(const GlobalVariable *GV);
82 void XCoreAsmPrinter::emitArrayBound(MCSymbol *Sym, const GlobalVariable *GV) { in emitArrayBound() argument
83 assert(((GV->hasExternalLinkage() || in emitArrayBound()
84 GV->hasWeakLinkage()) || in emitArrayBound()
85 GV->hasLinkOnceLinkage()) && "Unexpected linkage"); in emitArrayBound()
87 cast<PointerType>(GV->getType())->getElementType())) { in emitArrayBound()
95 if (GV->hasWeakLinkage() || GV->hasLinkOnceLinkage()) { in emitArrayBound()
102 void XCoreAsmPrinter::EmitGlobalVariable(const GlobalVariable *GV) { in EmitGlobalVariable() argument
104 if (!GV->hasInitializer() || in EmitGlobalVariable()
[all …]
/freebsd-9-stable/contrib/llvm/lib/CodeGen/
DTargetLoweringObjectFileImpl.cpp47 TargetLoweringObjectFileELF::getCFIPersonalitySymbol(const GlobalValue *GV, in getCFIPersonalitySymbol() argument
55 return getSymbol(*Mang, GV); in getCFIPersonalitySymbol()
58 getSymbol(*Mang, GV)->getName()); in getCFIPersonalitySymbol()
91 getTTypeGlobalReference(const GlobalValue *GV, Mangler *Mang, in getTTypeGlobalReference() argument
99 Mang->getNameWithPrefix(Name, GV, true); in getTTypeGlobalReference()
107 MCSymbol *Sym = getSymbol(*Mang, GV); in getTTypeGlobalReference()
108 StubSym = MachineModuleInfoImpl::StubValueTy(Sym, !GV->hasLocalLinkage()); in getTTypeGlobalReference()
117 getTTypeGlobalReference(GV, Mang, MMI, Encoding, Streamer); in getTTypeGlobalReference()
204 getExplicitSectionGlobal(const GlobalValue *GV, SectionKind Kind, in getExplicitSectionGlobal() argument
206 StringRef SectionName = GV->getSection(); in getExplicitSectionGlobal()
[all …]
/freebsd-9-stable/contrib/llvm/lib/Target/Hexagon/
DHexagonTargetObjectFile.cpp57 bool HexagonTargetObjectFile::IsGlobalInSmallSection(const GlobalValue *GV, in IsGlobalInSmallSection() argument
62 if (GV->isDeclaration() || GV->hasAvailableExternallyLinkage()) in IsGlobalInSmallSection()
67 return IsGlobalInSmallSection(GV, TM, getKindForGlobal(GV, TM)); in IsGlobalInSmallSection()
73 IsGlobalInSmallSection(const GlobalValue *GV, const TargetMachine &TM, in IsGlobalInSmallSection() argument
76 const GlobalVariable *GVA = dyn_cast<GlobalVariable>(GV); in IsGlobalInSmallSection()
81 Type *Ty = GV->getType()->getElementType(); in IsGlobalInSmallSection()
89 SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind, in SelectSectionForGlobal() argument
93 if (Kind.isBSS() && IsGlobalInSmallSection(GV, TM, Kind)) in SelectSectionForGlobal()
95 if (Kind.isDataNoRel() && IsGlobalInSmallSection(GV, TM, Kind)) in SelectSectionForGlobal()
99 return TargetLoweringObjectFileELF::SelectSectionForGlobal(GV, Kind, Mang,TM); in SelectSectionForGlobal()
/freebsd-9-stable/contrib/llvm/lib/Target/
DTargetLoweringObjectFile.cpp50 static bool isSuitableForBSS(const GlobalVariable *GV, bool NoZerosInBSS) { in isSuitableForBSS() argument
51 const Constant *C = GV->getInitializer(); in isSuitableForBSS()
58 if (GV->isConstant()) in isSuitableForBSS()
62 if (!GV->getSection().empty()) in isSuitableForBSS()
103 const GlobalValue *GV) const { in getSymbol()
105 M.getNameWithPrefix(NameStr, GV, false); in getSymbol()
111 getCFIPersonalitySymbol(const GlobalValue *GV, Mangler *Mang, in getCFIPersonalitySymbol() argument
113 return getSymbol(*Mang, GV); in getCFIPersonalitySymbol()
127 SectionKind TargetLoweringObjectFile::getKindForGlobal(const GlobalValue *GV, in getKindForGlobal() argument
129 assert(!GV->isDeclaration() && !GV->hasAvailableExternallyLinkage() && in getKindForGlobal()
[all …]
DMangler.cpp91 const GlobalValue *GV, bool isImplicitlyPrivate, in getNameWithPrefix() argument
94 if (GV->hasPrivateLinkage() || isImplicitlyPrivate) in getNameWithPrefix()
96 else if (GV->hasLinkerPrivateLinkage() || GV->hasLinkerPrivateWeakLinkage()) in getNameWithPrefix()
100 if (GV->hasName()) { in getNameWithPrefix()
101 StringRef Name = GV->getName(); in getNameWithPrefix()
110 unsigned &ID = AnonGlobalIDs[GV]; in getNameWithPrefix()
121 if (const Function *F = dyn_cast<Function>(GV)) { in getNameWithPrefix()
/freebsd-9-stable/contrib/llvm/include/llvm/Target/
DTargetLoweringObjectFile.h67 virtual bool shouldEmitUsedDirectiveFor(const GlobalValue *GV, in shouldEmitUsedDirectiveFor() argument
69 return GV != 0; in shouldEmitUsedDirectiveFor()
78 static SectionKind getKindForGlobal(const GlobalValue *GV,
84 const MCSection *SectionForGlobal(const GlobalValue *GV,
91 const MCSection *SectionForGlobal(const GlobalValue *GV, in SectionForGlobal() argument
94 return SectionForGlobal(GV, getKindForGlobal(GV, TM), Mang, TM); in SectionForGlobal()
101 getExplicitSectionGlobal(const GlobalValue *GV, SectionKind Kind,
107 getSpecialCasedSectionGlobals(const GlobalValue *GV, Mangler *Mang, in getSpecialCasedSectionGlobals() argument
116 getTTypeGlobalReference(const GlobalValue *GV, Mangler *Mang,
122 MCSymbol *getSymbol(Mangler &M, const GlobalValue *GV) const;
[all …]
/freebsd-9-stable/contrib/llvm/lib/Target/Mips/
DMipsTargetObjectFile.cpp64 bool MipsTargetObjectFile::IsGlobalInSmallSection(const GlobalValue *GV, in IsGlobalInSmallSection() argument
66 if (GV->isDeclaration() || GV->hasAvailableExternallyLinkage()) in IsGlobalInSmallSection()
69 return IsGlobalInSmallSection(GV, TM, getKindForGlobal(GV, TM)); in IsGlobalInSmallSection()
75 IsGlobalInSmallSection(const GlobalValue *GV, const TargetMachine &TM, in IsGlobalInSmallSection() argument
85 const GlobalVariable *GVA = dyn_cast<GlobalVariable>(GV); in IsGlobalInSmallSection()
98 Type *Ty = GV->getType()->getElementType(); in IsGlobalInSmallSection()
105 SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind, in SelectSectionForGlobal() argument
111 if (Kind.isBSS() && IsGlobalInSmallSection(GV, TM, Kind)) in SelectSectionForGlobal()
113 if (Kind.isDataNoRel() && IsGlobalInSmallSection(GV, TM, Kind)) in SelectSectionForGlobal()
117 return TargetLoweringObjectFileELF::SelectSectionForGlobal(GV, Kind, Mang,TM); in SelectSectionForGlobal()
/freebsd-9-stable/contrib/llvm/lib/Target/NVPTX/
DNVPTXGenericToNVVM.cpp50 Value *getOrInsertCVTA(Module *M, Function *F, GlobalVariable *GV,
86 GlobalVariable *GV = I++; in runOnModule() local
87 if (GV->getType()->getAddressSpace() == llvm::ADDRESS_SPACE_GENERIC && in runOnModule()
88 !llvm::isTexture(*GV) && !llvm::isSurface(*GV) && in runOnModule()
89 !GV->getName().startswith("llvm.")) { in runOnModule()
91 M, GV->getType()->getElementType(), GV->isConstant(), in runOnModule()
92 GV->getLinkage(), GV->hasInitializer() ? GV->getInitializer() : NULL, in runOnModule()
93 "", GV, GV->getThreadLocalMode(), llvm::ADDRESS_SPACE_GLOBAL); in runOnModule()
94 NewGV->copyAttributesFrom(GV); in runOnModule()
95 GVMap[GV] = NewGV; in runOnModule()
[all …]
/freebsd-9-stable/contrib/llvm/include/llvm/CodeGen/
DTargetLoweringObjectFileImpl.h51 getExplicitSectionGlobal(const GlobalValue *GV, SectionKind Kind,
55 SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind,
61 getTTypeGlobalReference(const GlobalValue *GV, Mangler *Mang,
67 getCFIPersonalitySymbol(const GlobalValue *GV, Mangler *Mang,
90 SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind,
94 getExplicitSectionGlobal(const GlobalValue *GV, SectionKind Kind,
102 virtual bool shouldEmitUsedDirectiveFor(const GlobalValue *GV,
108 getTTypeGlobalReference(const GlobalValue *GV, Mangler *Mang,
114 getCFIPersonalitySymbol(const GlobalValue *GV, Mangler *Mang,
125 getExplicitSectionGlobal(const GlobalValue *GV, SectionKind Kind,
[all …]
/freebsd-9-stable/contrib/llvm/lib/Target/SystemZ/
DSystemZConstantPoolValue.cpp21 : MachineConstantPoolValue(gv->getType()), GV(gv), Modifier(modifier) {} in SystemZConstantPoolValue()
24 SystemZConstantPoolValue::Create(const GlobalValue *GV, in Create() argument
26 return new SystemZConstantPoolValue(GV, Modifier); in Create()
48 if (ZCPV->GV == GV && ZCPV->Modifier == Modifier) in getExistingMachineCPValue()
56 ID.AddPointer(GV); in addSelectionDAGCSEId()
61 O << GV << "@" << int(Modifier); in print()
DSystemZSubtarget.cpp43 static bool bindsLocally(const GlobalValue *GV, Reloc::Model RM) { in bindsLocally() argument
48 return GV->hasLocalLinkage() || !GV->hasDefaultVisibility(); in bindsLocally()
51 bool SystemZSubtarget::isPC32DBLSymbol(const GlobalValue *GV, in isPC32DBLSymbol() argument
56 if (GV->getAlignment() == 1) in isPC32DBLSymbol()
61 return bindsLocally(GV, RM); in isPC32DBLSymbol()
/freebsd-9-stable/contrib/llvm/lib/ExecutionEngine/Interpreter/
DExternalFunctions.cpp306 GenericValue GV; in lle_X_atexit() local
307 GV.IntVal = 0; in lle_X_atexit()
308 return GV; in lle_X_atexit()
340 GenericValue GV; in lle_X_sprintf() local
341 GV.IntVal = APInt(32, strlen(FmtStr)); in lle_X_sprintf()
344 case 0: return GV; // Null terminator... in lle_X_sprintf()
409 return GV; in lle_X_sprintf()
421 GenericValue GV = lle_X_sprintf(FT, NewArgs); in lle_X_printf() local
423 return GV; in lle_X_printf()
436 GenericValue GV; in lle_X_sscanf() local
[all …]
/freebsd-9-stable/contrib/llvm/tools/clang/lib/CodeGen/
DCodeGenModule.cpp213 llvm::GlobalValue *GV = Alias->getAliasedGlobal(); in checkAliases() local
214 if (GV->isDeclaration()) { in checkAliases()
363 void CodeGenModule::setGlobalVisibility(llvm::GlobalValue *GV, in setGlobalVisibility() argument
366 if (GV->hasLocalLinkage()) { in setGlobalVisibility()
367 GV->setVisibility(llvm::GlobalValue::DefaultVisibility); in setGlobalVisibility()
373 if (LV.isVisibilityExplicit() || !GV->hasAvailableExternallyLinkage()) in setGlobalVisibility()
374 GV->setVisibility(GetLLVMVisibility(LV.getVisibility())); in setGlobalVisibility()
400 void CodeGenModule::setTLSMode(llvm::GlobalVariable *GV, in setTLSMode() argument
413 GV->setThreadLocalMode(TLM); in setTLSMode()
418 void CodeGenModule::setTypeVisibility(llvm::GlobalValue *GV, in setTypeVisibility() argument
[all …]
/freebsd-9-stable/contrib/llvm/lib/Analysis/IPA/
DGlobalsModRef.cpp57 unsigned getInfoForGlobal(const GlobalValue *GV) const { in getInfoForGlobal()
60 GlobalInfo.find(GV); in getInfoForGlobal()
184 bool AnalyzeIndirectGlobalMemory(GlobalValue *GV);
304 bool GlobalsModRef::AnalyzeIndirectGlobalMemory(GlobalValue *GV) { in AnalyzeIndirectGlobalMemory() argument
311 for (Value::use_iterator I = GV->use_begin(), E = GV->use_end(); I != E; ++I){ in AnalyzeIndirectGlobalMemory()
323 if (SI->getOperand(0) == GV) return false; in AnalyzeIndirectGlobalMemory()
338 if (AnalyzeUsesOfPointer(Ptr, ReadersWriters, ReadersWriters, GV)) in AnalyzeIndirectGlobalMemory()
352 AllocsForIndirectGlobals[AllocRelatedValues.back()] = GV; in AnalyzeIndirectGlobalMemory()
355 IndirectGlobals.insert(GV); in AnalyzeIndirectGlobalMemory()
519 if (GlobalVariable *GV = dyn_cast<GlobalVariable>(LI->getOperand(0))) in alias() local
[all …]
/freebsd-9-stable/contrib/llvm/tools/llvm-extract/
Dllvm-extract.cpp150 GlobalValue *GV = M->getNamedGlobal(ExtractGlobals[i]); in main() local
151 if (!GV) { in main()
156 GVs.insert(GV); in main()
168 for (Module::global_iterator GV = M->global_begin(), in main() local
169 E = M->global_end(); GV != E; GV++) { in main()
170 if (RegEx.match(GV->getName())) { in main()
171 GVs.insert(&*GV); in main()
184 GlobalValue *GV = M->getFunction(ExtractFuncs[i]); in main() local
185 if (!GV) { in main()
190 GVs.insert(GV); in main()
[all …]
/freebsd-9-stable/contrib/llvm/tools/bugpoint/
DExtractFunction.cpp51 Function* globalInitUsesExternalBA(GlobalVariable* GV) { in globalInitUsesExternalBA() argument
52 if (!GV->hasInitializer()) in globalInitUsesExternalBA()
55 Constant *I = GV->getInitializer(); in globalInitUsesExternalBA()
230 GlobalVariable *GV = M1->getNamedGlobal(GlobalName); in SplitStaticCtorDtor() local
231 if (!GV || GV->isDeclaration() || GV->hasLocalLinkage() || in SplitStaticCtorDtor()
232 !GV->use_empty()) return; in SplitStaticCtorDtor()
235 ConstantArray *InitList = dyn_cast<ConstantArray>(GV->getInitializer()); in SplitStaticCtorDtor()
264 GV->eraseFromParent(); in SplitStaticCtorDtor()
272 GV = M2->getNamedGlobal(GlobalName); in SplitStaticCtorDtor()
273 assert(GV && "Not a clone of M1?"); in SplitStaticCtorDtor()
[all …]
/freebsd-9-stable/contrib/llvm/lib/Target/X86/
DX86Subtarget.cpp55 ClassifyGlobalReference(const GlobalValue *GV, const TargetMachine &TM) const { in ClassifyGlobalReference() argument
58 if (GV->hasDLLImportLinkage()) in ClassifyGlobalReference()
64 bool isDecl = GV->hasAvailableExternallyLinkage(); in ClassifyGlobalReference()
65 if (GV->isDeclaration() && !GV->isMaterializable()) in ClassifyGlobalReference()
78 if (GV->hasDefaultVisibility() && in ClassifyGlobalReference()
79 (isDecl || GV->isWeakForLinker())) in ClassifyGlobalReference()
85 if (!GV->hasLocalLinkage() && GV->hasDefaultVisibility()) in ClassifyGlobalReference()
94 if (GV->hasLocalLinkage() || GV->hasHiddenVisibility()) in ClassifyGlobalReference()
105 if (!isDecl && !GV->isWeakForLinker()) in ClassifyGlobalReference()
110 if (!GV->hasHiddenVisibility()) // Non-hidden $non_lazy_ptr reference. in ClassifyGlobalReference()
[all …]
/freebsd-9-stable/contrib/llvm/lib/Target/ARM/
DARMSubtarget.cpp258 ARMSubtarget::GVIsIndirectSymbol(const GlobalValue *GV, in GVIsIndirectSymbol() argument
265 bool isDecl = GV->hasAvailableExternallyLinkage(); in GVIsIndirectSymbol()
266 if (GV->isDeclaration() && !GV->isMaterializable()) in GVIsIndirectSymbol()
271 if (GV->hasLocalLinkage() || GV->hasHiddenVisibility()) in GVIsIndirectSymbol()
278 if (!isDecl && !GV->isWeakForLinker()) in GVIsIndirectSymbol()
283 if (!GV->hasHiddenVisibility()) // Non-hidden $non_lazy_ptr reference. in GVIsIndirectSymbol()
288 if (isDecl || GV->hasCommonLinkage()) in GVIsIndirectSymbol()
296 if (!isDecl && !GV->isWeakForLinker()) in GVIsIndirectSymbol()
301 if (!GV->hasHiddenVisibility()) // Non-hidden $non_lazy_ptr reference. in GVIsIndirectSymbol()
/freebsd-9-stable/contrib/llvm/lib/IR/
DGlobals.cpp68 if (const GlobalVariable *GV = dyn_cast<GlobalVariable>(this)) in isDeclaration() local
69 return GV->getNumOperands() == 0; in isDeclaration()
236 if (GlobalValue *GV = dyn_cast<GlobalValue>(C)) in getAliasedGlobal() local
237 return GV; in getAliasedGlobal()
254 GlobalValue *GV = getAliasedGlobal(); in resolveAliasedGlobal() local
255 Visited.insert(GV); in resolveAliasedGlobal()
258 while (GlobalAlias *GA = dyn_cast<GlobalAlias>(GV)) { in resolveAliasedGlobal()
262 GV = GA->getAliasedGlobal(); in resolveAliasedGlobal()
264 if (!Visited.insert(GV)) in resolveAliasedGlobal()
268 return GV; in resolveAliasedGlobal()

123456789