Go to the documentation of this file.
13 #ifndef LLVM_CODEGEN_TARGETCALLINGCONV_H
14 #define LLVM_CODEGEN_TARGETCALLINGCONV_H
36 unsigned IsReturned : 1;
38 unsigned IsInAlloca : 1;
39 unsigned IsPreallocated : 1;
40 unsigned IsSplitEnd : 1;
41 unsigned IsSwiftSelf : 1;
42 unsigned IsSwiftAsync : 1;
43 unsigned IsSwiftError : 1;
44 unsigned IsCFGuardTarget : 1;
46 unsigned IsHvaStart : 1;
47 unsigned IsSecArgPass : 1;
48 unsigned MemAlign : 4;
51 unsigned OrigAlign : 5;
52 unsigned IsInConsecutiveRegsLast : 1;
53 unsigned IsInConsecutiveRegs : 1;
54 unsigned IsCopyElisionCandidate : 1;
55 unsigned IsPointer : 1;
57 unsigned ByValOrByRefSize = 0;
59 unsigned PointerAddrSpace = 0;
63 : IsZExt(0), IsSExt(0), IsInReg(0), IsSRet(0), IsByVal(0), IsByRef(0),
64 IsNest(0), IsReturned(0), IsSplit(0), IsInAlloca(0),
65 IsPreallocated(0), IsSplitEnd(0), IsSwiftSelf(0), IsSwiftAsync(0),
66 IsSwiftError(0), IsCFGuardTarget(0), IsHva(0), IsHvaStart(0),
67 IsSecArgPass(0), MemAlign(0), OrigAlign(0),
68 IsInConsecutiveRegsLast(0), IsInConsecutiveRegs(0),
69 IsCopyElisionCandidate(0), IsPointer(0) {
70 static_assert(
sizeof(*
this) == 3 *
sizeof(
unsigned),
"flags are too big");
73 bool isZExt()
const {
return IsZExt; }
76 bool isSExt()
const {
return IsSExt; }
82 bool isSRet()
const {
return IsSRet; }
109 bool isHva()
const {
return IsHva; }
129 IsInConsecutiveRegsLast =
Flag;
156 assert(A &&
"ByValAlign must be defined");
171 return ByValOrByRefSize;
175 ByValOrByRefSize =
S;
180 return ByValOrByRefSize;
184 ByValOrByRefSize =
S;
213 unsigned origIdx,
unsigned partOffs)
251 unsigned origIdx,
unsigned partOffs)
262 #endif // LLVM_CODEGEN_TARGETCALLINGCONV_H
This is an optimization pass for GlobalISel generic memory operations.
unsigned getByRefSize() const
bool isInConsecutiveRegsLast() const
void setMemAlign(Align A)
Align valueOrOne() const
For convenience, returns a valid alignment or 1 if undefined.
OutputArg(ArgFlagsTy flags, MVT vt, EVT argvt, bool isfixed, unsigned origIdx, unsigned partOffs)
bool isSwiftAsync() const
void setReturned(bool V=true)
Align getNonZeroMemAlign() const
This struct is a compact representation of a valid (power of two) or undefined (0) alignment.
unsigned PartOffset
Offset in bytes of current output value relative to the beginning of original argument.
Flag
These should be considered private to the implementation of the MCInstrDesc class.
unsigned encode(MaybeAlign A)
Returns a representation of the alignment that encodes undefined as 0.
This struct is a compact representation of a valid (non-zero power of two) alignment.
Align getNonZeroOrigAlign() const
unsigned OrigArgIndex
Index original Function's argument.
void setByRefSize(unsigned S)
OutputArg - This struct carries flags and a value for a single outgoing (actual) argument or outgoing...
void setOrigAlign(Align A)
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
void setInConsecutiveRegs(bool Flag=true)
unsigned getPointerAddrSpace() const
bool isCopyElisionCandidate() const
void setByValSize(unsigned S)
bool isPreallocated() const
void setPointerAddrSpace(unsigned AS)
add sub stmia L5 ldr r0 bl L_printf $stub Instead of a and a wouldn t it be better to do three moves *Return an aggregate type is even return S
unsigned getByValSize() const
MaybeAlign decodeMaybeAlign(unsigned Value)
Dual operation of the encode function above.
Align getNonZeroByValAlign() const
This might compile to this xmm1 xorps xmm0 movss xmm0 ret Now consider if the code caused xmm1 to get spilled This might produce this xmm1 movaps xmm0 movaps xmm1 movss xmm0 ret since the reload is only used by these we could fold it into the producing something like xmm1 movaps xmm0 ret saving two instructions The basic idea is that a reload from a spill if only one byte chunk is used
bool isInConsecutiveRegs() const
bool isSecArgPass() const
void setCopyElisionCandidate()
bool isSwiftError() const
void setInConsecutiveRegsLast(bool Flag=true)
bool isCFGuardTarget() const
MVT getSimpleVT() const
Return the SimpleValueType held in the specified simple EVT.
bool IsFixed
IsFixed - Is this a "fixed" value, ie not passed through a vararg "...".