LLVM: llvm::AMDGPUMCExpr Class Reference (original) (raw)
AMDGPU target specific MCExpr operations. More...
#include "[Target/AMDGPU/MCTargetDesc/AMDGPUMCExpr.h](AMDGPUMCExpr%5F8h%5Fsource.html)"
| Public Types | |
|---|---|
| enum | VariantKind { AGVK_None, AGVK_Or, AGVK_Max, AGVK_ExtraSGPRs, AGVK_TotalNumVGPRs, AGVK_AlignTo, AGVK_Occupancy, AGVK_Lit, AGVK_Lit64 } |
| enum | Specifier { S_None, S_GOTPCREL, S_GOTPCREL32_LO, S_GOTPCREL32_HI, S_REL32_LO, S_REL32_HI, S_REL64, S_ABS32_LO, S_ABS32_HI, S_ABS64 } |
| Public Types inherited from llvm::MCExpr | |
| enum | ExprKind : uint8_t { Binary, Constant, SymbolRef, Unary, Specifier, Target } |
| Public Member Functions | |
|---|---|
| ArrayRef< const MCExpr * > | getArgs () const |
| VariantKind | getKind () const |
| const MCExpr * | getSubExpr (size_t Index) const |
| void | printImpl (raw_ostream &OS, const MCAsmInfo *MAI) const override |
| bool | evaluateAsRelocatableImpl (MCValue &Res, const MCAssembler *Asm) const override |
| void | visitUsedExpr (MCStreamer &Streamer) const override |
| MCFragment * | findAssociatedFragment () const override |
| Public Member Functions inherited from llvm::MCTargetExpr | |
| virtual bool | isEqualTo (const MCExpr *x) const |
| virtual bool | inlineAssignedExpr () const |
| Public Member Functions inherited from llvm::MCExpr | |
| MCExpr (const MCExpr &)=delete | |
| MCExpr & | operator= (const MCExpr &)=delete |
| ExprKind | getKind () const |
| SMLoc | getLoc () const |
| LLVM_ABI void | dump () const |
| LLVM_ABI bool | evaluateAsAbsolute (int64_t &Res) const |
| Try to evaluate the expression to an absolute value. | |
| LLVM_ABI bool | evaluateAsAbsolute (int64_t &Res, const MCAssembler &Asm) const |
| LLVM_ABI bool | evaluateAsAbsolute (int64_t &Res, const MCAssembler *Asm) const |
| LLVM_ABI bool | evaluateKnownAbsolute (int64_t &Res, const MCAssembler &Asm) const |
| Aggressive variant of evaluateAsRelocatable when relocations are unavailable (e.g. | |
| LLVM_ABI bool | evaluateAsRelocatable (MCValue &Res, const MCAssembler *Asm) const |
| Try to evaluate the expression to a relocatable value, i.e. | |
| LLVM_ABI bool | evaluateAsValue (MCValue &Res, const MCAssembler &Asm) const |
| Try to evaluate the expression to the form (a - b + constant) where neither a nor b are variables. | |
| LLVM_ABI 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 Types inherited from llvm::MCExpr | |
| using | Spec = uint16_t |
| 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) | |
| LLVM_ABI bool | evaluateAsRelocatableImpl (MCValue &Res, const MCAssembler *Asm, bool InSet) const |
| unsigned | getSubclassData () const |
AMDGPU target specific MCExpr operations.
Takes in a minimum of 1 argument to be used with an operation. The supported operations are:
- (bitwise) or
- max
Note
If the 'or'/'max' operations are provided only a single argument, the operation will act as a no-op and simply resolve as the provided argument.
Definition at line 32 of file AMDGPUMCExpr.h.
◆ Specifier
| Enumerator |
|---|
| S_None |
| S_GOTPCREL |
| S_GOTPCREL32_LO |
| S_GOTPCREL32_HI |
| S_REL32_LO |
| S_REL32_HI |
| S_REL64 |
| S_ABS32_LO |
| S_ABS32_HI |
| S_ABS64 |
Definition at line 47 of file AMDGPUMCExpr.h.
◆ VariantKind
| Enumerator |
|---|
| AGVK_None |
| AGVK_Or |
| AGVK_Max |
| AGVK_ExtraSGPRs |
| AGVK_TotalNumVGPRs |
| AGVK_AlignTo |
| AGVK_Occupancy |
| AGVK_Lit |
| AGVK_Lit64 |
Definition at line 34 of file AMDGPUMCExpr.h.
◆ classof()
◆ create()
◆ createAlignTo()
◆ createExtraSGPRs()
◆ createLit()
◆ createMax()
◆ createOr()
◆ createTotalNumVGPR()
◆ evaluateAsRelocatableImpl()
Implements llvm::MCTargetExpr.
Definition at line 252 of file AMDGPUMCExpr.cpp.
References AGVK_AlignTo, AGVK_ExtraSGPRs, AGVK_Lit, AGVK_Lit64, AGVK_Occupancy, AGVK_TotalNumVGPRs, llvm::MCExpr::evaluateAsRelocatable(), llvm::MCValue::get(), llvm::MCValue::getConstant(), llvm::MCValue::isAbsolute(), op, and llvm::Total.
◆ findAssociatedFragment()
| MCFragment * AMDGPUMCExpr::findAssociatedFragment ( ) const | overridevirtual |
|---|
◆ getArgs()
◆ getKind()
| VariantKind llvm::AMDGPUMCExpr::getKind ( ) const | inline |
|---|
◆ getSubExpr()
| const MCExpr * AMDGPUMCExpr::getSubExpr | ( | size_t | Index | ) | const |
|---|
◆ isSymbolUsedInExpression()
Definition at line 221 of file AMDGPUMCExpr.cpp.
References llvm::MCExpr::Binary, llvm::MCExpr::Constant, llvm::MCBinaryExpr::getLHS(), llvm::MCBinaryExpr::getRHS(), getSubExpr(), llvm::MCSymbol::getVariableValue(), isSymbolUsedInExpression(), llvm::MCSymbol::isVariable(), llvm_unreachable, llvm::MCExpr::Specifier, llvm::MCExpr::SymbolRef, llvm::MCExpr::Target, and llvm::MCExpr::Unary.
Referenced by llvm::MCResourceInfo::gatherResourceInfo(), and isSymbolUsedInExpression().
◆ printImpl()
◆ visitUsedExpr()
| void AMDGPUMCExpr::visitUsedExpr ( MCStreamer & Streamer) const | overridevirtual |
|---|
The documentation for this class was generated from the following files:
- lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCExpr.h
- lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCExpr.cpp