LLVM 19.0.0git
|
AMDGPU target specific variadic MCExpr operations. More...
#include "Target/AMDGPU/MCTargetDesc/AMDGPUMCExpr.h"
Public Types | |
enum | VariadicKind { AGVK_None , AGVK_Or , AGVK_Max , AGVK_ExtraSGPRs , AGVK_TotalNumVGPRs , AGVK_AlignTo , AGVK_Occupancy } |
Public Types inherited from llvm::MCExpr | |
enum | ExprKind : uint8_t { Binary , Constant , SymbolRef , Unary , Target } |
Public Member Functions | |
VariadicKind | getKind () const |
const MCExpr * | getSubExpr (size_t Index) const |
void | printImpl (raw_ostream &OS, const MCAsmInfo *MAI) const override |
bool | evaluateAsRelocatableImpl (MCValue &Res, const MCAsmLayout *Layout, const MCFixup *Fixup) const override |
void | visitUsedExpr (MCStreamer &Streamer) const override |
MCFragment * | findAssociatedFragment () const override |
void | fixELFSymbolsInTLSFixups (MCAssembler &) const override |
Public Member Functions inherited from llvm::MCTargetExpr | |
virtual void | printImpl (raw_ostream &OS, const MCAsmInfo *MAI) const =0 |
virtual bool | evaluateAsRelocatableImpl (MCValue &Res, const MCAsmLayout *Layout, const MCFixup *Fixup) const =0 |
virtual bool | isEqualTo (const MCExpr *x) const |
virtual bool | inlineAssignedExpr () const |
virtual void | visitUsedExpr (MCStreamer &Streamer) const =0 |
virtual MCFragment * | findAssociatedFragment () const =0 |
virtual void | fixELFSymbolsInTLSFixups (MCAssembler &) const =0 |
Public Member Functions inherited from llvm::MCExpr | |
MCExpr (const MCExpr &)=delete | |
MCExpr & | operator= (const MCExpr &)=delete |
ExprKind | getKind () const |
SMLoc | getLoc () const |
void | print (raw_ostream &OS, const MCAsmInfo *MAI, bool InParens=false) const |
void | dump () const |
bool | evaluateAsAbsolute (int64_t &Res, const MCAsmLayout &Layout, const SectionAddrMap &Addrs) const |
Try to evaluate the expression to an absolute value. | |
bool | evaluateAsAbsolute (int64_t &Res) const |
bool | evaluateAsAbsolute (int64_t &Res, const MCAssembler &Asm) const |
bool | evaluateAsAbsolute (int64_t &Res, const MCAssembler *Asm) const |
bool | evaluateAsAbsolute (int64_t &Res, const MCAsmLayout &Layout) const |
bool | evaluateKnownAbsolute (int64_t &Res, const MCAsmLayout &Layout) const |
bool | evaluateAsRelocatable (MCValue &Res, const MCAsmLayout *Layout, const MCFixup *Fixup) const |
Try to evaluate the expression to a relocatable value, i.e. | |
bool | evaluateAsValue (MCValue &Res, const MCAsmLayout &Layout) const |
Try to evaluate the expression to the form (a - b + constant) where neither a nor b are variables. | |
MCFragment * | findAssociatedFragment () const |
Find the "associated section" for this expression, which is currently defined as the absolute section for constants, or otherwise the section associated with the first defined symbol in the expression. | |
Additional Inherited Members | |
Protected Member Functions inherited from llvm::MCTargetExpr | |
MCTargetExpr () | |
virtual | ~MCTargetExpr ()=default |
Protected Member Functions inherited from llvm::MCExpr | |
MCExpr (ExprKind Kind, SMLoc Loc, unsigned SubclassData=0) | |
bool | evaluateAsRelocatableImpl (MCValue &Res, const MCAssembler *Asm, const MCAsmLayout *Layout, const MCFixup *Fixup, const SectionAddrMap *Addrs, bool InSet) const |
unsigned | getSubclassData () const |
AMDGPU target specific variadic MCExpr operations.
Takes in a minimum of 1 argument to be used with an operation. The supported operations are:
Definition at line 30 of file AMDGPUMCExpr.h.
Enumerator | |
---|---|
AGVK_None | |
AGVK_Or | |
AGVK_Max | |
AGVK_ExtraSGPRs | |
AGVK_TotalNumVGPRs | |
AGVK_AlignTo | |
AGVK_Occupancy |
Definition at line 32 of file AMDGPUMCExpr.h.
Definition at line 105 of file AMDGPUMCExpr.h.
References E, and llvm::MCExpr::Target.
|
static |
Definition at line 46 of file AMDGPUMCExpr.cpp.
Referenced by createAlignTo(), createExtraSGPRs(), createMax(), createOccupancy(), createOr(), and createTotalNumVGPR().
|
inlinestatic |
Definition at line 85 of file AMDGPUMCExpr.h.
References AGVK_AlignTo, and create().
|
static |
Allow delayed MCExpr resolve of ExtraSGPRs (in case VCCUsed or FlatScrUsed are unresolvable but needed for further MCExprs).
Derived from implementation of IsaInfo::getNumExtraSGPRs in AMDGPUBaseInfo.cpp.
Definition at line 279 of file AMDGPUMCExpr.cpp.
References AGVK_ExtraSGPRs, llvm::MCConstantExpr::create(), and create().
|
inlinestatic |
Definition at line 70 of file AMDGPUMCExpr.h.
|
static |
Mimics GCNSubtarget::computeOccupancy for MCExpr.
Remove dependency on GCNSubtarget and depend only only the necessary values for said occupancy computation. Should match computeOccupancy implementation without passing STM
on.
Definition at line 299 of file AMDGPUMCExpr.cpp.
References AGVK_Occupancy, llvm::MCConstantExpr::create(), create(), llvm::GCNSubtarget::getGeneration(), llvm::AMDGPU::IsaInfo::getMaxWavesPerEU(), llvm::AMDGPU::IsaInfo::getTotalNumVGPRs(), and llvm::AMDGPU::IsaInfo::getVGPRAllocGranule().
|
inlinestatic |
Definition at line 65 of file AMDGPUMCExpr.h.
|
static |
Definition at line 288 of file AMDGPUMCExpr.cpp.
References AGVK_TotalNumVGPRs, and create().
|
overridevirtual |
Implements llvm::MCTargetExpr.
Definition at line 229 of file AMDGPUMCExpr.cpp.
References AGVK_AlignTo, AGVK_ExtraSGPRs, AGVK_Occupancy, AGVK_TotalNumVGPRs, llvm::MCExpr::evaluateAsRelocatable(), Fixup, llvm::MCValue::get(), llvm::MCValue::getConstant(), llvm::MCValue::isAbsolute(), op, and llvm::Total.
|
overridevirtual |
Implements llvm::MCTargetExpr.
Definition at line 266 of file AMDGPUMCExpr.cpp.
References llvm::MCExpr::findAssociatedFragment().
|
inlineoverridevirtual |
Implements llvm::MCTargetExpr.
Definition at line 103 of file AMDGPUMCExpr.h.
|
inline |
Definition at line 95 of file AMDGPUMCExpr.h.
Definition at line 51 of file AMDGPUMCExpr.cpp.
References assert().
|
overridevirtual |
Implements llvm::MCTargetExpr.
Definition at line 57 of file AMDGPUMCExpr.cpp.
References AGVK_AlignTo, AGVK_ExtraSGPRs, AGVK_Max, AGVK_Occupancy, AGVK_Or, AGVK_TotalNumVGPRs, llvm_unreachable, and OS.
|
overridevirtual |
Implements llvm::MCTargetExpr.
Definition at line 261 of file AMDGPUMCExpr.cpp.
References llvm::MCStreamer::visitUsedExpr().