HomeSort by: relevance | last modified time | path
    Searched refs:GV (Results 1 - 25 of 358) sorted by relevancy

1 2 3 4 5 6 7 8 91011>>

  /src/external/apache2/llvm/dist/llvm/tools/llvm-reduce/deltas/
ReduceGlobalValues.cpp 20 static bool isValidDSOLocalReductionGV(GlobalValue &GV) {
21 return GV.isDSOLocal() && !GV.isImplicitDSOLocal();
30 for (auto &GV : Program->global_values())
31 if (isValidDSOLocalReductionGV(GV) && !O.shouldKeep()) {
32 GV.setDSOLocal(false);
43 for (auto &GV : Program->global_values())
44 if (isValidDSOLocalReductionGV(GV))
45 outs() << "\t" << ++GVCount << ": " << GV.getName() << "\n";
ReduceGlobalVarInitializers.cpp 26 for (auto &GV : Program->globals())
27 if (GV.hasInitializer() && !O.shouldKeep()) {
28 GV.setInitializer(nullptr);
29 GV.setLinkage(GlobalValue::LinkageTypes::ExternalLinkage);
30 GV.setComdat(nullptr);
41 for (auto &GV : Program->globals())
42 if (GV.hasInitializer())
43 outs() << "\t" << ++GVCount << ": " << GV.getName() << "\n";
ReduceGlobalVars.cpp 27 for (auto &GV : Program->globals())
29 GVsToKeep.insert(&GV);
34 for (auto &GV : Program->globals())
35 if (!GVsToKeep.count(&GV)) {
36 for (auto *U : GV.users())
40 GV.replaceAllUsesWith(UndefValue::get(GV.getType()));
41 ToRemove.push_back(&GV);
53 for (auto *GV : ToRemove)
54 GV->eraseFromParent()
    [all...]
  /src/external/apache2/llvm/dist/llvm/lib/Analysis/
ValueLatticeUtils.cpp 27 bool llvm::canTrackGlobalVariableInterprocedurally(GlobalVariable *GV) {
28 if (GV->isConstant() || !GV->hasLocalLinkage() ||
29 !GV->hasDefinitiveInitializer())
31 return all_of(GV->users(), [&](User *U) {
35 return Store->getValueOperand() != GV && !Store->isVolatile();
  /src/external/apache2/llvm/dist/llvm/lib/Transforms/IPO/
ExtractGV.cpp 21 /// Make sure GV is visible from both modules. Delete is true if it is
23 /// This also makes sure GV cannot be dropped so that references from
25 static void makeVisible(GlobalValue &GV, bool Delete) {
26 bool Local = GV.hasLocalLinkage();
28 GV.setLinkage(GlobalValue::ExternalLinkage);
30 GV.setVisibility(GlobalValue::HiddenVisibility);
34 if (!GV.hasLinkOnceLinkage()) {
35 assert(!GV.isDiscardableIfUnused());
39 // Map linkonce* to weak* so that llvm doesn't drop this GV.
40 switch(GV.getLinkage())
    [all...]
ConstantMerge.cpp 53 GlobalValue *GV = cast<GlobalValue>(Operand);
54 UsedValues.insert(GV);
70 static bool hasMetadataOtherThanDebugLoc(const GlobalVariable *GV) {
72 GV->getAllMetadata(MDs);
87 static Align getAlign(GlobalVariable *GV) {
88 return GV->getAlign().getValueOr(
89 GV->getParent()->getDataLayout().getPreferredAlign(GV));
93 isUnmergeableGlobal(GlobalVariable *GV,
96 return !GV->isConstant() || !GV->hasDefinitiveInitializer() |
    [all...]
GlobalSplit.cpp 41 static bool splitGlobal(GlobalVariable &GV) {
44 if (!GV.hasLocalLinkage())
48 auto *Init = dyn_cast_or_null<ConstantStruct>(GV.getInitializer());
56 for (User *U : GV.users()) {
69 GV.getMetadata(LLVMContext::MD_type, Types);
71 const DataLayout &DL = GV.getParent()->getDataLayout();
74 IntegerType *Int32Ty = Type::getInt32Ty(GV.getContext());
80 new GlobalVariable(*GV.getParent(), Init->getOperand(I)->getType(),
81 GV.isConstant(), GlobalValue::PrivateLinkage,
82 Init->getOperand(I), GV.getName() + "." + utostr(I))
    [all...]
ElimAvailExtern.cpp 37 for (GlobalVariable &GV : M.globals()) {
38 if (!GV.hasAvailableExternallyLinkage())
40 if (GV.hasInitializer()) {
41 Constant *Init = GV.getInitializer();
42 GV.setInitializer(nullptr);
46 GV.removeDeadConstantUsers();
47 GV.setLinkage(GlobalValue::ExternalLinkage);
Internalize.cpp 66 bool operator()(const GlobalValue &GV) {
67 return ExternalNames.count(GV.getName());
89 bool InternalizePass::shouldPreserveGV(const GlobalValue &GV) {
91 if (GV.isDeclaration())
95 if (GV.hasAvailableExternallyLinkage())
99 if (GV.hasDLLExportStorageClass())
103 if (GV.hasLocalLinkage())
107 if (AlwaysPreserved.count(GV.getName()))
110 return MustPreserveGV(GV);
114 GlobalValue &GV, const DenseSet<const Comdat *> &ExternalComdats)
    [all...]
  /src/external/apache2/llvm/dist/llvm/lib/Target/AMDGPU/
AMDGPUMachineFunction.cpp 42 const GlobalVariable &GV) {
43 auto Entry = LocalMemoryObjects.insert(std::make_pair(&GV, 0));
48 DL.getValueOrABITypeAlignment(GV.getAlign(), GV.getValueType());
56 StaticLDSSize += DL.getTypeAllocSize(GV.getValueType());
67 const GlobalVariable *GV = M->getNamedGlobal("llvm.amdgcn.module.lds");
68 if (GV) {
69 unsigned Offset = allocateLDSGlobal(M->getDataLayout(), *GV);
78 const GlobalVariable &GV) {
79 assert(DL.getTypeAllocSize(GV.getValueType()).isZero())
    [all...]
  /src/external/apache2/llvm/dist/llvm/lib/Transforms/Utils/
SplitModule.cpp 62 const GlobalValue *GV, const User *U) {
67 GVtoClusterMap.unionSets(GV, F);
70 GVtoClusterMap.unionSets(GV, cast<GlobalValue>(U));
76 // Adds all GlobalValue users of V to the same cluster as GV.
78 const GlobalValue *GV, const Value *V) {
84 // For each constant that is not a GV (a pure const) recurse.
89 addNonConstUser(GVtoClusterMap, GV, UU);
107 auto recordGVSet = [&GVtoClusterMap, &ComdatMembers](GlobalValue &GV) {
108 if (GV.isDeclaration())
111 if (!GV.hasName()
    [all...]
FunctionImportUtils.cpp 77 const GlobalValue &GV) const {
78 if (!GV.hasLocalLinkage())
81 if (GV.hasSection())
83 if (Used.count(const_cast<GlobalValue *>(&GV)))
195 void FunctionImportGlobalProcessing::processGlobalForThinLTO(GlobalValue &GV) {
198 if (GV.hasName()) {
199 VI = ImportIndex.getValueInfo(GV.getGUID());
202 if (Function *F = dyn_cast<Function>(&GV)) {
217 // We should always have a ValueInfo (i.e. GV in index) for definitions when
219 assert(VI || GV.isDeclaration() |
    [all...]
NameAnonGlobals.cpp 46 for (auto &GV : TheModule.globals()) {
47 if (GV.isDeclaration() || GV.hasLocalLinkage() || !GV.hasName())
49 auto Name = GV.getName();
69 auto RenameIfNeed = [&](GlobalValue &GV) {
70 if (GV.hasName())
72 GV.setName(Twine("anon.") + ModuleHash.get() + "." + Twine(count++));
  /src/external/apache2/llvm/dist/llvm/lib/Target/
TargetMachine.cpp 77 static TLSModel::Model getSelectedTLSModel(const GlobalValue *GV) {
78 switch (GV->getThreadLocalMode()) {
95 const GlobalValue *GV) const {
100 // just return false in here if we have a GV, as we know it is
104 // In the case of ExternalSymbolSDNode, GV is null and we should just return
111 if (!GV)
114 // If the IR producer requested that this GV be treated as dso local, obey.
115 if (GV->isDSOLocal())
118 // DLLImport explicitly marks the GV as external.
119 if (GV->hasDLLImportStorageClass()
    [all...]
  /src/external/apache2/llvm/dist/llvm/lib/Target/AMDGPU/Utils/
AMDGPULDSUtils.cpp 27 Align getAlign(DataLayout const &DL, const GlobalVariable *GV) {
28 return DL.getValueOrABITypeAlignment(GV->getPointerAlignment(DL),
29 GV->getValueType());
79 for (auto &GV : M.globals()) {
80 if (GV.getType()->getPointerAddressSpace() != AMDGPUAS::LOCAL_ADDRESS) {
83 if (!GV.hasInitializer()) {
90 if (!isa<UndefValue>(GV.getInitializer())) {
95 if (GV.isConstant()) {
101 if (std::none_of(GV.user_begin(), GV.user_end(), [&](User *U)
    [all...]
  /src/external/apache2/llvm/dist/llvm/lib/Target/Sparc/
SparcTargetObjectFile.cpp 24 const GlobalValue *GV, unsigned Encoding, const TargetMachine &TM,
30 MCSymbol *SSym = getSymbolWithGlobalValueBase(GV, ".DW.stub", TM);
36 MCSymbol *Sym = TM.getSymbol(GV);
37 StubSym = MachineModuleInfoImpl::StubValueTy(Sym, !GV->hasLocalLinkage());
45 return TargetLoweringObjectFileELF::getTTypeGlobalReference(GV, Encoding, TM,
  /src/external/apache2/llvm/dist/llvm/lib/Target/M68k/
M68kSubtarget.cpp 127 M68kSubtarget::classifyLocalReference(const GlobalValue *GV) const {
165 M68kSubtarget::classifyGlobalReference(const GlobalValue *GV) const {
166 return classifyGlobalReference(GV, *GV->getParent());
169 unsigned char M68kSubtarget::classifyGlobalReference(const GlobalValue *GV,
171 if (TM.shouldAssumeDSOLocal(M, GV))
172 return classifyLocalReference(GV);
212 M68kSubtarget::classifyGlobalFunctionReference(const GlobalValue *GV) const {
213 return classifyGlobalFunctionReference(GV, *GV->getParent())
    [all...]
  /src/external/apache2/llvm/dist/llvm/lib/Target/SystemZ/
SystemZConstantPoolValue.cpp 18 SystemZConstantPoolValue(const GlobalValue *gv,
20 : MachineConstantPoolValue(gv->getType()), GV(gv), Modifier(modifier) {}
23 SystemZConstantPoolValue::Create(const GlobalValue *GV,
25 return new SystemZConstantPoolValue(GV, Modifier);
36 if (ZCPV->GV == GV && ZCPV->Modifier == Modifier)
44 ID.AddPointer(GV);
49 O << GV << "@" << int(Modifier)
    [all...]
SystemZConstantPoolValue.h 33 const GlobalValue *GV;
37 SystemZConstantPoolValue(const GlobalValue *GV,
42 Create(const GlobalValue *GV, SystemZCP::SystemZCPModifier Modifier);
51 const GlobalValue *getGlobalValue() const { return GV; }
  /src/external/apache2/llvm/dist/llvm/lib/LTO/
UpdateCompilerUsed.cpp 38 for (GlobalVariable &GV : TheModule.globals())
39 findLibCallsAndAsm(GV);
89 void findLibCallsAndAsm(GlobalValue &GV) {
91 if (GV.isDeclaration())
95 if (GV.hasPrivateLinkage())
105 if (isa<GlobalAlias>(GV)) {
106 auto *A = cast<GlobalAlias>(&GV);
109 if ((isa<Function>(GV) || FuncAliasee) && Libcalls.count(GV.getName())) {
110 LLVMUsed.push_back(&GV);
    [all...]
  /src/external/apache2/llvm/dist/llvm/include/llvm/Analysis/
ValueLatticeUtils.h 36 bool canTrackGlobalVariableInterprocedurally(GlobalVariable *GV);
  /src/external/apache2/llvm/dist/llvm/include/llvm/IR/
Mangler.h 36 void getNameWithPrefix(raw_ostream &OS, const GlobalValue *GV,
38 void getNameWithPrefix(SmallVectorImpl<char> &OutName, const GlobalValue *GV,
49 void emitLinkerFlagsForGlobalCOFF(raw_ostream &OS, const GlobalValue *GV,
52 void emitLinkerFlagsForUsedCOFF(raw_ostream &OS, const GlobalValue *GV,
  /src/external/apache2/llvm/dist/llvm/lib/Target/AArch64/
AArch64TargetObjectFile.h 33 const MCExpr *getTTypeGlobalReference(const GlobalValue *GV,
39 MCSymbol *getCFIPersonalitySymbol(const GlobalValue *GV,
43 const MCExpr *getIndirectSymViaGOTPCRel(const GlobalValue *GV,
49 void getNameWithPrefix(SmallVectorImpl<char> &OutName, const GlobalValue *GV,
AArch64TargetObjectFile.cpp 34 const GlobalValue *GV, unsigned Encoding, const TargetMachine &TM,
41 const MCSymbol *Sym = TM.getSymbol(GV);
51 GV, Encoding, TM, MMI, Streamer);
55 const GlobalValue *GV, const TargetMachine &TM,
57 return TM.getSymbol(GV);
61 const GlobalValue *GV, const MCSymbol *Sym, const MCValue &MV,
76 SmallVectorImpl<char> &OutName, const GlobalValue *GV,
80 getMangler().getNameWithPrefix(OutName, GV, /* CannotUsePrivateLabel */ true);
  /src/external/apache2/llvm/dist/llvm/lib/Target/X86/
X86TargetObjectFile.cpp 19 const GlobalValue *GV, unsigned Encoding, const TargetMachine &TM,
25 const MCSymbol *Sym = TM.getSymbol(GV);
33 GV, Encoding, TM, MMI, Streamer);
37 const GlobalValue *GV, const TargetMachine &TM,
39 return TM.getSymbol(GV);
43 const GlobalValue *GV, const MCSymbol *Sym, const MCValue &MV,

Completed in 57 milliseconds

1 2 3 4 5 6 7 8 91011>>