clang  19.0.0git
Public Member Functions | Static Public Member Functions | Friends | List of all members
clang::CodeGen::RValue Class Reference

RValue - This trivial value class is used to represent the result of an expression that is evaluated. More...

#include "/home/runner/work/llvm/llvm/repo/clang/lib/CodeGen/CGValue.h"

Public Member Functions

 RValue ()
 
bool isScalar () const
 
bool isComplex () const
 
bool isAggregate () const
 
bool isVolatileQualified () const
 
llvm::Value * getScalarVal () const
 getScalarVal() - Return the Value* of this scalar value. More...
 
std::pair< llvm::Value *, llvm::Value * > getComplexVal () const
 getComplexVal - Return the real/imag components of this complex value. More...
 
Address getAggregateAddress () const
 getAggregateAddr() - Return the Value* of the address of the aggregate. More...
 
llvm::Value * getAggregatePointer (QualType PointeeType, CodeGenFunction &CGF) const
 

Static Public Member Functions

static RValue getIgnored ()
 
static RValue get (llvm::Value *V)
 
static RValue get (Address Addr, CodeGenFunction &CGF)
 
static RValue getComplex (llvm::Value *V1, llvm::Value *V2)
 
static RValue getComplex (const std::pair< llvm::Value *, llvm::Value * > &C)
 
static RValue getAggregate (Address addr, bool isVolatile=false)
 Convert an Address to an RValue. More...
 

Friends

struct DominatingValue< RValue >
 

Detailed Description

RValue - This trivial value class is used to represent the result of an expression that is evaluated.

It can be one of three things: either a simple LLVM SSA value, a pair of SSA values for complex numbers, or the address of an aggregate value in memory.

Definition at line 41 of file CGValue.h.

Constructor & Destructor Documentation

◆ RValue()

clang::CodeGen::RValue::RValue ( )
inline

Definition at line 61 of file CGValue.h.

Member Function Documentation

◆ get() [1/2]

static RValue clang::CodeGen::RValue::get ( Address  Addr,
CodeGenFunction CGF 
)
inlinestatic

Definition at line 104 of file CGValue.h.

References clang::CodeGen::Address::emitRawPointer(), and get().

◆ get() [2/2]

static RValue clang::CodeGen::RValue::get ( llvm::Value *  V)
inlinestatic

Definition at line 97 of file CGValue.h.

References V, and Vals.

Referenced by clang::CodeGen::CGCXXABI::addImplicitConstructorArgs(), AdjustObjCObjectType(), clang::CodeGen::CGOpenMPRuntime::checkAndEmitLastprivateConditional(), commonEmitCXXMemberOrOperatorCall(), clang::CodeGen::CodeGenFunction::convertTempToRValue(), convertToType(), clang::CodeGen::ReductionCodeGen::emitAggregateType(), clang::CodeGen::CodeGenFunction::EmitAMDGPUDevicePrintfCallExpr(), clang::CodeGen::CodeGenFunction::EmitAnyExpr(), clang::CodeGen::CodeGenFunction::EmitAnyExprToMem(), clang::CodeGen::CodeGenFunction::EmitAtomicExpr(), clang::CodeGen::CodeGenFunction::EmitAtomicInit(), clang::CodeGen::CodeGenFunction::EmitAtomicStore(), clang::CodeGen::CodeGenFunction::EmitAutoVarInit(), EmitBinaryAtomic(), EmitBinaryAtomicPost(), clang::CodeGen::CodeGenFunction::EmitBinaryOperatorLValue(), clang::CodeGen::CodeGenFunction::EmitBlockCallExpr(), clang::CodeGen::CodeGenFunction::EmitBuiltinExpr(), clang::CodeGen::CodeGenFunction::emitBuiltinOSLogFormat(), clang::CodeGen::CodeGenFunction::EmitCall(), clang::CodeGen::CodeGenFunction::EmitCallAndReturnForThunk(), EmitCheckedMixedSignMultiply(), EmitCheckedUnsignedMultiplySignedResult(), clang::CodeGen::CodeGenFunction::EmitCoroutineIntrinsic(), emitCPPObjectAtomicGetterCall(), emitCPPObjectAtomicSetterCall(), clang::CodeGen::CGCUDARuntime::EmitCUDAKernelCallExpr(), clang::CodeGen::CodeGenFunction::EmitCXXConstructorCall(), clang::CodeGen::CodeGenFunction::EmitCXXMemberPointerCallExpr(), clang::CodeGen::CodeGenFunction::EmitCXXNewExpr(), clang::CodeGen::CodeGenFunction::EmitCXXPseudoDestructorExpr(), clang::CodeGen::CodeGenFunction::EmitDelegateCallArg(), clang::CodeGen::CodeGenFunction::EmitDelegateCXXConstructorCall(), clang::CodeGen::CodeGenFunction::EmitDeleteCall(), clang::CodeGen::CGOpenMPRuntime::emitDependClause(), clang::CodeGen::CodeGenFunction::EmitForwardingCallToLambda(), clang::CodeGen::CodeGenFunction::EmitInheritedCXXConstructorCall(), clang::CodeGen::CodeGenFunction::EmitInitializerForField(), emitInitWithReductionInitializer(), clang::CodeGen::CodeGenFunction::EmitIntelFPGAMemBuiltin(), clang::CodeGen::CodeGenFunction::EmitIntelSYCLPtrAnnotationBuiltin(), clang::CodeGen::CodeGenFunction::EmitLambdaBlockInvokeBody(), clang::CodeGen::CodeGenFunction::EmitLambdaInAllocaCallOpBody(), clang::CodeGen::CodeGenFunction::EmitLambdaStaticInvokeBody(), clang::CodeGen::CodeGenFunction::EmitLambdaVLACapture(), clang::CodeGen::CodeGenFunction::EmitLoadOfBitfieldLValue(), clang::CodeGen::CodeGenFunction::EmitLoadOfExtVectorElementLValue(), clang::CodeGen::CodeGenFunction::EmitLoadOfLValue(), EmitLoadOfMatrixLValue(), clang::CodeGen::CodeGenFunction::EmitObjCBoxedExpr(), clang::CodeGen::CodeGenFunction::EmitObjCMessageExpr(), clang::CodeGen::CodeGenFunction::emitOMPSimpleStore(), emitReductionCombiner(), clang::CodeGen::CodeGenFunction::EmitReferenceBindingToExpr(), clang::CodeGen::CodeGenFunction::EmitRValueForField(), clang::CodeGen::CodeGenFunction::EmitScalarInit(), clang::CodeGen::CodeGenFunction::EmitStoreOfScalar(), emitStructSetterCall(), clang::CodeGen::CodeGenFunction::EmitSynthesizedCXXCopyCtorCall(), clang::CodeGen::CGOpenMPRuntime::emitTaskInit(), emitWriteback(), emitWritebackArg(), EnterNewDeleteCleanup(), clang::CodeGen::CodeGenFunction::generateObjCGetterBody(), clang::CodeGen::CodeGenFunction::generateObjCSetterBody(), clang::CodeGen::CGObjCRuntime::GeneratePossiblySpecializedMessageSend(), clang::CodeGen::CodeGenFunction::GenerateVarArgsThunk(), get(), getIgnored(), clang::CodeGen::CodeGenFunction::GetUndefRValue(), and PerformReturnAdjustment().

◆ getAggregate()

static RValue clang::CodeGen::RValue::getAggregate ( Address  addr,
bool  isVolatile = false 
)
inlinestatic

◆ getAggregateAddress()

Address clang::CodeGen::RValue::getAggregateAddress ( ) const
inline

◆ getAggregatePointer()

llvm::Value* clang::CodeGen::RValue::getAggregatePointer ( QualType  PointeeType,
CodeGenFunction CGF 
) const
inline

Definition at line 87 of file CGValue.h.

References getAggregateAddress(), and clang::CodeGen::Address::getBasePointer().

◆ getComplex() [1/2]

static RValue clang::CodeGen::RValue::getComplex ( const std::pair< llvm::Value *, llvm::Value * > &  C)
inlinestatic

Definition at line 114 of file CGValue.h.

References getComplex().

◆ getComplex() [2/2]

static RValue clang::CodeGen::RValue::getComplex ( llvm::Value *  V1,
llvm::Value *  V2 
)
inlinestatic

◆ getComplexVal()

std::pair<llvm::Value *, llvm::Value *> clang::CodeGen::RValue::getComplexVal ( ) const
inline

getComplexVal - Return the real/imag components of this complex value.

Definition at line 77 of file CGValue.h.

References Vals.

Referenced by convertToComplexValue(), convertToScalarValue(), and clang::CodeGen::CallArg::copyInto().

◆ getIgnored()

static RValue clang::CodeGen::RValue::getIgnored ( )
inlinestatic

Definition at line 92 of file CGValue.h.

References get().

Referenced by clang::CodeGen::AggValueSlot::asRValue().

◆ getScalarVal()

llvm::Value* clang::CodeGen::RValue::getScalarVal ( ) const
inline

getScalarVal() - Return the Value* of this scalar value.

Definition at line 70 of file CGValue.h.

References isScalar(), and Vals.

Referenced by convertToComplexValue(), convertToScalarValue(), clang::CodeGen::CallArg::copyInto(), clang::CodeGen::CGObjCRuntime::destroyCalleeDestroyedArguments(), clang::CodeGen::CodeGenFunction::EmitBinaryOperatorLValue(), clang::CodeGen::CodeGenFunction::EmitCall(), clang::CodeGen::CodeGenFunction::EmitCallExprLValue(), clang::CodeGen::CodeGenFunction::EmitCXXGlobalVarDeclInit(), clang::CodeGen::CodeGenFunction::EmitCXXNewExpr(), clang::CodeGen::CodeGenFunction::EmitForwardingCallToLambda(), clang::CodeGen::CodeGenFunction::EmitInlinedInheritingCXXConstructorCall(), clang::CodeGen::CodeGenFunction::EmitLoadOfScalar(), clang::CodeGen::CodeGenFunction::EmitNonNullRValueCheck(), clang::CodeGen::CodeGenFunction::EmitObjCBoxedExpr(), clang::CodeGen::CodeGenFunction::EmitObjCMessageExpr(), clang::CodeGen::CodeGenFunction::EmitObjCMessageExprLValue(), clang::CodeGen::CodeGenFunction::EmitObjCMRRAutoreleasePoolPush(), clang::CodeGen::CodeGenFunction::EmitScalarCompoundAssignWithComplex(), clang::CodeGen::CodeGenFunction::emitScalarConstant(), emitSimdlenSafelenClause(), clang::CodeGen::CodeGenFunction::EmitStoreThroughBitfieldLValue(), clang::CodeGen::CodeGenFunction::EmitStoreThroughExtVectorComponentLValue(), clang::CodeGen::CodeGenFunction::EmitStoreThroughLValue(), emitWritebackArg(), clang::CodeGen::CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction(), clang::CodeGen::CodeGenFunction::generateObjCGetterBody(), clang::CodeGen::CodeGenFunction::GenerateVarArgsThunk(), PerformReturnAdjustment(), clang::CodeGen::CodeGenFunction::protectFromPeepholes(), clang::CodeGen::CodeGenFunction::StartFunction(), and tryEmitARCRetainLoadOfScalar().

◆ isAggregate()

bool clang::CodeGen::RValue::isAggregate ( ) const
inline

◆ isComplex()

bool clang::CodeGen::RValue::isComplex ( ) const
inline

◆ isScalar()

bool clang::CodeGen::RValue::isScalar ( ) const
inline

◆ isVolatileQualified()

bool clang::CodeGen::RValue::isVolatileQualified ( ) const
inline

Definition at line 67 of file CGValue.h.

Referenced by clang::CodeGen::CallArg::copyInto().

Friends And Related Function Documentation

◆ DominatingValue< RValue >

friend struct DominatingValue< RValue >
friend

Definition at line 158 of file CGValue.h.

Member Data Documentation

◆ AggregateAddr

Address clang::CodeGen::RValue::AggregateAddr

Definition at line 54 of file CGValue.h.

Referenced by getAggregate(), and getAggregateAddress().

◆ first

llvm::Value* clang::CodeGen::RValue::first

Definition at line 49 of file CGValue.h.

◆ second

llvm::Value* clang::CodeGen::RValue::second

Definition at line 50 of file CGValue.h.

Referenced by emitOMPAtomicCaptureExpr().

◆ 

struct { ... } clang::CodeGen::RValue::Vals

The documentation for this class was generated from the following file: