diff options
author | Derek Schuff <dschuff@chromium.org> | 2012-07-09 10:52:46 -0700 |
---|---|---|
committer | Derek Schuff <dschuff@chromium.org> | 2012-07-09 11:00:37 -0700 |
commit | 5dbcc7e0c9c12f4a4042fb4a226654aee927999c (patch) | |
tree | b316a3370e9286cb4e6f81b2f9d8bd8b54ce5123 /lib/Target/TargetMachine.cpp | |
parent | 86dc97be9ac3b4804528e087b04b4f4192cdee54 (diff) |
LOCALMODs from hg 0b098ca44de7 against r158408 (hg 90a87d6bfe45)
(only non-new files; new files in git 4f429c8b)
Change-Id: Ia39f818088485bd90e4d048db404f8d6ba5f836b
Diffstat (limited to 'lib/Target/TargetMachine.cpp')
-rw-r--r-- | lib/Target/TargetMachine.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/Target/TargetMachine.cpp b/lib/Target/TargetMachine.cpp index b9b2526876..e785d330ae 100644 --- a/lib/Target/TargetMachine.cpp +++ b/lib/Target/TargetMachine.cpp @@ -25,6 +25,7 @@ using namespace llvm; namespace llvm { bool HasDivModLibcall; bool AsmVerbosityDefault(false); + bool TLSUseCall; // @LOCALMOD } static cl::opt<bool> @@ -35,6 +36,20 @@ static cl::opt<bool> FunctionSections("ffunction-sections", cl::desc("Emit functions into separate sections"), cl::init(false)); +// @LOCALMOD-BEGIN +// Use a function call to get the thread pointer for TLS accesses, +// instead of using inline code. +static cl::opt<bool, true> +EnableTLSUseCall("mtls-use-call", + cl::desc("Use a function call to get the thread pointer for TLS accesses."), + cl::location(TLSUseCall), + cl::init(false)); + +static cl::opt<bool> + ForceTLSNonPIC("force-tls-non-pic", + cl::desc("Force TLS to use non-PIC models"), + cl::init(false)); +// @LOCALMOD-END //--------------------------------------------------------------------------- // TargetMachine Class @@ -83,6 +98,7 @@ TLSModel::Model TargetMachine::getTLSModel(const GlobalValue *GV) const { bool isHidden = GV->hasHiddenVisibility(); if (getRelocationModel() == Reloc::PIC_ && + !ForceTLSNonPIC && // @LOCALMOD !Options.PositionIndependentExecutable) { if (isLocal || isHidden) return TLSModel::LocalDynamic; |