LLVM: lib/Target/PowerPC/PPCMachineFunctionInfo.cpp Source File (original) (raw)
1
2
3
4
5
6
7
8
15
16using namespace llvm;
18 "ppc-disable-non-volatile-cr",
19 cl::desc("Disable the use of non-volatile CR register fields"),
21
22void PPCFunctionInfo::anchor() {}
26
30 &Src2DstMBB) const {
32}
33
40
47
54
61
63 for (const std::pair<Register, ISD::ArgFlagsTy> &LiveIn : LiveInAttrs)
64 if (LiveIn.first == VReg)
65 return LiveIn.second.isSExt();
66 return false;
67}
68
70 for (const std::pair<Register, ISD::ArgFlagsTy> &LiveIn : LiveInAttrs)
71 if (LiveIn.first == VReg)
72 return LiveIn.second.isZExt();
73 return false;
74}
75
77
78 ParamtersType.push_back(Type);
79 switch (Type) {
81 ++FixedParmsNum;
82 return;
85 ++FloatingParmsNum;
86 return;
91 ++VectorParmsNum;
92 return;
93 }
95}
96
98
99 uint32_t VectExtParamInfo = 0;
101 int Bits = 0;
102
104 return 0;
105
106 for (const auto &Elt : ParamtersType) {
107 switch (Elt) {
110 VectExtParamInfo |=
113 break;
116 VectExtParamInfo |=
119 break;
122 VectExtParamInfo |=
125 break;
128 VectExtParamInfo |=
131 break;
132 default:
133 break;
134 }
135
136
137 if (Bits >= 32)
138 break;
139 }
140 return Bits < 32 ? VectExtParamInfo << (32 - Bits) : VectExtParamInfo;
141}
142
146
147 int Bits = 0;
148 for (const auto &Elt : ParamtersType) {
149
151 break;
152
153 switch (Elt) {
156
158 ParamsTypeInfo |=
161 } else {
162
163 ParamsTypeInfo <<= 1;
164 ++Bits;
165 }
166 break;
168
170 ParamsTypeInfo |=
173 break;
175
177 ParamsTypeInfo |=
180 break;
185
187 ParamsTypeInfo |=
190 break;
191 }
192 }
193
194 return Bits < 32 ? ParamsTypeInfo << (32 - Bits) : ParamsTypeInfo;
195}
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
static cl::opt< bool > PPCDisableNonVolatileCR("ppc-disable-non-volatile-cr", cl::desc("Disable the use of non-volatile CR register fields"), cl::init(false), cl::Hidden)
A parsed version of the target data layout string in and methods for querying it.
LLVM_ABI MCSymbol * getOrCreateSymbol(const Twine &Name)
Lookup the symbol inside with the specified Name.
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
unsigned getFunctionNumber() const
getFunctionNumber - Return a unique ID for the current function.
MCContext & getContext() const
const DataLayout & getDataLayout() const
Return the DataLayout attached to the Module associated to this MF.
Ty * cloneInfo(const Ty &Old)
uint32_t getParmsType() const
Definition PPCMachineFunctionInfo.cpp:143
MCSymbol * getPICOffsetSymbol(MachineFunction &MF) const
Definition PPCMachineFunctionInfo.cpp:34
bool isLiveInSExt(Register VReg) const
This function returns true if the specified vreg is a live-in register and sign-extended.
Definition PPCMachineFunctionInfo.cpp:62
MCSymbol * getGlobalEPSymbol(MachineFunction &MF) const
Definition PPCMachineFunctionInfo.cpp:41
MCSymbol * getLocalEPSymbol(MachineFunction &MF) const
Definition PPCMachineFunctionInfo.cpp:48
bool isLiveInZExt(Register VReg) const
This function returns true if the specified vreg is a live-in register and zero-extended.
Definition PPCMachineFunctionInfo.cpp:69
PPCFunctionInfo(const Function &F, const TargetSubtargetInfo *STI)
Definition PPCMachineFunctionInfo.cpp:23
void appendParameterType(ParamType Type)
Definition PPCMachineFunctionInfo.cpp:76
bool hasVectorParms() const
uint32_t getVecExtParmsType() const
Definition PPCMachineFunctionInfo.cpp:97
MCSymbol * getTOCOffsetSymbol(MachineFunction &MF) const
Definition PPCMachineFunctionInfo.cpp:55
MachineFunctionInfo * clone(BumpPtrAllocator &Allocator, MachineFunction &DestMF, const DenseMap< MachineBasicBlock *, MachineBasicBlock * > &Src2DstMBB) const override
Make a functionally equivalent copy of this MachineFunctionInfo in MF.
Definition PPCMachineFunctionInfo.cpp:28
Wrapper class representing virtual and physical registers.
TargetSubtargetInfo - Generic base class for all target subtargets.
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
The instances of the Type class are immutable: once they are created, they are never changed.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
initializer< Ty > init(const Ty &Val)
This is an optimization pass for GlobalISel generic memory operations.
BumpPtrAllocatorImpl<> BumpPtrAllocator
The standard BumpPtrAllocator which just uses the default template parameters.
MachineFunctionInfo - This class can be derived from and used by targets to hold private target-speci...
static constexpr uint8_t WidthOfParamType
static constexpr uint32_t ParmTypeIsVectorShortBit
static constexpr uint32_t ParmTypeIsDoubleBits
static constexpr uint32_t ParmTypeIsVectorIntBit
static constexpr uint32_t ParmTypeIsFixedBits
static constexpr uint32_t ParmTypeIsVectorBits
static constexpr uint32_t ParmTypeIsVectorCharBit
static constexpr uint32_t ParmTypeIsVectorFloatBit
static constexpr uint32_t ParmTypeIsFloatingBits