LLVM: lib/Target/SystemZ/SystemZSubtarget.cpp Source File (original) (raw)
1
2
3
4
5
6
7
8
13
14using namespace llvm;
15
16#define DEBUG_TYPE "systemz-subtarget"
17
18#define GET_SUBTARGETINFO_TARGET_DESC
19#define GET_SUBTARGETINFO_CTOR
20#include "SystemZGenSubtargetInfo.inc"
21
23 "systemz-subreg-liveness",
24 cl::desc("Enable subregister liveness tracking for SystemZ (experimental)"),
26
27
28void SystemZSubtarget::anchor() {}
29
30SystemZSubtarget &SystemZSubtarget::initializeSubtargetDependencies(
33 CPU = "generic";
34 if (TuneCPU.empty())
35 TuneCPU = CPU;
36
38
39
40 if (HasSoftFloat)
41 HasVector = false;
42
43
44 if (!HasVector) {
45 HasVectorEnhancements1 = false;
46 HasVectorEnhancements2 = false;
47 HasVectorEnhancements3 = false;
48 HasVectorPackedDecimal = false;
49 HasVectorPackedDecimalEnhancement = false;
50 HasVectorPackedDecimalEnhancement2 = false;
51 HasVectorPackedDecimalEnhancement3 = false;
52 }
53
54 return *this;
55}
56
58SystemZSubtarget::initializeSpecialRegisters() {
63 llvm_unreachable("Invalid Calling Convention. Cannot initialize Special "
64 "Call Registers!");
65}
66
68 const std::string &TuneCPU,
69 const std::string &FS,
72 SpecialRegisters(initializeSpecialRegisters()),
73 InstrInfo(initializeSubtargetDependencies(CPU, TuneCPU, FS)),
75
78}
79
81 if (const auto *GO = dyn_cast(GV)) {
82
83
84
85
86 if (GO->getAlignment() & 0x1) {
87 return true;
88 }
89
90
91 if (GO->isDeclaration()) {
92 return true;
93 }
94
95
96 if (GO->hasAvailableExternallyLinkage()) {
97 return true;
98 }
99
103 return true;
104 }
105
106 return false;
107 }
108 return true;
109}
110
115
116
117
118
119
122 return false;
123
124
127
128
129
130
131 return false;
132}
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
static cl::opt< bool > UseSubRegLiveness("systemz-subreg-liveness", cl::desc("Enable subregister liveness tracking for SystemZ (experimental)"), cl::Hidden)
A parsed version of the target data layout string in and methods for querying it.
const DataLayout & getDataLayout() const
Get the data layout of the module this global belongs to.
Type * getValueType() const
SectionKind - This is a simple POD value that classifies the properties of a section.
StringRef - Represent a constant reference to a string, i.e.
constexpr bool empty() const
empty - Check if the string is empty.
A SystemZ-specific class detailing special use registers particular for calling conventions.
ELF calling convention specific use registers Particular when on zLinux in 64 bit mode.
bool isPC32DBLSymbol(const GlobalValue *GV, CodeModel::Model CM) const
bool isTargetXPLINK64() const
bool enableSubRegLiveness() const override
bool isAddressedViaADA(const GlobalValue *GV) const
SystemZSubtarget(const Triple &TT, const std::string &CPU, const std::string &TuneCPU, const std::string &FS, const TargetMachine &TM)
void ParseSubtargetFeatures(StringRef CPU, StringRef TuneCPU, StringRef FS)
XPLINK64 calling convention specific use registers Particular to z/OS when in 64 bit mode.
const TargetMachine & getTargetMachine() const
static SectionKind getKindForGlobal(const GlobalObject *GO, const TargetMachine &TM)
Classify the specified global variable into a set of target independent categories embodied in Sectio...
Primary interface to the complete machine description for the target machine.
bool shouldAssumeDSOLocal(const GlobalValue *GV) const
Triple - Helper class for working with autoconf configuration names.
bool isFunctionTy() const
True if this is an instance of FunctionType.
Align getPointerAlignment(const DataLayout &DL) const
Returns an alignment of the pointer value.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
This is an optimization pass for GlobalISel generic memory operations.