Lines Matching +full:pic +full:- +full:no +full:- +full:reset
1 //===-- TargetMachine.cpp - General Target Information ---------------------==//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
11 //===----------------------------------------------------------------------===//
29 //---------------------------------------------------------------------------
47 // Remaining logic below is ELF-specific. For other object file formats where in isLargeGlobalValue()
53 auto *GO = GVal->getAliaseeObject(); in isLargeGlobalValue()
69 if (GO->hasSection()) { in isLargeGlobalValue()
70 StringRef Name = GO->getSection(); in isLargeGlobalValue()
76 if (GV->isThreadLocal()) in isLargeGlobalValue()
79 // For x86-64, we treat an explicit GlobalVariable small code model to mean in isLargeGlobalValue()
81 if (auto CM = GV->getCodeModel()) { in isLargeGlobalValue()
92 if (GV->hasSection()) { in isLargeGlobalValue()
93 StringRef Name = GV->getSection(); in isLargeGlobalValue()
101 if (!GV->getValueType()->isSized()) in isLargeGlobalValue()
105 if (GV->isDeclaration() && (GV->getName() == "__ehdr_start" || in isLargeGlobalValue()
106 GV->getName().starts_with("__start_") || in isLargeGlobalValue()
107 GV->getName().starts_with("__stop_"))) in isLargeGlobalValue()
109 const DataLayout &DL = GV->getDataLayout(); in isLargeGlobalValue()
110 uint64_t Size = DL.getTypeAllocSize(GV->getValueType()); in isLargeGlobalValue()
121 /// Reset the target options based on the function's attributes.
135 RESET_OPTION(UnsafeFPMath, "unsafe-fp-math"); in resetTargetOptions()
136 RESET_OPTION(NoInfsFPMath, "no-infs-fp-math"); in resetTargetOptions()
137 RESET_OPTION(NoNaNsFPMath, "no-nans-fp-math"); in resetTargetOptions()
138 RESET_OPTION(NoSignedZerosFPMath, "no-signed-zeros-fp-math"); in resetTargetOptions()
139 RESET_OPTION(ApproxFuncFPMath, "approx-func-fp-math"); in resetTargetOptions()
142 /// Returns the code generation relocation model. The choices are static, PIC,
143 /// and dynamic-no-pic.
160 /// Get the IR-specified TLS model for Var.
162 switch (GV->getThreadLocalMode()) { in getSelectedTLSModel()
164 llvm_unreachable("getSelectedTLSModel for non-TLS variable"); in getSelectedTLSModel()
194 if (GV->isDSOLocal()) in shouldAssumeDSOLocal()
199 if (GV->hasDLLImportStorageClass()) in shouldAssumeDSOLocal()
207 if (TT.isWindowsGNUEnvironment() && GV->isDeclarationForLinker() && in shouldAssumeDSOLocal()
214 if (GV->hasExternalWeakLinkage()) in shouldAssumeDSOLocal()
227 return GV->isStrongDefinitionForLinker(); in shouldAssumeDSOLocal()
239 bool IsPIE = GV->getParent()->getPIELevel() != PIELevel::Default; in getTLSModel()
278 if (MayAlwaysUsePrivate || !GV->hasPrivateLinkage()) { in getNameWithPrefix()
285 TLOF->getNameWithPrefix(Name, GV, *this); in getNameWithPrefix()
291 if (MCSymbol *TargetSymbol = TLOF->getTargetSymbol(GV, *this)) in getSymbol()
295 getNameWithPrefix(NameStr, GV, TLOF->getMangler()); in getSymbol()
296 return TLOF->getContext().getOrCreateSymbol(NameStr); in getSymbol()
303 [this](const Function &F) { return this->getTargetTransformInfo(F); }); in getTargetIRAnalysis()