1 //===- SystemZSubtarget.cpp - SystemZ Subtarget Information -------*- C++ -*-=//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file implements the SystemZ specific subclass of TargetSubtarget.
12 //===----------------------------------------------------------------------===//
14 #include "SystemZSubtarget.h"
16 #include "SystemZGenSubtarget.inc"
17 #include "llvm/GlobalValue.h"
18 #include "llvm/Target/TargetMachine.h"
22 SystemZSubtarget::SystemZSubtarget(const std::string &TT,
23 const std::string &CPU,
24 const std::string &FS):
26 std::string CPUName = CPU;
30 // Parse features string.
31 ParseSubtargetFeatures(FS, CPUName);
34 /// True if accessing the GV requires an extra load.
35 bool SystemZSubtarget::GVRequiresExtraLoad(const GlobalValue* GV,
36 const TargetMachine& TM,
37 bool isDirectCall) const {
38 if (TM.getRelocationModel() == Reloc::PIC_) {
39 // Extra load is needed for all externally visible.
43 if (GV->hasLocalLinkage() || GV->hasHiddenVisibility())