LLVM: include/llvm/CodeGen/FunctionLoweringInfo.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13
14#ifndef LLVM_CODEGEN_FUNCTIONLOWERINGINFO_H
15#define LLVM_CODEGEN_FUNCTIONLOWERINGINFO_H
16
29#include
30#include
31#include
32
33namespace llvm {
34
46
51
52
53
54
55
57public:
64
65
67
68
70
71
72
74
75
77
78
79
80
82
83
84
85
86
87
89
90
91
93
94
96
97
98
101
103
105
106
108
109
110
113
114
120 };
121
122
123
124
128
129
130
131
133
134
136
137
138
140
141
142
144
145
147
149
150
151
152
153
155
156
158
159
161
169
170
171
173
174
175
177
178
179
180
181
184
185
186
187
189
190
192
193
194
196
197
198
199
201
202
203
204
206
207
208
212
217
219
221
223
225
226
227
229 if (!LiveOutRegInfo.inBounds(Reg))
230 return nullptr;
231
234 return nullptr;
235
236 return LOI;
237 }
238
239
240
241
242
243
245
246
249
250 if (NumSignBits == 1 && Known.isUnknown())
251 return;
252
253 LiveOutRegInfo.grow(Reg);
258 }
259
260
261
263
264
265
267
270 return;
271
273 if (Reg == 0)
274 return;
275
276 LiveOutRegInfo.grow(Reg);
277 LiveOutRegInfo[Reg].IsValid = false;
278 }
279
280
281
283
284
286
289
290
292
293
295
296private:
297
299};
300
301}
302
303#endif
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
This file implements the BitVector class.
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
This file defines the DenseMap class.
This file implements an indexed map.
This file defines the SmallPtrSet class.
This file defines the SmallVector class.
This class represents an incoming formal argument to a Function.
LLVM Basic Block Representation.
unsigned getNumber() const
Analysis providing branch probability information.
DenseMapIterator< KeyT, ValueT, KeyInfoT, BucketT, true > const_iterator
Implements a dense probed hash-table based set.
FunctionLoweringInfo - This contains information that is global to a function that is used when lower...
Definition FunctionLoweringInfo.h:56
BranchProbabilityInfo * BPI
Definition FunctionLoweringInfo.h:62
Register CreateRegs(const Value *V)
DenseMap< const Value *, StatepointRelocationRecord > StatepointSpillMapTy
Keep track of each value which was relocated and the strategy used to relocate that value.
Definition FunctionLoweringInfo.h:125
SmallPtrSet< const DbgVariableRecord *, 8 > PreprocessedDVRDeclares
Collection of dbg_declare instructions handled after argument lowering and before ISel proper.
Definition FunctionLoweringInfo.h:195
void clear()
clear - Clear out all the function-specific state.
MachineBasicBlock * getMBB(const BasicBlock *BB) const
Definition FunctionLoweringInfo.h:213
DenseSet< Register > RegsWithFixups
Definition FunctionLoweringInfo.h:148
Register DemoteRegister
DemoteRegister - if CanLowerReturn is false, DemoteRegister is a vreg allocated to hold a pointer to ...
Definition FunctionLoweringInfo.h:73
void setArgumentFrameIndex(const Argument *A, int FI)
setArgumentFrameIndex - Record frame index for the byval argument.
unsigned OrigNumPHINodesToUpdate
Definition FunctionLoweringInfo.h:183
SmallVector< bool > VisitedBBs
The set of basic blocks visited thus far by instruction selection.
Definition FunctionLoweringInfo.h:176
void InvalidatePHILiveOutRegInfo(const PHINode *PN)
InvalidatePHILiveOutRegInfo - Invalidates a PHI's LiveOutInfo, to be called when a block is visited b...
Definition FunctionLoweringInfo.h:266
BitVector DescribedArgs
Bitvector with a bit set if corresponding argument is described in ArgDbgValues.
Definition FunctionLoweringInfo.h:143
DenseMap< const AllocaInst *, int > StaticAllocaMap
StaticAllocaMap - Keep track of frame indices for fixed sized allocas in the entry block.
Definition FunctionLoweringInfo.h:132
const UniformityInfo * UA
Definition FunctionLoweringInfo.h:63
DenseMap< const Instruction *, StatepointSpillMapTy > StatepointRelocationMaps
Definition FunctionLoweringInfo.h:127
unsigned CurCallSite
The current call site index being processed, if any. 0 if none.
Definition FunctionLoweringInfo.h:191
int getArgumentFrameIndex(const Argument *A)
getArgumentFrameIndex - Get frame index for the byval argument.
Register ExceptionSelectorVirtReg
Definition FunctionLoweringInfo.h:188
bool isExportedInst(const Value *V) const
isExportedInst - Return true if the specified value is an instruction exported from its block.
Definition FunctionLoweringInfo.h:209
void AddLiveOutRegInfo(Register Reg, unsigned NumSignBits, const KnownBits &Known)
AddLiveOutRegInfo - Adds LiveOutInfo for a register.
Definition FunctionLoweringInfo.h:247
const LiveOutInfo * GetLiveOutRegInfo(Register Reg)
GetLiveOutRegInfo - Gets LiveOutInfo for a register, returning NULL if the register is a PHI destinat...
Definition FunctionLoweringInfo.h:228
Register InitializeRegForValue(const Value *V)
bool SplitCSR
True if part of the CSRs will be handled via explicit copies.
Definition FunctionLoweringInfo.h:69
DenseMap< const Value *, Register > ValueMap
ValueMap - Since we emit code for the function a basic block at a time, we must remember which virtua...
Definition FunctionLoweringInfo.h:81
Register ExceptionPointerVirtReg
If the current MBB is a landing pad, the exception pointer and exception selector registers are copie...
Definition FunctionLoweringInfo.h:188
MachineBasicBlock::iterator InsertPt
MBB - The current insert position inside the current block.
Definition FunctionLoweringInfo.h:160
SmallVector< unsigned, 50 > StatepointStackSlots
StatepointStackSlots - A list of temporary stack slots (frame indices) used to spill values at a stat...
Definition FunctionLoweringInfo.h:154
void set(const Function &Fn, MachineFunction &MF, SelectionDAG *DAG)
set - Initialize this FunctionLoweringInfo with the given Function and its associated MachineFunction...
MachineBasicBlock * MBB
MBB - The current block.
Definition FunctionLoweringInfo.h:157
DenseMap< const Argument *, int > ByValArgFrameIndexMap
ByValArgFrameIndexMap - Keep track of frame indices for byval arguments.
Definition FunctionLoweringInfo.h:135
const Function * Fn
Definition FunctionLoweringInfo.h:58
DenseMap< Register, Register > RegFixups
RegFixups - Registers which need to be replaced after isel is done.
Definition FunctionLoweringInfo.h:146
SmallVector< MachineInstr *, 8 > ArgDbgValues
ArgDbgValues - A list of DBG_VALUE instructions created during isel for function arguments that are i...
Definition FunctionLoweringInfo.h:139
std::vector< std::pair< MachineInstr *, Register > > PHINodesToUpdate
PHINodesToUpdate - A list of phi instructions whose operand list will be updated after processing the...
Definition FunctionLoweringInfo.h:182
unsigned getCurrentCallSite()
Get the call site currently being processed, if any. Return zero if none.
Definition FunctionLoweringInfo.h:294
MachineFunction * MF
Definition FunctionLoweringInfo.h:59
void ComputePHILiveOutRegInfo(const PHINode *)
ComputePHILiveOutRegInfo - Compute LiveOutInfo for a PHI's destination register based on the LiveOutI...
SmallVector< MachineBasicBlock * > MBBMap
A mapping from LLVM basic block number to their machine block.
Definition FunctionLoweringInfo.h:76
const TargetLowering * TLI
Definition FunctionLoweringInfo.h:60
const Value * getValueFromVirtualReg(Register Vreg)
This method is called from TargetLowerinInfo::isSDNodeSourceOfDivergence to get the Value correspondi...
void setCurrentCallSite(unsigned Site)
Set the call site currently being processed.
Definition FunctionLoweringInfo.h:291
DenseMap< Register, const Value * > VirtReg2Value
VirtReg2Value map is needed by the Divergence Analysis driven instruction selection.
Definition FunctionLoweringInfo.h:88
MachineRegisterInfo * RegInfo
Definition FunctionLoweringInfo.h:61
Register CreateReg(MVT VT, bool isDivergent=false)
CreateReg - Allocate a single virtual register for the given type.
bool CanLowerReturn
CanLowerReturn - true iff the function's return value can be lowered to registers.
Definition FunctionLoweringInfo.h:66
DenseMap< const Value *, ISD::NodeType > PreferredExtendType
Record the preferred extend type (ISD::SIGN_EXTEND or ISD::ZERO_EXTEND) for a value.
Definition FunctionLoweringInfo.h:172
Register getCatchPadExceptionPointerVReg(const Value *CPI, const TargetRegisterClass *RC)
DenseMap< const Value *, Register > CatchPadExceptionPointers
Track virtual registers created for exception pointers.
Definition FunctionLoweringInfo.h:95
MachineInstrBundleIterator< MachineInstr > iterator
Representation of each machine instruction.
MachineRegisterInfo - Keep track of information for virtual and physical registers,...
Wrapper class representing virtual and physical registers.
This is used to represent a portion of an LLVM function in a low-level Data Dependence DAG representa...
SmallPtrSet - This class implements a set which is optimized for holding SmallSize or less elements.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
This class defines information used to lower LLVM code to legal SelectionDAG operators that the targe...
The instances of the Type class are immutable: once they are created, they are never changed.
LLVM Value Representation.
This is an optimization pass for GlobalISel generic memory operations.
GenericUniformityInfo< SSAContext > UniformityInfo
GenericSSAContext< Function > SSAContext
Definition FunctionLoweringInfo.h:48
constexpr unsigned BitWidth
unsigned IsValid
Definition FunctionLoweringInfo.h:164
unsigned NumSignBits
Definition FunctionLoweringInfo.h:163
KnownBits Known
Definition FunctionLoweringInfo.h:165
LiveOutInfo()
Definition FunctionLoweringInfo.h:167
Helper object to track which of three possible relocation mechanisms are used for a particular value ...
Definition FunctionLoweringInfo.h:99
union llvm::FunctionLoweringInfo::StatepointRelocationRecord::payload_t payload
enum llvm::FunctionLoweringInfo::StatepointRelocationRecord::RelocType type
RelocType
Definition FunctionLoweringInfo.h:100
@ Spill
Definition FunctionLoweringInfo.h:104
@ VReg
Definition FunctionLoweringInfo.h:107
@ NoRelocate
Definition FunctionLoweringInfo.h:102
@ SDValueNode
Definition FunctionLoweringInfo.h:111
bool isUnknown() const
Returns true if we don't know any bits.
Register Reg
Definition FunctionLoweringInfo.h:118
payload_t()
Definition FunctionLoweringInfo.h:116
int FI
Definition FunctionLoweringInfo.h:117