clang 24.0.0git
clang::CIRGen::CIRGenFunction::AutoVarEmission Struct Reference

#include "/work/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/CIR/CodeGen/CIRGenFunction.h"

Classes

struct  Invalid

Public Member Functions

 AutoVarEmission (Invalid)
 AutoVarEmission (const clang::VarDecl &variable)
bool wasEmittedAsGlobal () const
bool wasEmittedAsOffloadClause () const
Address getAllocatedAddress () const
 Returns the raw, allocated address, which is not necessarily the address of the object itself.
void setAllocatedAddress (Address a)
Address getObjectAddress (CIRGenFunction &cgf) const
 Returns the address of the object within this declaration.

Static Public Member Functions

static AutoVarEmission invalid ()

Public Attributes

const clang::VarDecl * variable
Address addr
 The address of the alloca for languages with explicit address space (e.g.
bool isConstantAggregate = false
 True if the variable is of aggregate type and has a constant initializer.
bool isEscapingByRef = false
 True if the variable is a __block variable that is captured by an escaping block.
bool emittedAsOffload = false
 True if the variable was emitted as an offload recipe, and thus doesn't have the same sort of alloca initialization.
bool useLifetimeMarkers = false
 True if lifetime op should be used.
mlir::Value nrvoFlag {}

Detailed Description

Definition at line 844 of file CIRGenFunction.h.

Constructor & Destructor Documentation

◆ AutoVarEmission() [1/2]

clang::CIRGen::CIRGenFunction::AutoVarEmission::AutoVarEmission ( Invalid )
inline

Definition at line 870 of file CIRGenFunction.h.

References addr, invalid(), clang::nullptr, and variable.

Referenced by invalid().

◆ AutoVarEmission() [2/2]

clang::CIRGen::CIRGenFunction::AutoVarEmission::AutoVarEmission ( const clang::VarDecl & variable)
inline

Definition at line 872 of file CIRGenFunction.h.

References addr, invalid(), and variable.

Member Function Documentation

◆ getAllocatedAddress()

Address clang::CIRGen::CIRGenFunction::AutoVarEmission::getAllocatedAddress ( ) const
inline

Returns the raw, allocated address, which is not necessarily the address of the object itself.

It is casted to default address space for address space agnostic languages.

Definition at line 884 of file CIRGenFunction.h.

References addr.

◆ getObjectAddress()

Address clang::CIRGen::CIRGenFunction::AutoVarEmission::getObjectAddress ( CIRGenFunction & cgf) const
inline

Returns the address of the object within this declaration.

Note that this does not chase the forwarding pointer for __block decls.

Definition at line 894 of file CIRGenFunction.h.

References addr, clang::CIRGen::CIRGenFunction::CIRGenFunction(), clang::CIRGen::Address::invalid(), isEscapingByRef, and cir::MissingFeatures::opAllocaEscapeByReference().

Referenced by clang::CIRGen::CIRGenFunction::emitAutoVarCleanups(), and clang::CIRGen::CIRGenFunction::emitAutoVarTypeCleanup().

◆ invalid()

AutoVarEmission clang::CIRGen::CIRGenFunction::AutoVarEmission::invalid ( )
inlinestatic

Definition at line 875 of file CIRGenFunction.h.

References AutoVarEmission(), and clang::Invalid.

Referenced by AutoVarEmission(), and AutoVarEmission().

◆ setAllocatedAddress()

void clang::CIRGen::CIRGenFunction::AutoVarEmission::setAllocatedAddress ( Address a)
inline

◆ wasEmittedAsGlobal()

bool clang::CIRGen::CIRGenFunction::AutoVarEmission::wasEmittedAsGlobal ( ) const
inline

Definition at line 877 of file CIRGenFunction.h.

References addr.

Referenced by clang::CIRGen::CIRGenFunction::emitAutoVarInit().

◆ wasEmittedAsOffloadClause()

bool clang::CIRGen::CIRGenFunction::AutoVarEmission::wasEmittedAsOffloadClause ( ) const
inline

Definition at line 879 of file CIRGenFunction.h.

References emittedAsOffload.

Referenced by clang::CIRGen::CIRGenFunction::emitAutoVarInit().

Member Data Documentation

◆ addr

Address clang::CIRGen::CIRGenFunction::AutoVarEmission::addr

The address of the alloca for languages with explicit address space (e.g.

OpenCL) or alloca casted to generic pointer for address space agnostic languages (e.g. C++). Invalid if the variable was emitted as a global constant.

Definition at line 850 of file CIRGenFunction.h.

Referenced by AutoVarEmission(), AutoVarEmission(), clang::CIRGen::CIRGenFunction::emitAutoVarAlloca(), clang::CIRGen::CIRGenFunction::emitAutoVarInit(), getAllocatedAddress(), getObjectAddress(), setAllocatedAddress(), and wasEmittedAsGlobal().

◆ emittedAsOffload

bool clang::CIRGen::CIRGenFunction::AutoVarEmission::emittedAsOffload = false

True if the variable was emitted as an offload recipe, and thus doesn't have the same sort of alloca initialization.

Definition at line 862 of file CIRGenFunction.h.

Referenced by clang::CIRGen::OpenACCRecipeBuilderBase::createFirstprivateRecipeCopy(), and wasEmittedAsOffloadClause().

◆ isConstantAggregate

bool clang::CIRGen::CIRGenFunction::AutoVarEmission::isConstantAggregate = false

True if the variable is of aggregate type and has a constant initializer.

Definition at line 854 of file CIRGenFunction.h.

Referenced by clang::CIRGen::CIRGenFunction::emitAutoVarAlloca(), and clang::CIRGen::CIRGenFunction::emitAutoVarInit().

◆ isEscapingByRef

bool clang::CIRGen::CIRGenFunction::AutoVarEmission::isEscapingByRef = false

True if the variable is a __block variable that is captured by an escaping block.

Definition at line 858 of file CIRGenFunction.h.

Referenced by clang::CIRGen::CIRGenFunction::emitAutoVarAlloca(), and getObjectAddress().

◆ nrvoFlag

mlir::Value clang::CIRGen::CIRGenFunction::AutoVarEmission::nrvoFlag {}

◆ useLifetimeMarkers

bool clang::CIRGen::CIRGenFunction::AutoVarEmission::useLifetimeMarkers = false

True if lifetime op should be used.

Definition at line 865 of file CIRGenFunction.h.

Referenced by clang::CIRGen::CIRGenFunction::emitAutoVarAlloca().

◆ variable


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