LLVM: lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCExpr.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9#ifndef LLVM_LIB_TARGET_AMDGPU_MCTARGETDESC_AMDGPUMCEXPR_H
10#define LLVM_LIB_TARGET_AMDGPU_MCTARGETDESC_AMDGPUMCEXPR_H
11
14
15namespace llvm {
16
19
21
22
23
24
25
26
27
28
29
30
31
33public:
45
46
59
60private:
61 VariantKind Kind;
63 const MCExpr **RawArgs;
65
68
70 bool evaluateTotalNumVGPR(MCValue &Res, const MCAssembler *Asm) const;
73
74public:
77
82
87
89 const MCExpr *FlatScrUsed,
91
93 const MCExpr *NumVGPR,
95
100
103
107
113
118};
119
120namespace AMDGPU {
121
122
123
124
125
127 const MCAsmInfo *MAI);
128
129const MCExpr *foldAMDGPUMCExpr(const MCExpr *Expr, MCContext &Ctx);
130
134
136
138
139}
140}
141
142#endif
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
AMDGPU target specific MCExpr operations.
Definition AMDGPUMCExpr.h:32
ArrayRef< const MCExpr * > getArgs() const
Definition AMDGPUMCExpr.h:104
MCFragment * findAssociatedFragment() const override
static const AMDGPUMCExpr * createMax(ArrayRef< const MCExpr * > Args, MCContext &Ctx)
Definition AMDGPUMCExpr.h:83
void visitUsedExpr(MCStreamer &Streamer) const override
static const AMDGPUMCExpr * createTotalNumVGPR(const MCExpr *NumAGPR, const MCExpr *NumVGPR, MCContext &Ctx)
Specifier
Definition AMDGPUMCExpr.h:47
@ S_REL32_HI
Definition AMDGPUMCExpr.h:53
@ S_None
Definition AMDGPUMCExpr.h:48
@ S_REL64
Definition AMDGPUMCExpr.h:54
@ S_GOTPCREL32_HI
Definition AMDGPUMCExpr.h:51
@ S_GOTPCREL
Definition AMDGPUMCExpr.h:49
@ S_ABS32_LO
Definition AMDGPUMCExpr.h:55
@ S_GOTPCREL32_LO
Definition AMDGPUMCExpr.h:50
@ S_REL32_LO
Definition AMDGPUMCExpr.h:52
@ S_ABS64
Definition AMDGPUMCExpr.h:57
@ S_ABS32_HI
Definition AMDGPUMCExpr.h:56
static const AMDGPUMCExpr * createLit(LitModifier Lit, int64_t Value, MCContext &Ctx)
static const AMDGPUMCExpr * create(VariantKind Kind, ArrayRef< const MCExpr * > Args, MCContext &Ctx)
bool evaluateAsRelocatableImpl(MCValue &Res, const MCAssembler *Asm) const override
static const AMDGPUMCExpr * createExtraSGPRs(const MCExpr *VCCUsed, const MCExpr *FlatScrUsed, bool XNACKUsed, MCContext &Ctx)
Allow delayed MCExpr resolve of ExtraSGPRs (in case VCCUsed or FlatScrUsed are unresolvable but neede...
static const AMDGPUMCExpr * createAlignTo(const MCExpr *Value, const MCExpr *Align, MCContext &Ctx)
Definition AMDGPUMCExpr.h:97
static const AMDGPUMCExpr * createOr(ArrayRef< const MCExpr * > Args, MCContext &Ctx)
Definition AMDGPUMCExpr.h:78
const MCExpr * getSubExpr(size_t Index) const
VariantKind
Definition AMDGPUMCExpr.h:34
@ AGVK_Occupancy
Definition AMDGPUMCExpr.h:41
@ AGVK_AlignTo
Definition AMDGPUMCExpr.h:40
@ AGVK_Or
Definition AMDGPUMCExpr.h:36
@ AGVK_TotalNumVGPRs
Definition AMDGPUMCExpr.h:39
@ AGVK_ExtraSGPRs
Definition AMDGPUMCExpr.h:38
@ AGVK_Lit64
Definition AMDGPUMCExpr.h:43
@ AGVK_Lit
Definition AMDGPUMCExpr.h:42
@ AGVK_Max
Definition AMDGPUMCExpr.h:37
@ AGVK_None
Definition AMDGPUMCExpr.h:35
void printImpl(raw_ostream &OS, const MCAsmInfo *MAI) const override
static bool classof(const MCExpr *E)
Definition AMDGPUMCExpr.h:114
VariantKind getKind() const
Definition AMDGPUMCExpr.h:105
static bool isSymbolUsedInExpression(const MCSymbol *Sym, const MCExpr *E)
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
This class is intended to be used as a base class for asm properties and features specific to the tar...
Context object for machine code objects.
Base class for the full range of assembler expressions which are needed for parsing.
@ Target
Target specific expression.
Streaming machine code generation interface.
Represent a reference to a symbol from inside an expression.
VariantKind getKind() const
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
LLVM Value Representation.
This class implements an extremely fast bulk output stream that can only output to a stream.
static AMDGPUMCExpr::Specifier getSpecifier(const MCSymbolRefExpr *SRE)
Definition AMDGPUMCExpr.h:131
LLVM_READONLY bool isLitExpr(const MCExpr *Expr)
void printAMDGPUMCExpr(const MCExpr *Expr, raw_ostream &OS, const MCAsmInfo *MAI)
LLVM_READONLY int64_t getLitValue(const MCExpr *Expr)
const MCExpr * foldAMDGPUMCExpr(const MCExpr *Expr, MCContext &Ctx)
This is an optimization pass for GlobalISel generic memory operations.
LitModifier
Definition AMDGPUMCExpr.h:20
@ Lit64
Definition AMDGPUMCExpr.h:20
@ Lit
Definition AMDGPUMCExpr.h:20
This struct is a compact representation of a valid (non-zero power of two) alignment.