summaryrefslogtreecommitdiff
path: root/lib/Target/SystemZ/SystemZSubtarget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target/SystemZ/SystemZSubtarget.cpp')
-rw-r--r--lib/Target/SystemZ/SystemZSubtarget.cpp14
1 files changed, 2 insertions, 12 deletions
diff --git a/lib/Target/SystemZ/SystemZSubtarget.cpp b/lib/Target/SystemZ/SystemZSubtarget.cpp
index 0b49fcdd8f78a..67d5e0179fe2b 100644
--- a/lib/Target/SystemZ/SystemZSubtarget.cpp
+++ b/lib/Target/SystemZ/SystemZSubtarget.cpp
@@ -40,21 +40,11 @@ SystemZSubtarget::SystemZSubtarget(const Triple &TT, const std::string &CPU,
HasPopulationCount(false), HasFastSerialization(false),
HasInterlockedAccess1(false), HasMiscellaneousExtensions(false),
HasTransactionalExecution(false), HasProcessorAssist(false),
- HasVector(false), TargetTriple(TT),
+ HasVector(false), HasLoadStoreOnCond2(false), TargetTriple(TT),
InstrInfo(initializeSubtargetDependencies(CPU, FS)), TLInfo(TM, *this),
TSInfo(), FrameLowering() {}
-// Return true if GV binds locally under reloc model RM.
-static bool bindsLocally(const GlobalValue *GV, Reloc::Model RM) {
- // For non-PIC, all symbols bind locally.
- if (RM == Reloc::Static)
- return true;
-
- return GV->hasLocalLinkage() || !GV->hasDefaultVisibility();
-}
-
bool SystemZSubtarget::isPC32DBLSymbol(const GlobalValue *GV,
- Reloc::Model RM,
CodeModel::Model CM) const {
// PC32DBL accesses require the low bit to be clear. Note that a zero
// value selects the default alignment and is therefore OK.
@@ -63,7 +53,7 @@ bool SystemZSubtarget::isPC32DBLSymbol(const GlobalValue *GV,
// For the small model, all locally-binding symbols are in range.
if (CM == CodeModel::Small)
- return bindsLocally(GV, RM);
+ return TLInfo.getTargetMachine().shouldAssumeDSOLocal(*GV->getParent(), GV);
// For Medium and above, assume that the symbol is not within the 4GB range.
// Taking the address of locally-defined text would be OK, but that