clang 22.0.0git
|
#include "/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/CIR/CodeGen/CIRGenFunction.h"
Classes | |
class | AbstractCallee |
An abstract representation of regular/ObjC call/message targets. More... | |
struct | AutoVarEmission |
class | ConditionalEvaluation |
An object to manage conditionally-evaluated expressions. More... | |
struct | ConditionalInfo |
class | ConstantEmission |
class | DeclMapRevertingRAII |
class | FieldConstructionScope |
A scope within which we are constructing the fields of an object which might use a CXXDefaultInitExpr. More... | |
struct | LexicalScope |
Represents a scope, including function bodies, compound statements, and the substatements of if/while/do/for/switch/try statements. More... | |
class | OpaqueValueMapping |
An RAII object to set (and then clear) a mapping for an OpaqueValueExpr. More... | |
class | OpaqueValueMappingData |
A non-RAII class containing all the information about a bound opaque value. More... | |
struct | OpenACCDataOperandInfo |
struct | PrototypeWrapper |
class | RunCleanupsScope |
Enters a new scope for capturing cleanups, all of which will be executed once the scope is exited. More... | |
class | SourceLocRAIIObject |
class | StmtExprEvaluation |
An RAII object to record that we're evaluating a statement expression. More... | |
struct | VPtr |
Public Types | |
using | DeclMapTy = llvm::DenseMap< const clang::Decl *, Address > |
using | SymTableTy = llvm::ScopedHashTable< const clang::Decl *, mlir::Value > |
The symbol table maps a variable name to a value in the current scope. | |
using | SymTableScopeTy = llvm::ScopedHashTableScope< const clang::Decl *, mlir::Value > |
using | VisitedVirtualBasesSetTy = llvm::SmallPtrSet< const clang::CXXRecordDecl *, 4 > |
using | VPtrsVector = llvm::SmallVector< VPtr, 4 > |
typedef void | Destroyer(CIRGenFunction &cgf, Address addr, QualType ty) |
Public Member Functions | |
clang::ASTContext & | getContext () const |
CIRGenBuilderTy & | getBuilder () |
CIRGenModule & | getCIRGenModule () |
const CIRGenModule & | getCIRGenModule () const |
mlir::Block * | getCurFunctionEntryBlock () |
mlir::Type | convertTypeForMem (QualType t) |
mlir::Type | convertType (clang::QualType t) |
mlir::Type | convertType (const TypeDecl *t) |
CIRGenFunction (CIRGenModule &cgm, CIRGenBuilderTy &builder, bool suppressNewContext=false) | |
~CIRGenFunction () | |
CIRGenTypes & | getTypes () const |
const TargetInfo & | getTarget () const |
mlir::MLIRContext & | getMLIRContext () |
mlir::Value | createDummyValue (mlir::Location loc, clang::QualType qt) |
void | emitNullInitialization (mlir::Location loc, Address destPtr, QualType ty) |
std::string | getCounterRefTmpAsString () |
std::string | getCounterAggTmpAsString () |
mlir::Location | getLoc (clang::SourceLocation srcLoc) |
Helpers to convert Clang's SourceLocation to a MLIR Location. | |
mlir::Location | getLoc (clang::SourceRange srcLoc) |
mlir::Location | getLoc (mlir::Location lhs, mlir::Location rhs) |
const clang::LangOptions & | getLangOpts () const |
bool | haveInsertPoint () const |
True if an insertion point is defined. | |
bool | isLValueSuitableForInlineAtomic (LValue lv) |
An LValue is a candidate for having its loads and stores be made atomic if we are operating under /volatile:ms and the LValue itself is volatile and performing such an operation can be performed without a libcall. | |
void | finishFunction (SourceLocation endLoc) |
bool | isTrivialInitializer (const Expr *init) |
Determine whether the given initializer is trivial in the sense that it requires no code to be generated. | |
bool | constantFoldsToBool (const clang::Expr *cond, bool &resultBool, bool allowLabels=false) |
If the specified expression does not fold to a constant, or if it does but contains a label, return false. | |
bool | constantFoldsToSimpleInteger (const clang::Expr *cond, llvm::APSInt &resultInt, bool allowLabels=false) |
If the specified expression does not fold to a constant, or if it does fold but contains a label, return false. | |
bool | containsLabel (const clang::Stmt *s, bool ignoreCaseStmts=false) |
Return true if the statement contains a label in it. | |
ConstantEmission | tryEmitAsConstant (const DeclRefExpr *refExpr) |
Try to emit a reference to the given value without producing it as an l-value. | |
ConstantEmission | tryEmitAsConstant (const MemberExpr *me) |
mlir::Value | evaluateExprAsBool (const clang::Expr *e) |
Perform the usual unary conversions on the specified expression and compare the result against zero, returning an Int1Ty value. | |
cir::GlobalOp | addInitializerToStaticVarDecl (const VarDecl &d, cir::GlobalOp gv, cir::GetGlobalOp gvAddr) |
Add the initializer for 'd' to the global variable that has already been created for it. | |
void | setAddrOfLocalVar (const clang::VarDecl *vd, Address addr) |
Set the address of a local variable. | |
bool | shouldNullCheckClassCastValue (const CastExpr *ce) |
RValue | convertTempToRValue (Address addr, clang::QualType type, clang::SourceLocation loc) |
Given the address of a temporary variable, produce an r-value of its type. | |
VPtrsVector | getVTablePointers (const clang::CXXRecordDecl *vtableClass) |
void | getVTablePointers (clang::BaseSubobject base, const clang::CXXRecordDecl *nearestVBase, clang::CharUnits offsetFromNearestVBase, bool baseIsNonVirtualPrimaryBase, const clang::CXXRecordDecl *vtableClass, VisitedVirtualBasesSetTy &vbases, VPtrsVector &vptrs) |
mlir::Value | getVTablePtr (mlir::Location loc, Address thisAddr, const clang::CXXRecordDecl *vtableClass) |
Return the Value of the vtable pointer member pointed to by thisAddr. | |
bool | shouldEmitVTableTypeCheckedLoad (const CXXRecordDecl *rd) |
Returns whether we should perform a type checked load when loading a virtual function for virtual calls to members of RD. | |
LValue | makeNaturalAlignPointeeAddrLValue (mlir::Value v, clang::QualType t) |
Given a value of type T* that may not be to a complete object, construct an l-vlaue withi the natural pointee alignment of T. | |
LValue | makeNaturalAlignAddrLValue (mlir::Value val, QualType ty) |
Address | makeNaturalAddressForPointer (mlir::Value ptr, QualType t, CharUnits alignment, bool forPointeeType=false, LValueBaseInfo *baseInfo=nullptr) |
Construct an address with the natural alignment of T. | |
Address | getAddressOfBaseClass (Address value, const CXXRecordDecl *derived, llvm::iterator_range< CastExpr::path_const_iterator > path, bool nullCheckValue, SourceLocation loc) |
LValue | makeAddrLValue (Address addr, QualType ty, AlignmentSource source=AlignmentSource::Type) |
LValue | makeAddrLValue (Address addr, QualType ty, LValueBaseInfo baseInfo) |
void | initializeVTablePointers (mlir::Location loc, const clang::CXXRecordDecl *rd) |
void | initializeVTablePointer (mlir::Location loc, const VPtr &vptr) |
Address | getAddrOfLocalVar (const clang::VarDecl *vd) |
Return the address of a local variable. | |
Address | getAddrOfBitFieldStorage (LValue base, const clang::FieldDecl *field, mlir::Type fieldType, unsigned index) |
mlir::Value | loadCXXThis () |
Load the value for 'this'. | |
Address | loadCXXThisAddress () |
Address | getAddressOfDirectBaseInCompleteClass (mlir::Location loc, Address value, const CXXRecordDecl *derived, const CXXRecordDecl *base, bool baseIsVirtual) |
Convert the given pointer to a complete class to the given direct base. | |
AggValueSlot::Overlap_t | getOverlapForBaseInit (const CXXRecordDecl *rd, const CXXRecordDecl *baseRD, bool isVirtual) |
Determine whether a base class initialization may overlap some other object. | |
RValue | getUndefRValue (clang::QualType ty) |
Get an appropriate 'undef' rvalue for the given type. | |
cir::FuncOp | generateCode (clang::GlobalDecl gd, cir::FuncOp fn, cir::FuncType funcType) |
clang::QualType | buildFunctionArgList (clang::GlobalDecl gd, FunctionArgList &args) |
void | startFunction (clang::GlobalDecl gd, clang::QualType returnType, cir::FuncOp fn, cir::FuncType funcType, FunctionArgList args, clang::SourceLocation loc, clang::SourceLocation startLoc) |
Emit code for the start of a function. | |
void | popCleanupBlocks (EHScopeStack::stable_iterator oldCleanupStackDepth) |
Takes the old cleanup stack size and emits the cleanup blocks that have been added. | |
void | popCleanupBlock () |
Pops a cleanup block. | |
template<class T , class... As> | |
void | pushFullExprCleanup (CleanupKind kind, As... a) |
Push a cleanup to be run at the end of the current full-expression. | |
void | pushDestroy (CleanupKind kind, Address addr, QualType type, Destroyer *destroyer) |
Destroyer * | getDestroyer (clang::QualType::DestructionKind kind) |
mlir::Value | emitAlignmentAssumption (mlir::Value ptrValue, QualType ty, SourceLocation loc, SourceLocation assumptionLoc, int64_t alignment, mlir::Value offsetValue=nullptr) |
mlir::Value | emitAlignmentAssumption (mlir::Value ptrValue, const Expr *expr, SourceLocation assumptionLoc, int64_t alignment, mlir::Value offsetValue=nullptr) |
Address | emitAddrOfFieldStorage (Address base, const FieldDecl *field, llvm::StringRef fieldName, unsigned fieldIndex) |
Get the address of a zero-sized field within a record. | |
mlir::Value | emitAlloca (llvm::StringRef name, mlir::Type ty, mlir::Location loc, clang::CharUnits alignment, bool insertIntoFnEntryBlock, mlir::Value arraySize=nullptr) |
mlir::Value | emitAlloca (llvm::StringRef name, mlir::Type ty, mlir::Location loc, clang::CharUnits alignment, mlir::OpBuilder::InsertPoint ip, mlir::Value arraySize=nullptr) |
void | emitAggregateStore (mlir::Value value, Address dest) |
void | emitAggExpr (const clang::Expr *e, AggValueSlot slot) |
LValue | emitAggExprToLValue (const Expr *e) |
RValue | emitAnyExpr (const clang::Expr *e, AggValueSlot aggSlot=AggValueSlot::ignored()) |
Emit code to compute the specified expression which can have any type. | |
void | emitAnyExprToMem (const Expr *e, Address location, Qualifiers quals, bool isInitializer) |
Emits the code necessary to evaluate an arbitrary expression into the given memory location. | |
RValue | emitAnyExprToTemp (const clang::Expr *e) |
Similarly to emitAnyExpr(), however, the result will always be accessible even if no aggregate location is provided. | |
void | emitArrayDestroy (mlir::Value begin, mlir::Value end, QualType elementType, CharUnits elementAlign, Destroyer *destroyer) |
Destroys all the elements of the given array, beginning from last to first. | |
mlir::Value | emitArrayLength (const clang::ArrayType *arrayType, QualType &baseType, Address &addr) |
Computes the length of an array in elements, as well as the base element type and a properly-typed first element pointer. | |
LValue | emitArraySubscriptExpr (const clang::ArraySubscriptExpr *e) |
Address | emitArrayToPointerDecay (const Expr *e, LValueBaseInfo *baseInfo=nullptr) |
mlir::LogicalResult | emitAsmStmt (const clang::AsmStmt &s) |
RValue | emitAtomicExpr (AtomicExpr *e) |
void | emitAtomicInit (Expr *init, LValue dest) |
AutoVarEmission | emitAutoVarAlloca (const clang::VarDecl &d, mlir::OpBuilder::InsertPoint ip={}) |
void | emitAutoVarDecl (const clang::VarDecl &d) |
Emit code and set up symbol table for a variable declaration with auto, register, or no storage class specifier. | |
void | emitAutoVarCleanups (const AutoVarEmission &emission) |
void | emitAutoVarInit (const AutoVarEmission &emission) |
Emit the initializer for an allocated variable. | |
void | emitAutoVarTypeCleanup (const AutoVarEmission &emission, clang::QualType::DestructionKind dtorKind) |
Enter a destroy cleanup for the given local variable. | |
void | maybeEmitDeferredVarDeclInit (const VarDecl *vd) |
void | emitBaseInitializer (mlir::Location loc, const CXXRecordDecl *classDecl, CXXCtorInitializer *baseInit) |
LValue | emitBinaryOperatorLValue (const BinaryOperator *e) |
mlir::LogicalResult | emitBreakStmt (const clang::BreakStmt &s) |
RValue | emitBuiltinExpr (const clang::GlobalDecl &gd, unsigned builtinID, const clang::CallExpr *e, ReturnValueSlot returnValue) |
RValue | emitCall (const CIRGenFunctionInfo &funcInfo, const CIRGenCallee &callee, ReturnValueSlot returnValue, const CallArgList &args, cir::CIRCallOpInterface *callOp, mlir::Location loc) |
RValue | emitCall (const CIRGenFunctionInfo &funcInfo, const CIRGenCallee &callee, ReturnValueSlot returnValue, const CallArgList &args, cir::CIRCallOpInterface *callOrTryCall=nullptr) |
RValue | emitCall (clang::QualType calleeTy, const CIRGenCallee &callee, const clang::CallExpr *e, ReturnValueSlot returnValue) |
void | emitCallArg (CallArgList &args, const clang::Expr *e, clang::QualType argType) |
void | emitCallArgs (CallArgList &args, PrototypeWrapper prototype, llvm::iterator_range< clang::CallExpr::const_arg_iterator > argRange, AbstractCallee callee=AbstractCallee(), unsigned paramsToSkip=0) |
RValue | emitCallExpr (const clang::CallExpr *e, ReturnValueSlot returnValue=ReturnValueSlot()) |
LValue | emitCallExprLValue (const clang::CallExpr *e) |
CIRGenCallee | emitCallee (const clang::Expr *e) |
template<typename T > | |
mlir::LogicalResult | emitCaseDefaultCascade (const T *stmt, mlir::Type condType, mlir::ArrayAttr value, cir::CaseOpKind kind, bool buildingTopLevelCase) |
mlir::LogicalResult | emitCaseStmt (const clang::CaseStmt &s, mlir::Type condType, bool buildingTopLevelCase) |
LValue | emitCastLValue (const CastExpr *e) |
Casts are never lvalues unless that cast is to a reference type. | |
mlir::Value | emitCheckedArgForAssume (const Expr *e) |
Emits an argument for a call to a __builtin_assume . | |
mlir::Value | emitComplexToScalarConversion (mlir::Value src, QualType srcTy, QualType dstTy, SourceLocation loc) |
Emit a conversion from the specified complex type to the specified destination type, where the destination type is an LLVM scalar type. | |
LValue | emitCompoundAssignmentLValue (const clang::CompoundAssignOperator *e) |
LValue | emitCompoundLiteralLValue (const CompoundLiteralExpr *e) |
void | emitConstructorBody (FunctionArgList &args) |
void | emitDestroy (Address addr, QualType type, Destroyer *destroyer) |
Immediately perform the destruction of the given object. | |
void | emitDestructorBody (FunctionArgList &args) |
Emits the body of the current destructor. | |
mlir::LogicalResult | emitContinueStmt (const clang::ContinueStmt &s) |
void | emitCXXConstructExpr (const clang::CXXConstructExpr *e, AggValueSlot dest) |
void | emitCXXAggrConstructorCall (const CXXConstructorDecl *ctor, const clang::ArrayType *arrayType, Address arrayBegin, const CXXConstructExpr *e, bool newPointerIsChecked, bool zeroInitialize=false) |
Emit a loop to call a particular constructor for each of several members of an array. | |
void | emitCXXAggrConstructorCall (const CXXConstructorDecl *ctor, mlir::Value numElements, Address arrayBase, const CXXConstructExpr *e, bool newPointerIsChecked, bool zeroInitialize) |
Emit a loop to call a particular constructor for each of several members of an array. | |
void | emitCXXConstructorCall (const clang::CXXConstructorDecl *d, clang::CXXCtorType type, bool forVirtualBase, bool delegating, AggValueSlot thisAVS, const clang::CXXConstructExpr *e) |
void | emitCXXConstructorCall (const clang::CXXConstructorDecl *d, clang::CXXCtorType type, bool forVirtualBase, bool delegating, Address thisAddr, CallArgList &args, clang::SourceLocation loc) |
void | emitCXXDestructorCall (const CXXDestructorDecl *dd, CXXDtorType type, bool forVirtualBase, bool delegating, Address thisAddr, QualType thisTy) |
RValue | emitCXXDestructorCall (GlobalDecl dtor, const CIRGenCallee &callee, mlir::Value thisVal, QualType thisTy, mlir::Value implicitParam, QualType implicitParamTy, const CallExpr *e) |
mlir::LogicalResult | emitCXXForRangeStmt (const CXXForRangeStmt &s, llvm::ArrayRef< const Attr * > attrs) |
RValue | emitCXXMemberCallExpr (const clang::CXXMemberCallExpr *e, ReturnValueSlot returnValue) |
RValue | emitCXXMemberOrOperatorCall (const clang::CXXMethodDecl *md, const CIRGenCallee &callee, ReturnValueSlot returnValue, mlir::Value thisPtr, mlir::Value implicitParam, clang::QualType implicitParamTy, const clang::CallExpr *ce, CallArgList *rtlArgs) |
RValue | emitCXXMemberOrOperatorMemberCallExpr (const clang::CallExpr *ce, const clang::CXXMethodDecl *md, ReturnValueSlot returnValue, bool hasQualifier, clang::NestedNameSpecifier qualifier, bool isArrow, const clang::Expr *base) |
mlir::Value | emitCXXNewExpr (const CXXNewExpr *e) |
RValue | emitCXXOperatorMemberCallExpr (const CXXOperatorCallExpr *e, const CXXMethodDecl *md, ReturnValueSlot returnValue) |
RValue | emitCXXPseudoDestructorExpr (const CXXPseudoDestructorExpr *expr) |
void | emitCXXThrowExpr (const CXXThrowExpr *e) |
void | emitCtorPrologue (const clang::CXXConstructorDecl *ctor, clang::CXXCtorType ctorType, FunctionArgList &args) |
This routine generates necessary code to initialize base classes and non-static data members belonging to this constructor. | |
void | emitDelegatingCXXConstructorCall (const CXXConstructorDecl *ctor, const FunctionArgList &args) |
mlir::LogicalResult | emitDoStmt (const clang::DoStmt &s) |
void | emitExprAsInit (const clang::Expr *init, const clang::ValueDecl *d, LValue lvalue, bool capturedByInit=false) |
Emit an expression as an initializer for an object (variable, field, etc.) at the given location. | |
mlir::LogicalResult | emitFunctionBody (const clang::Stmt *body) |
mlir::LogicalResult | emitGotoStmt (const clang::GotoStmt &s) |
void | emitImplicitAssignmentOperatorBody (FunctionArgList &args) |
void | emitInitializerForField (clang::FieldDecl *field, LValue lhs, clang::Expr *init) |
mlir::Value | emitPromotedComplexExpr (const Expr *e, QualType promotionType) |
mlir::Value | emitPromotedScalarExpr (const Expr *e, QualType promotionType) |
mlir::Value | emitPromotedValue (mlir::Value result, QualType promotionType) |
mlir::Value | emitScalarExpr (const clang::Expr *e) |
Emit the computation of the specified expression of scalar type. | |
mlir::Value | emitScalarPrePostIncDec (const UnaryOperator *e, LValue lv, cir::UnaryOpKind kind, bool isPre) |
void | emitStopPoint (const Stmt *s) |
Build a debug stoppoint if we are emitting debug info. | |
mlir::LogicalResult | emitStmt (const clang::Stmt *s, bool useCurrentScope, llvm::ArrayRef< const Attr * > attrs={}) |
mlir::LogicalResult | emitSimpleStmt (const clang::Stmt *s, bool useCurrentScope) |
mlir::LogicalResult | emitForStmt (const clang::ForStmt &s) |
mlir::Value | emitComplexExpr (const Expr *e) |
Emit the computation of the specified expression of complex type, returning the result. | |
void | emitComplexExprIntoLValue (const Expr *e, LValue dest, bool isInit) |
mlir::Value | emitComplexPrePostIncDec (const UnaryOperator *e, LValue lv, cir::UnaryOpKind op, bool isPre) |
LValue | emitComplexAssignmentLValue (const BinaryOperator *e) |
LValue | emitComplexCompoundAssignmentLValue (const CompoundAssignOperator *e) |
LValue | emitScalarCompoundAssignWithComplex (const CompoundAssignOperator *e, mlir::Value &result) |
mlir::LogicalResult | emitCompoundStmt (const clang::CompoundStmt &s, Address *lastValue=nullptr, AggValueSlot slot=AggValueSlot::ignored()) |
mlir::LogicalResult | emitCompoundStmtWithoutScope (const clang::CompoundStmt &s, Address *lastValue=nullptr, AggValueSlot slot=AggValueSlot::ignored()) |
void | emitDecl (const clang::Decl &d, bool evaluateConditionDecl=false) |
mlir::LogicalResult | emitDeclStmt (const clang::DeclStmt &s) |
LValue | emitDeclRefLValue (const clang::DeclRefExpr *e) |
mlir::LogicalResult | emitDefaultStmt (const clang::DefaultStmt &s, mlir::Type condType, bool buildingTopLevelCase) |
void | emitDelegateCXXConstructorCall (const clang::CXXConstructorDecl *ctor, clang::CXXCtorType ctorType, const FunctionArgList &args, clang::SourceLocation loc) |
void | emitDelegateCallArg (CallArgList &args, const clang::VarDecl *param, clang::SourceLocation loc) |
We are performing a delegate call; that is, the current function is delegating to another one. | |
mlir::LogicalResult | emitIfOnBoolExpr (const clang::Expr *cond, const clang::Stmt *thenS, const clang::Stmt *elseS) |
Emit an if on a boolean condition to the specified blocks. | |
cir::IfOp | emitIfOnBoolExpr (const clang::Expr *cond, BuilderCallbackRef thenBuilder, mlir::Location thenLoc, BuilderCallbackRef elseBuilder, std::optional< mlir::Location > elseLoc={}) |
Emit an if on a boolean condition, filling then and else into appropriated regions. | |
mlir::Value | emitOpOnBoolExpr (mlir::Location loc, const clang::Expr *cond) |
TODO(cir): see EmitBranchOnBoolExpr for extra ideas). | |
mlir::LogicalResult | emitLabel (const clang::LabelDecl &d) |
mlir::LogicalResult | emitLabelStmt (const clang::LabelStmt &s) |
mlir::LogicalResult | emitIfStmt (const clang::IfStmt &s) |
void | emitIgnoredExpr (const clang::Expr *e) |
Emit code to compute the specified expression, ignoring the result. | |
RValue | emitLoadOfBitfieldLValue (LValue lv, SourceLocation loc) |
mlir::Value | emitLoadOfComplex (LValue src, SourceLocation loc) |
Load a complex number from the specified l-value. | |
RValue | emitLoadOfLValue (LValue lv, SourceLocation loc) |
Given an expression that represents a value lvalue, this method emits the address of the lvalue, then loads the result as an rvalue, returning the rvalue. | |
Address | emitLoadOfReference (LValue refLVal, mlir::Location loc, LValueBaseInfo *pointeeBaseInfo) |
LValue | emitLoadOfReferenceLValue (Address refAddr, mlir::Location loc, QualType refTy, AlignmentSource source) |
mlir::Value | emitLoadOfScalar (LValue lvalue, SourceLocation loc) |
EmitLoadOfScalar - Load a scalar value from an address, taking care to appropriately convert from the memory representation to the LLVM value representation. | |
mlir::Value | emitLoadOfScalar (Address addr, bool isVolatile, QualType ty, SourceLocation loc, LValueBaseInfo baseInfo) |
LValue | emitLValue (const clang::Expr *e) |
Emit code to compute a designator that specifies the location of the expression. | |
LValue | emitLValueForBitField (LValue base, const FieldDecl *field) |
LValue | emitLValueForField (LValue base, const clang::FieldDecl *field) |
LValue | emitLValueForFieldInitialization (LValue base, const clang::FieldDecl *field, llvm::StringRef fieldName) |
Like emitLValueForField, excpet that if the Field is a reference, this will return the address of the reference and not the address of the value stored in the reference. | |
LValue | emitMaterializeTemporaryExpr (const MaterializeTemporaryExpr *e) |
LValue | emitMemberExpr (const MemberExpr *e) |
Address | emitPointerWithAlignment (const clang::Expr *expr, LValueBaseInfo *baseInfo=nullptr) |
Given an expression with a pointer type, emit the value and compute our best estimate of the alignment of the pointee. | |
RValue | emitReferenceBindingToExpr (const Expr *e) |
Emits a reference binding to the passed in expression. | |
mlir::LogicalResult | emitReturnStmt (const clang::ReturnStmt &s) |
RValue | emitRotate (const CallExpr *e, bool isRotateLeft) |
mlir::Value | emitScalarConstant (const ConstantEmission &constant, Expr *e) |
mlir::Value | emitScalarConversion (mlir::Value src, clang::QualType srcType, clang::QualType dstType, clang::SourceLocation loc) |
Emit a conversion from the specified type to the specified destination type, both of which are CIR scalar types. | |
void | emitScalarInit (const clang::Expr *init, mlir::Location loc, LValue lvalue, bool capturedByInit=false) |
void | emitStaticVarDecl (const VarDecl &d, cir::GlobalLinkageKind linkage) |
void | emitStoreOfComplex (mlir::Location loc, mlir::Value v, LValue dest, bool isInit) |
EmitStoreOfComplex - Store a complex number into the specified l-value. | |
void | emitStoreOfScalar (mlir::Value value, Address addr, bool isVolatile, clang::QualType ty, bool isInit=false, bool isNontemporal=false) |
void | emitStoreOfScalar (mlir::Value value, LValue lvalue, bool isInit) |
void | emitStoreThroughLValue (RValue src, LValue dst, bool isInit=false) |
Store the specified rvalue into the specified lvalue, where both are guaranteed to the have the same type, and that type is 'Ty'. | |
mlir::Value | emitStoreThroughBitfieldLValue (RValue src, LValue dstresult) |
LValue | emitStringLiteralLValue (const StringLiteral *e) |
mlir::LogicalResult | emitSwitchBody (const clang::Stmt *s) |
mlir::LogicalResult | emitSwitchCase (const clang::SwitchCase &s, bool buildingTopLevelCase) |
mlir::LogicalResult | emitSwitchStmt (const clang::SwitchStmt &s) |
mlir::Value | emitToMemory (mlir::Value value, clang::QualType ty) |
Given a value and its clang type, returns the value casted to its memory representation. | |
void | emitTrap (mlir::Location loc, bool createNewBlock) |
Emit a trap instruction, which is used to abort the program in an abnormal way, usually for debugging purposes. | |
LValue | emitUnaryOpLValue (const clang::UnaryOperator *e) |
mlir::Value | emitUnPromotedValue (mlir::Value result, QualType unPromotionType) |
void | emitUnreachable (clang::SourceLocation loc, bool createNewBlock) |
Emit a reached-unreachable diagnostic if loc is valid and runtime checking is enabled. | |
void | emitVarDecl (const clang::VarDecl &d) |
This method handles emission of any variable declaration inside a function, including static vars etc. | |
void | emitVariablyModifiedType (QualType ty) |
mlir::LogicalResult | emitWhileStmt (const clang::WhileStmt &s) |
void | emitNullabilityCheck (LValue lhs, mlir::Value rhs, clang::SourceLocation loc) |
Given an assignment *lhs = rhs , emit a test that checks if rhs is nonnull, if 1LHS is marked _Nonnull. | |
bool | isInConditionalBranch () const |
void | setBeforeOutermostConditional (mlir::Value value, Address addr) |
template<typename FuncTy > | |
ConditionalInfo | emitConditionalBlocks (const AbstractConditionalOperator *e, const FuncTy &branchGenFunc) |
mlir::Value | emitTernaryOnBoolExpr (const clang::Expr *cond, mlir::Location loc, const clang::Stmt *thenS, const clang::Stmt *elseS) |
Address | emitVAListRef (const Expr *e) |
Build a "reference" to a va_list; this is either the address or the value of the expression, depending on how va_list is defined. | |
void | emitVAStart (mlir::Value vaList, mlir::Value count) |
Emits the start of a CIR variable-argument operation (cir.va_start ) | |
void | emitVAEnd (mlir::Value vaList) |
Emits the end of a CIR variable-argument operation (cir.va_start ) | |
mlir::Value | emitVAArg (VAArgExpr *ve) |
Generate code to get an argument from the passed in pointer and update it accordingly. | |
cir::AllocaOp | createTempAlloca (mlir::Type ty, mlir::Location loc, const Twine &name="tmp", mlir::Value arraySize=nullptr, bool insertIntoFnEntryBlock=false) |
This creates an alloca and inserts it into the entry block if ArraySize is nullptr, otherwise inserts it at the current insertion point of the builder. | |
cir::AllocaOp | createTempAlloca (mlir::Type ty, mlir::Location loc, const Twine &name="tmp", mlir::OpBuilder::InsertPoint ip={}, mlir::Value arraySize=nullptr) |
This creates an alloca and inserts it into the provided insertion point. | |
Address | createTempAlloca (mlir::Type ty, CharUnits align, mlir::Location loc, const Twine &name="tmp", mlir::Value arraySize=nullptr, Address *alloca=nullptr, mlir::OpBuilder::InsertPoint ip={}) |
This creates a alloca and inserts it into the entry block. | |
Address | createTempAllocaWithoutCast (mlir::Type ty, CharUnits align, mlir::Location loc, const Twine &name="tmp", mlir::Value arraySize=nullptr, mlir::OpBuilder::InsertPoint ip={}) |
This creates a alloca and inserts it into the entry block of the current region. | |
Address | createMemTemp (QualType t, mlir::Location loc, const Twine &name="tmp", Address *alloca=nullptr, mlir::OpBuilder::InsertPoint ip={}) |
Create a temporary memory object of the given type, with appropriate alignmen and cast it to the default address space. | |
Address | createMemTemp (QualType t, CharUnits align, mlir::Location loc, const Twine &name="tmp", Address *alloca=nullptr, mlir::OpBuilder::InsertPoint ip={}) |
OpenACCDataOperandInfo | getOpenACCDataOperandInfo (const Expr *e) |
mlir::Value | emitOpenACCIntExpr (const Expr *intExpr) |
mlir::Value | createOpenACCConstantInt (mlir::Location loc, unsigned width, int64_t value) |
mlir::LogicalResult | emitOpenACCComputeConstruct (const OpenACCComputeConstruct &s) |
mlir::LogicalResult | emitOpenACCLoopConstruct (const OpenACCLoopConstruct &s) |
mlir::LogicalResult | emitOpenACCCombinedConstruct (const OpenACCCombinedConstruct &s) |
mlir::LogicalResult | emitOpenACCDataConstruct (const OpenACCDataConstruct &s) |
mlir::LogicalResult | emitOpenACCEnterDataConstruct (const OpenACCEnterDataConstruct &s) |
mlir::LogicalResult | emitOpenACCExitDataConstruct (const OpenACCExitDataConstruct &s) |
mlir::LogicalResult | emitOpenACCHostDataConstruct (const OpenACCHostDataConstruct &s) |
mlir::LogicalResult | emitOpenACCWaitConstruct (const OpenACCWaitConstruct &s) |
mlir::LogicalResult | emitOpenACCInitConstruct (const OpenACCInitConstruct &s) |
mlir::LogicalResult | emitOpenACCShutdownConstruct (const OpenACCShutdownConstruct &s) |
mlir::LogicalResult | emitOpenACCSetConstruct (const OpenACCSetConstruct &s) |
mlir::LogicalResult | emitOpenACCUpdateConstruct (const OpenACCUpdateConstruct &s) |
mlir::LogicalResult | emitOpenACCAtomicConstruct (const OpenACCAtomicConstruct &s) |
mlir::LogicalResult | emitOpenACCCacheConstruct (const OpenACCCacheConstruct &s) |
void | emitOpenACCDeclare (const OpenACCDeclareDecl &d) |
void | emitOpenACCRoutine (const OpenACCRoutineDecl &d) |
AggValueSlot | createAggTemp (QualType ty, mlir::Location loc, const Twine &name="tmp", Address *alloca=nullptr) |
Create a temporary memory object for the given aggregate type. | |
template<typename T > | |
mlir::LogicalResult | emitCaseDefaultCascade (const T *stmt, mlir::Type condType, mlir::ArrayAttr value, CaseOpKind kind, bool buildingTopLevelCase) |
![]() | |
CIRGenTypeCache () | |
clang::CharUnits | getSizeAlign () const |
clang::CharUnits | getPointerAlign () const |
Static Public Member Functions | |
static cir::TypeEvaluationKind | getEvaluationKind (clang::QualType type) |
Return the cir::TypeEvaluationKind of QualType type . | |
static bool | hasScalarEvaluationKind (clang::QualType type) |
static bool | hasAggregateEvaluationKind (clang::QualType type) |
static bool | isConstructorDelegationValid (const clang::CXXConstructorDecl *ctor) |
Checks whether the given constructor is a valid subject for the complete-to-base constructor delegation optimization, i.e. | |
Public Attributes | |
CIRGenModule & | cgm |
clang::GlobalDecl | curGD |
The GlobalDecl for the current function being compiled or the global variable currently being initialized. | |
std::optional< mlir::Value > | fnRetAlloca |
The compiler-generated variable that holds the return value. | |
EHScopeStack | ehStack |
Tracks function scope overall cleanup handling. | |
ImplicitParamDecl * | cxxabiThisDecl = nullptr |
CXXThisDecl - When generating code for a C++ member function, this will hold the implicit 'this' declaration. | |
mlir::Value | cxxabiThisValue = nullptr |
mlir::Value | cxxThisValue = nullptr |
clang::CharUnits | cxxThisAlignment |
Address | cxxDefaultInitExprThis = Address::invalid() |
The value of 'this' to sue when evaluating CXXDefaultInitExprs within this expression. | |
const clang::Decl * | curFuncDecl = nullptr |
cir::FuncOp | curFn |
The function for which code is currently being generated. | |
DeclMapTy | localDeclMap |
This keeps track of the CIR allocas or globals for local C declarations. | |
llvm::SmallVector< mlir::Type, 2 > | condTypeStack |
The type of the condition for the emitting switch statement. | |
clang::SanitizerSet | sanOpts |
Sanitizers enabled for this function. | |
SymTableTy | symbolTable |
bool | sawAsmBlock = false |
Whether or not a Microsoft-style asm block has been processed within this fuction. | |
llvm::DenseMap< const OpaqueValueExpr *, LValue > | opaqueLValues |
Keeps track of the current set of opaque value expressions. | |
llvm::DenseMap< const OpaqueValueExpr *, RValue > | opaqueRValues |
std::optional< mlir::Location > | currSrcLoc |
Use to track source locations across nested visitor traversals. | |
unsigned | counterRefTmp = 0 |
Hold counters for incrementally naming temporaries. | |
unsigned | counterAggTmp = 0 |
EHScopeStack::stable_iterator | prologueCleanupDepth |
The cleanup depth enclosing all the cleanups associated with the parameters. | |
EHScopeStack::stable_iterator | currentCleanupStackDepth = ehStack.stable_end() |
LexicalScope * | curLexScope = nullptr |
ConditionalEvaluation * | outermostConditional = nullptr |
![]() | |
cir::VoidType | VoidTy |
cir::IntType | SInt8Ty |
cir::IntType | SInt16Ty |
cir::IntType | SInt32Ty |
cir::IntType | SInt64Ty |
cir::IntType | SInt128Ty |
cir::IntType | UInt8Ty |
cir::IntType | UInt16Ty |
cir::IntType | UInt32Ty |
cir::IntType | UInt64Ty |
cir::IntType | UInt128Ty |
cir::FP16Type | FP16Ty |
cir::BF16Type | BFloat16Ty |
cir::SingleType | FloatTy |
cir::DoubleType | DoubleTy |
cir::FP80Type | FP80Ty |
cir::FP128Type | FP128Ty |
union { | |
mlir::Type UIntPtrTy | |
mlir::Type SizeTy | |
}; | |
intptr_t, size_t, and ptrdiff_t, which we assume are the same size. | |
mlir::Type | PtrDiffTy |
cir::PointerType | VoidPtrTy |
void* in address space 0 | |
cir::PointerType | UInt8PtrTy |
union { | |
unsigned char PointerAlignInBytes | |
unsigned char PointerSizeInBytes | |
}; | |
The size and alignment of a pointer into the generic address space. | |
unsigned char | SizeAlignInBytes |
The alignment of size_t. | |
Static Public Attributes | |
static Destroyer | destroyCXXObject |
Friends | |
class | ::ScalarExprEmitter |
Definition at line 48 of file CIRGenFunction.h.
using clang::CIRGen::CIRGenFunction::DeclMapTy = llvm::DenseMap<const clang::Decl *, Address> |
Definition at line 87 of file CIRGenFunction.h.
typedef void clang::CIRGen::CIRGenFunction::Destroyer(CIRGenFunction &cgf, Address addr, QualType ty) |
Definition at line 918 of file CIRGenFunction.h.
using clang::CIRGen::CIRGenFunction::SymTableScopeTy = llvm::ScopedHashTableScope<const clang::Decl *, mlir::Value> |
Definition at line 337 of file CIRGenFunction.h.
using clang::CIRGen::CIRGenFunction::SymTableTy = llvm::ScopedHashTable<const clang::Decl *, mlir::Value> |
The symbol table maps a variable name to a value in the current scope.
Entering a function creates a new scope, and the function arguments are added to the mapping. When the processing of a function is terminated, the scope is destroyed and the mappings created in this scope are dropped.
Definition at line 112 of file CIRGenFunction.h.
using clang::CIRGen::CIRGenFunction::VisitedVirtualBasesSetTy = llvm::SmallPtrSet<const clang::CXXRecordDecl *, 4> |
Definition at line 577 of file CIRGenFunction.h.
Definition at line 580 of file CIRGenFunction.h.
clang::CIRGen::CIRGenFunction::CIRGenFunction | ( | CIRGenModule & | cgm, |
CIRGenBuilderTy & | builder, | ||
bool | suppressNewContext = false |
||
) |
Definition at line 27 of file CIRGenFunction.cpp.
References ehStack, and clang::CIRGen::EHScopeStack::setCGF().
clang::CIRGen::CIRGenFunction::~CIRGenFunction | ( | ) |
Definition at line 33 of file CIRGenFunction.cpp.
cir::GlobalOp CIRGenFunction::addInitializerToStaticVarDecl | ( | const VarDecl & | d, |
cir::GlobalOp | gv, | ||
cir::GetGlobalOp | gvAddr | ||
) |
Add the initializer for 'd' to the global variable that has already been created for it.
If the initializer has a different type than gv does, this may free gv and return a different one. Otherwise it just returns gv.
Definition at line 358 of file CIRGenDecl.cpp.
References cir::MissingFeatures::addressSpace(), cgm, cir::MissingFeatures::dataLayoutTypeAllocSize(), clang::QualType::DK_cxx_destructor, clang::CIRGen::CIRGenModule::errorNYI(), clang::CIRGen::ConstantEmitter::finalize(), getContext(), cir::CIRBaseBuilderTy::getPointerTo(), clang::VarDecl::getSourceRange(), clang::VarDecl::needsDestruction(), cir::MissingFeatures::opGlobalConstant(), and clang::CIRGen::ConstantEmitter::tryEmitForInitializer().
Referenced by emitStaticVarDecl().
clang::QualType clang::CIRGen::CIRGenFunction::buildFunctionArgList | ( | clang::GlobalDecl | gd, |
FunctionArgList & | args | ||
) |
Definition at line 728 of file CIRGenFunction.cpp.
References clang::CIRGen::CIRGenCXXABI::buildThisParam(), cgm, cir::MissingFeatures::cxxabiStructorImplicitParam(), clang::CIRGen::CIRGenModule::errorNYI(), clang::CIRGen::CIRGenModule::getCXXABI(), clang::GlobalDecl::getDecl(), clang::CIRGen::CIRGenCXXABI::hasMostDerivedReturn(), and clang::CIRGen::CIRGenCXXABI::hasThisReturn().
Referenced by generateCode().
bool clang::CIRGen::CIRGenFunction::constantFoldsToBool | ( | const clang::Expr * | cond, |
bool & | resultBool, | ||
bool | allowLabels = false |
||
) |
If the specified expression does not fold to a constant, or if it does but contains a label, return false.
If it constant folds return true and set the boolean result in Result.
Definition at line 176 of file CIRGenFunction.cpp.
References constantFoldsToSimpleInteger().
Referenced by emitIfStmt().
bool clang::CIRGen::CIRGenFunction::constantFoldsToSimpleInteger | ( | const clang::Expr * | cond, |
llvm::APSInt & | resultInt, | ||
bool | allowLabels = false |
||
) |
If the specified expression does not fold to a constant, or if it does fold but contains a label, return false.
If it constant folds, return true and set the folded value.
Definition at line 189 of file CIRGenFunction.cpp.
References containsLabel(), clang::Expr::EvaluateAsInt(), getContext(), clang::APValue::getInt(), and clang::Expr::EvalResult::Val.
Referenced by constantFoldsToBool().
bool clang::CIRGen::CIRGenFunction::containsLabel | ( | const clang::Stmt * | s, |
bool | ignoreCaseStmts = false |
||
) |
Return true if the statement contains a label in it.
If this statement is not executed normally, it not containing a label means that we can just remove the code.
Definition at line 141 of file CIRGenFunction.cpp.
References s.
Referenced by constantFoldsToSimpleInteger().
RValue CIRGenFunction::convertTempToRValue | ( | Address | addr, |
clang::QualType | type, | ||
clang::SourceLocation | loc | ||
) |
Given the address of a temporary variable, produce an r-value of its type.
Definition at line 1772 of file CIRGenExpr.cpp.
References cgm, clang::CIRGen::Decl, emitLoadOfScalar(), clang::CIRGen::CIRGenModule::errorNYI(), clang::CIRGen::RValue::get(), getEvaluationKind(), makeAddrLValue(), cir::TEK_Aggregate, cir::TEK_Complex, cir::TEK_Scalar, and clang::ast_matchers::type.
Referenced by emitAtomicExpr(), and emitDelegateCallArg().
mlir::Type clang::CIRGen::CIRGenFunction::convertType | ( | clang::QualType | t | ) |
Definition at line 99 of file CIRGenFunction.cpp.
References cgm, clang::CIRGen::CIRGenTypes::convertType(), and clang::CIRGen::CIRGenModule::getTypes().
Referenced by convertType(), createDummyValue(), emitAddrOfFieldStorage(), emitArrayToPointerDecay(), emitBuiltinBitOp(), emitBuiltinExpr(), emitCall(), emitComplexToScalarConversion(), emitFunctionDeclLValue(), emitLoadOfBitfieldLValue(), emitNullInitialization(), emitPromotedValue(), emitUnPromotedValue(), emitVAArg(), getAddressOfBaseClass(), getAddressOfDirectBaseInCompleteClass(), initializeVTablePointer(), and startFunction().
|
inline |
Definition at line 122 of file CIRGenFunction.h.
References convertType(), and getContext().
mlir::Type clang::CIRGen::CIRGenFunction::convertTypeForMem | ( | QualType | t | ) |
Definition at line 95 of file CIRGenFunction.cpp.
References cgm, clang::CIRGen::CIRGenTypes::convertTypeForMem(), and clang::CIRGen::CIRGenModule::getTypes().
Referenced by createMemTemp(), emitArrayDestroy(), emitArraySubscriptPtr(), emitArrayToPointerDecay(), emitAtomicExpr(), emitAutoVarAlloca(), emitCastLValue(), emitCXXNewExpr(), emitGlobalVarDeclLValue(), emitLoadOfReference(), emitLValueForFieldInitialization(), emitPointerWithAlignment(), emitStaticVarDecl(), emitStoreThroughBitfieldLValue(), makeNaturalAddressForPointer(), and makeNaturalAlignAddrLValue().
|
inline |
Create a temporary memory object for the given aggregate type.
Definition at line 1666 of file CIRGenFunction.h.
References cir::MissingFeatures::aggValueSlot(), createMemTemp(), clang::CIRGen::AggValueSlot::DoesNotOverlap, clang::CIRGen::AggValueSlot::forAddr(), clang::QualType::getQualifiers(), clang::CIRGen::AggValueSlot::IsNotAliased, and clang::CIRGen::AggValueSlot::IsNotDestructed.
Referenced by emitAnyExpr(), and emitAnyExprToTemp().
mlir::Value CIRGenFunction::createDummyValue | ( | mlir::Location | loc, |
clang::QualType | qt | ||
) |
Definition at line 2069 of file CIRGenExpr.cpp.
References convertType(), cir::CIRBaseBuilderTy::createDummyValue(), getContext(), and clang::ASTContext::getTypeAlignInChars().
Referenced by emitOpOnBoolExpr(), and evaluateExprAsBool().
Address CIRGenFunction::createMemTemp | ( | QualType | t, |
CharUnits | align, | ||
mlir::Location | loc, | ||
const Twine & | name = "tmp" , |
||
Address * | alloca = nullptr , |
||
mlir::OpBuilder::InsertPoint | ip = {} |
||
) |
Definition at line 2088 of file CIRGenExpr.cpp.
References cgm, convertTypeForMem(), createTempAlloca(), clang::CIRGen::CIRGenModule::errorNYI(), clang::Type::isConstantMatrixType(), and cir::MissingFeatures::matrixType().
Address CIRGenFunction::createMemTemp | ( | QualType | t, |
mlir::Location | loc, | ||
const Twine & | name = "tmp" , |
||
Address * | alloca = nullptr , |
||
mlir::OpBuilder::InsertPoint | ip = {} |
||
) |
Create a temporary memory object of the given type, with appropriate alignmen and cast it to the default address space.
Returns the original alloca instruction by Alloca
if it is not nullptr.
Definition at line 2080 of file CIRGenExpr.cpp.
References createMemTemp(), and getContext().
Referenced by createAggTemp(), createMemTemp(), createReferenceTemporary(), emitAggExprToLValue(), emitCall(), emitCompoundLiteralLValue(), and emitValToTemp().
mlir::Value CIRGenFunction::createOpenACCConstantInt | ( | mlir::Location | loc, |
unsigned | width, | ||
int64_t | value | ||
) |
Definition at line 56 of file CIRGenOpenACC.cpp.
References getMLIRContext().
Referenced by getOpenACCDataOperandInfo().
Address CIRGenFunction::createTempAlloca | ( | mlir::Type | ty, |
CharUnits | align, | ||
mlir::Location | loc, | ||
const Twine & | name = "tmp" , |
||
mlir::Value | arraySize = nullptr , |
||
Address * | allocaAddr = nullptr , |
||
mlir::OpBuilder::InsertPoint | ip = {} |
||
) |
This creates a alloca and inserts it into the entry block.
The alloca is casted to default address space if necessary.
Definition at line 2115 of file CIRGenExpr.cpp.
References cir::MissingFeatures::addressSpace(), createTempAllocaWithoutCast(), and clang::CIRGen::Address::getPointer().
cir::AllocaOp CIRGenFunction::createTempAlloca | ( | mlir::Type | ty, |
mlir::Location | loc, | ||
const Twine & | name = "tmp" , |
||
mlir::OpBuilder::InsertPoint | ip = {} , |
||
mlir::Value | arraySize = nullptr |
||
) |
This creates an alloca and inserts it into the provided insertion point.
Definition at line 2147 of file CIRGenExpr.cpp.
References emitAlloca().
cir::AllocaOp CIRGenFunction::createTempAlloca | ( | mlir::Type | ty, |
mlir::Location | loc, | ||
const Twine & | name = "tmp" , |
||
mlir::Value | arraySize = nullptr , |
||
bool | insertIntoFnEntryBlock = false |
||
) |
This creates an alloca and inserts it into the entry block if ArraySize
is nullptr, otherwise inserts it at the current insertion point of the builder.
Definition at line 2136 of file CIRGenExpr.cpp.
References emitAlloca().
Referenced by createMemTemp(), createTempAllocaWithoutCast(), and emitAutoVarAlloca().
Address CIRGenFunction::createTempAllocaWithoutCast | ( | mlir::Type | ty, |
CharUnits | align, | ||
mlir::Location | loc, | ||
const Twine & | name = "tmp" , |
||
mlir::Value | arraySize = nullptr , |
||
mlir::OpBuilder::InsertPoint | ip = {} |
||
) |
This creates a alloca and inserts it into the entry block of the current region.
Definition at line 2103 of file CIRGenExpr.cpp.
References cgm, createTempAlloca(), and clang::CIRGen::CIRGenModule::getSize().
Referenced by createTempAlloca().
Address CIRGenFunction::emitAddrOfFieldStorage | ( | Address | base, |
const FieldDecl * | field, | ||
llvm::StringRef | fieldName, | ||
unsigned | fieldIndex | ||
) |
Get the address of a zero-sized field within a record.
The resulting address doesn't necessarily have the right type.
Definition at line 35 of file CIRGenExpr.cpp.
References clang::CharUnits::alignmentAtOffset(), cgm, convertType(), cir::CIRBaseBuilderTy::createGetMember(), clang::CIRGen::CIRGenModule::errorNYI(), clang::CharUnits::fromQuantity(), clang::CIRGen::Address::getAlignment(), clang::CIRGen::CIRGenRecordLayout::getCIRFieldNo(), clang::CIRGen::CIRGenTypes::getCIRGenRecordLayout(), clang::CIRGen::CIRGenRecordLayout::getCIRType(), getContext(), clang::CIRGen::CIRGenModule::getDataLayout(), getLoc(), clang::Decl::getLocation(), clang::FieldDecl::getParent(), clang::CIRGen::Address::getPointer(), clang::FieldDecl::getSourceRange(), clang::ValueDecl::getType(), clang::CIRGen::CIRGenModule::getTypes(), clang::CIRGen::Address::invalid(), clang::FieldDecl::isZeroSize(), and cir::CIRDataLayout::layout.
Referenced by emitLValueForField(), and emitLValueForFieldInitialization().
void CIRGenFunction::emitAggExpr | ( | const clang::Expr * | e, |
AggValueSlot | slot | ||
) |
Definition at line 711 of file CIRGenExprAggregate.cpp.
Referenced by emitAggExprToLValue(), emitAnyExpr(), emitAnyExprToMem(), emitBaseInitializer(), emitDelegatingCXXConstructorCall(), emitExprAsInit(), emitStmtWithResult(), and storeAnyExprIntoOneUnit().
Definition at line 715 of file CIRGenExprAggregate.cpp.
References createMemTemp(), clang::CIRGen::AggValueSlot::DoesNotOverlap, emitAggExpr(), clang::CIRGen::AggValueSlot::forLValue(), getLoc(), clang::Stmt::getSourceRange(), clang::Expr::getType(), hasAggregateEvaluationKind(), clang::CIRGen::AggValueSlot::IsNotAliased, clang::CIRGen::AggValueSlot::IsNotDestructed, and makeAddrLValue().
void CIRGenFunction::emitAggregateStore | ( | mlir::Value | value, |
Address | dest | ||
) |
Definition at line 83 of file CIRGenCall.cpp.
References clang::CIRGen::CIRGenBuilderTy::createStore(), and currSrcLoc.
Referenced by emitCall().
mlir::Value clang::CIRGen::CIRGenFunction::emitAlignmentAssumption | ( | mlir::Value | ptrValue, |
const Expr * | expr, | ||
SourceLocation | assumptionLoc, | ||
int64_t | alignment, | ||
mlir::Value | offsetValue = nullptr |
||
) |
Definition at line 938 of file CIRGenFunction.cpp.
References emitAlignmentAssumption(), and clang::ast_matchers::expr.
mlir::Value clang::CIRGen::CIRGenFunction::emitAlignmentAssumption | ( | mlir::Value | ptrValue, |
QualType | ty, | ||
SourceLocation | loc, | ||
SourceLocation | assumptionLoc, | ||
int64_t | alignment, | ||
mlir::Value | offsetValue = nullptr |
||
) |
Definition at line 930 of file CIRGenFunction.cpp.
References getLoc(), and cir::MissingFeatures::sanitizers().
Referenced by emitAlignmentAssumption(), and emitBuiltinExpr().
mlir::Value clang::CIRGen::CIRGenFunction::emitAlloca | ( | llvm::StringRef | name, |
mlir::Type | ty, | ||
mlir::Location | loc, | ||
clang::CharUnits | alignment, | ||
bool | insertIntoFnEntryBlock, | ||
mlir::Value | arraySize = nullptr |
||
) |
Referenced by createTempAlloca(), and startFunction().
mlir::Value clang::CIRGen::CIRGenFunction::emitAlloca | ( | llvm::StringRef | name, |
mlir::Type | ty, | ||
mlir::Location | loc, | ||
clang::CharUnits | alignment, | ||
mlir::OpBuilder::InsertPoint | ip, | ||
mlir::Value | arraySize = nullptr |
||
) |
RValue CIRGenFunction::emitAnyExpr | ( | const clang::Expr * | e, |
AggValueSlot | aggSlot = AggValueSlot::ignored() |
||
) |
Emit code to compute the specified expression which can have any type.
The result is returned as an RValue struct. If this is an aggregate expression, the aggloc/agglocvolatile arguments indicate where the result should be returned.
The result is returned as an RValue struct.
Definition at line 1481 of file CIRGenExpr.cpp.
References clang::CIRGen::AggValueSlot::asRValue(), createAggTemp(), emitAggExpr(), emitComplexExpr(), emitScalarExpr(), clang::CIRGen::RValue::get(), clang::CIRGen::RValue::getComplex(), getCounterAggTmpAsString(), getEvaluationKind(), getLoc(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::CIRGen::AggValueSlot::isIgnored(), cir::TEK_Aggregate, cir::TEK_Complex, and cir::TEK_Scalar.
Referenced by clang::CIRGen::CIRGenFunction::OpaqueValueMappingData::bind(), emitAnyExprToTemp(), emitBinaryOperatorLValue(), emitIgnoredExpr(), and emitReturnStmt().
void CIRGenFunction::emitAnyExprToMem | ( | const Expr * | e, |
Address | location, | ||
Qualifiers | quals, | ||
bool | isInitializer | ||
) |
Emits the code necessary to evaluate an arbitrary expression into the given memory location.
Evaluate an expression into a given memory location.
Definition at line 1204 of file CIRGenExpr.cpp.
References emitAggExpr(), emitComplexExprIntoLValue(), emitScalarExpr(), emitStoreThroughLValue(), clang::CIRGen::AggValueSlot::forAddr(), clang::CIRGen::RValue::get(), getEvaluationKind(), clang::Expr::getType(), makeAddrLValue(), clang::CIRGen::AggValueSlot::MayOverlap, cir::TEK_Aggregate, cir::TEK_Complex, and cir::TEK_Scalar.
Referenced by emitCompoundLiteralLValue(), emitMaterializeTemporaryExpr(), emitStmtWithResult(), and emitValToTemp().
RValue CIRGenFunction::emitAnyExprToTemp | ( | const clang::Expr * | e | ) |
Similarly to emitAnyExpr(), however, the result will always be accessible even if no aggregate location is provided.
Similar to emitAnyExpr(), however, the result will always be accessible even if no aggregate location is provided.
Definition at line 721 of file CIRGenCall.cpp.
References createAggTemp(), emitAnyExpr(), getCounterAggTmpAsString(), getLoc(), clang::Stmt::getSourceRange(), clang::Expr::getType(), hasAggregateEvaluationKind(), and clang::CIRGen::AggValueSlot::ignored().
Referenced by emitCallArg().
void CIRGenFunction::emitArrayDestroy | ( | mlir::Value | begin, |
mlir::Value | end, | ||
QualType | elementType, | ||
CharUnits | elementAlign, | ||
Destroyer * | destroyer | ||
) |
Destroys all the elements of the given array, beginning from last to first.
The array cannot be zero-length.
begin | - a type* denoting the first element of the array |
end | - a type* denoting one past the end of the array |
elementType | - the element type of the array |
destroyer | - the function to call to destroy elements |
Definition at line 695 of file CIRGenDecl.cpp.
References b, convertTypeForMem(), currSrcLoc, cir::MissingFeatures::dtorCleanups(), cir::CIRBaseBuilderTy::getPointerTo(), and clang::Type::isArrayType().
Referenced by emitDestroy().
mlir::Value clang::CIRGen::CIRGenFunction::emitArrayLength | ( | const clang::ArrayType * | arrayType, |
QualType & | baseType, | ||
Address & | addr | ||
) |
Computes the length of an array in elements, as well as the base element type and a properly-typed first element pointer.
Definition at line 889 of file CIRGenFunction.cpp.
References clang::ast_matchers::arrayType, cgm, currSrcLoc, clang::CIRGen::CIRGenModule::errorNYI(), clang::ASTContext::getAsArrayType(), getContext(), clang::CIRGen::Address::getElementType(), clang::CIRGen::CIRGenTypeCache::SizeTy, and cir::MissingFeatures::vlas().
Referenced by emitCXXAggrConstructorCall(), and emitDestroy().
LValue CIRGenFunction::emitArraySubscriptExpr | ( | const clang::ArraySubscriptExpr * | e | ) |
Definition at line 906 of file CIRGenExpr.cpp.
References cgm, emitArraySubscriptExpr(), emitArraySubscriptPtr(), emitLValue(), emitPointerWithAlignment(), emitScalarExpr(), clang::CIRGen::CIRGenModule::errorNYI(), clang::CIRGen::LValue::getAddress(), clang::Type::getAs(), clang::ArraySubscriptExpr::getBase(), clang::CIRGen::LValue::getBaseInfo(), clang::ArraySubscriptExpr::getBeginLoc(), getContext(), clang::ArraySubscriptExpr::getEndLoc(), clang::ArraySubscriptExpr::getExprLoc(), clang::ArraySubscriptExpr::getIdx(), getLangOpts(), clang::ArraySubscriptExpr::getLHS(), clang::CIRGen::CIRGenModule::getLoc(), clang::ArraySubscriptExpr::getRHS(), getSimpleArrayDecayOperand(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::CIRGen::Address::invalid(), clang::Type::isPointerType(), clang::Type::isVectorType(), clang::CIRGen::LValue::makeAddr(), clang::CIRGen::LValue::makeVectorElt(), clang::LangOptionsBase::NonGC, and clang::ObjC.
Referenced by emitArraySubscriptExpr(), and emitLValue().
Address CIRGenFunction::emitArrayToPointerDecay | ( | const Expr * | e, |
LValueBaseInfo * | baseInfo = nullptr |
||
) |
Definition at line 1733 of file CIRGenExpr.cpp.
References clang::Type::castAsArrayTypeUnsafe(), cgm, convertType(), convertTypeForMem(), emitLValue(), clang::CIRGen::LValue::getAddress(), clang::CIRGen::Address::getAlignment(), clang::ArrayType::getElementType(), clang::CIRGen::CIRGenModule::getLoc(), clang::CIRGen::Address::getPointer(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Type::isArrayType(), clang::Type::isVariableArrayType(), clang::CIRGen::CIRGenBuilderTy::maybeBuildArrayDecay(), and cir::MissingFeatures::opTBAA().
Referenced by emitPointerWithAlignment().
mlir::LogicalResult CIRGenFunction::emitAsmStmt | ( | const clang::AsmStmt & | s | ) |
Definition at line 86 of file CIRGenAsm.cpp.
References cir::MissingFeatures::asmGoto(), cir::MissingFeatures::asmInputOperands(), cir::MissingFeatures::asmMemoryEffects(), cir::MissingFeatures::asmOutputOperands(), cir::MissingFeatures::asmUnwindClobber(), cgm, collectClobbers(), clang::CIRGen::CIRGenModule::errorNYI(), getContext(), getLoc(), inferFlavor(), and s.
Referenced by emitStmt().
RValue CIRGenFunction::emitAtomicExpr | ( | AtomicExpr * | e | ) |
Definition at line 418 of file CIRGenAtomic.cpp.
References cir::MissingFeatures::atomicExpr(), cir::MissingFeatures::atomicUseLibCall(), cgm, convertTempToRValue(), convertTypeForMem(), emitAtomicInit(), emitAtomicOp(), emitPointerWithAlignment(), emitScalarExpr(), emitValToTemp(), clang::CIRGen::CIRGenModule::errorNYI(), clang::Expr::EvaluateAsInt(), clang::CIRGen::RValue::get(), clang::Type::getAs(), getContext(), clang::Expr::getExprLoc(), clang::APValue::getInt(), getLoc(), clang::AtomicExpr::getOp(), clang::AtomicExpr::getOrder(), clang::Type::getPointeeType(), clang::AtomicExpr::getPtr(), clang::CharUnits::getQuantity(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::ASTContext::getTypeInfoInChars(), clang::QualType::getUnqualifiedType(), clang::AtomicExpr::getVal1(), clang::CIRGen::Address::invalid(), isMemOrderValid(), clang::CIRGen::Address::isValid(), clang::Type::isVoidType(), makeAddrLValue(), cir::MissingFeatures::openCL(), clang::Expr::EvalResult::Val, clang::TypeInfoChars::Width, and clang::CIRGen::Address::withElementType().
Definition at line 549 of file CIRGenAtomic.cpp.
References cgm, emitScalarExpr(), clang::CIRGen::CIRGenModule::errorNYI(), clang::CIRGen::RValue::get(), getLoc(), clang::Stmt::getSourceRange(), cir::TEK_Aggregate, cir::TEK_Complex, and cir::TEK_Scalar.
Referenced by emitAtomicExpr().
CIRGenFunction::AutoVarEmission CIRGenFunction::emitAutoVarAlloca | ( | const clang::VarDecl & | d, |
mlir::OpBuilder::InsertPoint | ip = {} |
||
) |
Definition at line 27 of file CIRGenDecl.cpp.
References clang::CIRGen::CIRGenFunction::AutoVarEmission::Addr, cgm, convertTypeForMem(), createTempAlloca(), clang::Default, clang::CIRGen::CIRGenModule::errorNYI(), clang::QualType::getAddressSpace(), getContext(), clang::ASTContext::getDeclAlign(), getLoc(), clang::NamedDecl::getName(), clang::CIRGen::Address::getPointer(), clang::VarDecl::getSourceRange(), clang::ValueDecl::getType(), clang::CIRGen::Address::invalid(), clang::Type::isConstantSizeType(), clang::VarDecl::isEscapingByref(), clang::CIRGen::CIRGenFunction::AutoVarEmission::IsEscapingByRef, clang::Type::isVariablyModifiedType(), and setAddrOfLocalVar().
Referenced by emitAutoVarDecl().
void CIRGenFunction::emitAutoVarCleanups | ( | const AutoVarEmission & | emission | ) |
Definition at line 187 of file CIRGenDecl.cpp.
References cgm, emitAutoVarTypeCleanup(), clang::CIRGen::CIRGenModule::errorNYI(), getContext(), clang::VarDecl::getSourceRange(), clang::Decl::hasAttr(), clang::VarDecl::needsDestruction(), cir::MissingFeatures::opAllocaPreciseLifetime(), and clang::CIRGen::CIRGenFunction::AutoVarEmission::Variable.
Referenced by emitAutoVarDecl().
void CIRGenFunction::emitAutoVarDecl | ( | const clang::VarDecl & | d | ) |
Emit code and set up symbol table for a variable declaration with auto, register, or no storage class specifier.
These turn into simple stack objects, globals depending on target.
Definition at line 205 of file CIRGenDecl.cpp.
References emitAutoVarAlloca(), emitAutoVarCleanups(), and emitAutoVarInit().
Referenced by emitVarDecl().
void CIRGenFunction::emitAutoVarInit | ( | const AutoVarEmission & | emission | ) |
Emit the initializer for an allocated variable.
If this call is not associated with the call to emitAutoVarAlloca (as the address of the emission is not directly an alloca), the allocatedSeparately parameter can be used to suppress the assertions. However, this should only be used in extreme cases, as it doesn't properly reflect the language/AST.
Definition at line 79 of file CIRGenDecl.cpp.
References clang::CIRGen::CIRGenFunction::AutoVarEmission::Addr, cgm, clang::CIRGen::Decl, emitExprAsInit(), emitStoreThroughLValue(), clang::CIRGen::CIRGenModule::errorNYI(), clang::CIRGen::RValue::get(), clang::CIRGen::LValue::getAddress(), clang::Decl::getAttr(), cir::CIRBaseBuilderTy::getConstant(), getContext(), clang::VarDecl::getInit(), clang::ASTContext::getLangOpts(), getLoc(), getMLIRContext(), clang::CIRGen::Address::getPointer(), clang::Stmt::getSourceRange(), clang::VarDecl::getSourceRange(), clang::ValueDecl::getType(), clang::CIRGen::CIRGenFunction::AutoVarEmission::IsConstantAggregate, clang::VarDecl::isConstexpr(), isTrivialInitializer(), makeAddrLValue(), clang::VarDecl::mightBeUsableInConstantExpressions(), cir::MissingFeatures::opAllocaCaptureByInit(), clang::QualType::PDIK_Struct, clang::CIRGen::ConstantEmitter::tryEmitAbstractForInitializer(), clang::ast_matchers::type, clang::LangOptionsBase::Uninitialized, clang::CIRGen::CIRGenFunction::AutoVarEmission::Variable, clang::CIRGen::CIRGenFunction::AutoVarEmission::wasEmittedAsGlobal(), and clang::CIRGen::CIRGenFunction::AutoVarEmission::wasEmittedAsOffloadClause().
Referenced by emitAutoVarDecl().
void CIRGenFunction::emitAutoVarTypeCleanup | ( | const AutoVarEmission & | emission, |
clang::QualType::DestructionKind | dtorKind | ||
) |
Enter a destroy cleanup for the given local variable.
Definition at line 776 of file CIRGenDecl.cpp.
References cgm, clang::QualType::DK_cxx_destructor, clang::QualType::DK_none, clang::QualType::DK_nontrivial_c_struct, clang::QualType::DK_objc_strong_lifetime, clang::QualType::DK_objc_weak_lifetime, cir::MissingFeatures::ehCleanupFlags(), ehStack, clang::CIRGen::CIRGenModule::errorNYI(), getDestroyer(), clang::CIRGen::CIRGenFunction::AutoVarEmission::getObjectAddress(), clang::CIRGen::NormalAndEHCleanup, clang::CIRGen::CIRGenFunction::AutoVarEmission::NRVOFlag, clang::ast_matchers::type, and clang::CIRGen::CIRGenFunction::AutoVarEmission::Variable.
Referenced by emitAutoVarCleanups().
void CIRGenFunction::emitBaseInitializer | ( | mlir::Location | loc, |
const CXXRecordDecl * | classDecl, | ||
CXXCtorInitializer * | baseInit | ||
) |
Definition at line 178 of file CIRGenClass.cpp.
References cir::MissingFeatures::aggValueSlotGC(), baseInitializerUsesThis(), clang::Type::castAsCXXRecordDecl(), curFuncDecl, emitAggExpr(), clang::CIRGen::AggValueSlot::forAddr(), getAddressOfDirectBaseInCompleteClass(), clang::CXXCtorInitializer::getBaseClass(), getContext(), clang::CXXCtorInitializer::getInit(), getOverlapForBaseInit(), initializeVTablePointers(), clang::CXXCtorInitializer::isBaseInitializer(), clang::CXXCtorInitializer::isBaseVirtual(), clang::CIRGen::AggValueSlot::IsDestructed, clang::CIRGen::AggValueSlot::IsNotAliased, loadCXXThisAddress(), and cir::MissingFeatures::requiresCleanups().
Referenced by emitCtorPrologue().
LValue CIRGenFunction::emitBinaryOperatorLValue | ( | const BinaryOperator * | e | ) |
Definition at line 1425 of file CIRGenExpr.cpp.
References cgm, emitAnyExpr(), emitComplexAssignmentLValue(), emitIgnoredExpr(), emitLValue(), emitStoreThroughBitfieldLValue(), emitStoreThroughLValue(), clang::CIRGen::CIRGenModule::errorNYI(), getEvaluationKind(), getLangOpts(), clang::BinaryOperator::getLHS(), getLoc(), clang::QualType::getObjCLifetime(), clang::BinaryOperator::getOpcode(), clang::BinaryOperator::getRHS(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::CIRGen::LValue::isBitField(), cir::MissingFeatures::objCLifetime(), clang::Qualifiers::OCL_None, cir::TEK_Aggregate, cir::TEK_Complex, and cir::TEK_Scalar.
Referenced by emitLValue().
mlir::LogicalResult CIRGenFunction::emitBreakStmt | ( | const clang::BreakStmt & | s | ) |
Definition at line 545 of file CIRGenStmt.cpp.
References cir::CIRBaseBuilderTy::createBreak(), getLoc(), and s.
Referenced by emitSimpleStmt().
RValue CIRGenFunction::emitBuiltinExpr | ( | const clang::GlobalDecl & | gd, |
unsigned | builtinID, | ||
const clang::CallExpr * | e, | ||
ReturnValueSlot | returnValue | ||
) |
Definition at line 88 of file CIRGenBuiltin.cpp.
References cir::MissingFeatures::builtinCall(), cir::MissingFeatures::builtinCallF128(), cir::MissingFeatures::builtinCallMathErrno(), cir::MissingFeatures::builtinCheckKind(), cgm, conj, convertType(), cir::CIRBaseBuilderTy::createComplexCreate(), cir::CIRBaseBuilderTy::createComplexImag(), cir::CIRBaseBuilderTy::createComplexReal(), cir::CIRBaseBuilderTy::createUnaryOp(), emitAlignmentAssumption(), emitCheckedArgForAssume(), emitComplexExpr(), emitLibraryCall(), emitRotate(), emitScalarExpr(), emitTrap(), emitUnreachable(), emitVAEnd(), emitVAListRef(), emitVAStart(), clang::CIRGen::CIRGenModule::errorNYI(), clang::Expr::EvaluateAsFloat(), clang::Expr::EvaluateAsRValue(), clang::Expr::EvaluateKnownConstInt(), clang::CIRGen::RValue::get(), clang::CallExpr::getArg(), clang::Decl::getAsFunction(), clang::CIRGen::CIRGenModule::getASTContext(), clang::CIRGen::CIRGenModule::getBuiltinLibFunction(), clang::CIRGen::RValue::getComplex(), cir::CIRBaseBuilderTy::getConstAPInt(), clang::CIRGen::CIRGenBuilderTy::getConstFP(), clang::CIRGen::CIRGenBuilderTy::getConstInt(), getContext(), clang::GlobalDecl::getDecl(), clang::Expr::getExprLoc(), clang::APValue::getFloat(), clang::APValue::getInt(), clang::Expr::getIntegerConstantExpr(), getLoc(), getMLIRContext(), clang::CallExpr::getNumArgs(), clang::CIRGen::Address::getPointer(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::CIRGen::CIRGenBuilderTy::getUInt32Ty(), getUndefRValue(), clang::Decl::hasAttr(), clang::Expr::EvalStatus::hasSideEffects(), clang::Expr::HasSideEffects(), clang::APValue::isFloat(), clang::APValue::isInt(), clang::Expr::isPRValue(), clang::ast_matchers::type, and clang::Expr::EvalResult::Val.
Referenced by emitCallExpr().
RValue CIRGenFunction::emitCall | ( | clang::QualType | calleeTy, |
const CIRGenCallee & | callee, | ||
const clang::CallExpr * | e, | ||
ReturnValueSlot | returnValue | ||
) |
Definition at line 1557 of file CIRGenExpr.cpp.
References cir::MissingFeatures::addressSpace(), clang::CallExpr::arguments(), clang::CIRGen::CIRGenTypes::arrangeFreeFunctionCall(), cgm, clang::CPlusPlus, cir::CIRBaseBuilderTy::createBitcast(), emitCall(), emitCallArgs(), cir::MissingFeatures::generateDebugInfo(), clang::ASTContext::getCanonicalType(), getContext(), clang::CallExpr::getDirectCallee(), clang::Expr::getExprLoc(), clang::CIRGen::CIRGenCallee::getFunctionPointer(), clang::CIRGen::CIRGenTypes::getFunctionType(), getLangOpts(), getLoc(), clang::Stmt::getSourceRange(), clang::CIRGen::CIRGenModule::getTypes(), getTypes(), cir::MissingFeatures::hip(), clang::Type::isFunctionPointerType(), cir::MissingFeatures::opCallArgEvaluationOrder(), cir::MissingFeatures::opCallChain(), cir::MissingFeatures::opCallFnInfoOpts(), cir::MissingFeatures::opCallMustTail(), cir::MissingFeatures::sanitizers(), and clang::CIRGen::CIRGenCallee::setFunctionPointer().
RValue CIRGenFunction::emitCall | ( | const CIRGenFunctionInfo & | funcInfo, |
const CIRGenCallee & | callee, | ||
ReturnValueSlot | returnValue, | ||
const CallArgList & | args, | ||
cir::CIRCallOpInterface * | callOp, | ||
mlir::Location | loc | ||
) |
Definition at line 500 of file CIRGenCall.cpp.
References clang::CIRGen::CIRGenFunctionInfo::argTypes(), cgm, clang::CIRGen::CIRGenModule::constructAttributeList(), convertType(), clang::CIRGen::CIRGenBuilderTy::createLoad(), createMemTemp(), cir::MissingFeatures::dataLayoutTypeAllocSize(), emitAggregateStore(), emitCallLikeOp(), cir::MissingFeatures::emitLifetimeMarkers(), clang::CIRGen::CIRGenModule::errorNYI(), clang::CIRGen::RValue::get(), clang::CIRGen::CIRGenCallee::getAbstractInfo(), clang::CIRGen::RValue::getAggregate(), getCounterAggTmpAsString(), clang::CIRGen::Address::getElementType(), getEvaluationKind(), clang::CIRGen::CIRGenCallee::getFunctionPointer(), clang::CIRGen::CIRGenTypes::getFunctionType(), clang::CIRGen::CIRGenModule::getGlobalValue(), clang::CIRGen::CIRGenFunctionInfo::getReturnType(), getTypes(), getUndefRValue(), clang::CIRGen::ReturnValueSlot::getValue(), clang::CIRGen::Address::invalid(), cir::MissingFeatures::invokeOp(), clang::CIRGen::Address::isValid(), cir::MissingFeatures::lowerAggregateLoadStore(), cir::MissingFeatures::opCallAttrs(), cir::MissingFeatures::opCallBitcastArg(), cir::MissingFeatures::opCallCallConv(), cir::MissingFeatures::opCallInAlloca(), cir::MissingFeatures::opCallMustTail(), cir::MissingFeatures::opCallPaddingArgs(), cir::MissingFeatures::opCallReturn(), clang::CIRGen::CIRGenCallee::prepareConcreteCallee(), cir::TEK_Aggregate, cir::TEK_Complex, and cir::TEK_Scalar.
Referenced by emitCall(), emitCallExpr(), emitCXXConstructorCall(), emitCXXDestructorCall(), emitCXXMemberOrOperatorCall(), emitLibraryCall(), and emitNewDeleteCall().
|
inline |
Definition at line 1034 of file CIRGenFunction.h.
References currSrcLoc, and emitCall().
void CIRGenFunction::emitCallArg | ( | CallArgList & | args, |
const clang::Expr * | e, | ||
clang::QualType | argType | ||
) |
Definition at line 675 of file CIRGenCall.cpp.
References clang::CIRGen::CallArgList::add(), clang::CIRGen::CallArgList::addUncopiedAggregate(), clang::Type::castAsRecordDecl(), cgm, emitAnyExprToTemp(), emitLValue(), emitReferenceBindingToExpr(), clang::CIRGen::CIRGenModule::errorNYI(), clang::Expr::getObjectKind(), clang::Stmt::getSourceRange(), hasAggregateEvaluationKind(), clang::Expr::isGLValue(), clang::RecordDecl::isParamDestroyedInCallee(), clang::Type::isRecordType(), clang::Type::isReferenceType(), clang::CIRGen::LValue::isSimple(), cir::MissingFeatures::msabi(), and clang::OK_Ordinary.
Referenced by emitCallArgs().
void CIRGenFunction::emitCallArgs | ( | CallArgList & | args, |
PrototypeWrapper | prototype, | ||
llvm::iterator_range< clang::CallExpr::const_arg_iterator > | argRange, | ||
AbstractCallee | callee = AbstractCallee() , |
||
unsigned | paramsToSkip = 0 |
||
) |
Definition at line 731 of file CIRGenCall.cpp.
References cgm, emitCallArg(), clang::CIRGen::CIRGenModule::errorNYI(), clang::Decl::getAttr(), clang::CIRGen::CIRGenFunction::AbstractCallee::getNumParams(), clang::CIRGen::CIRGenFunction::AbstractCallee::getParamDecl(), clang::CIRGen::CIRGenFunction::AbstractCallee::hasFunctionDecl(), cir::MissingFeatures::msabi(), cir::MissingFeatures::opCallCallConv(), cir::MissingFeatures::opCallImplicitObjectSizeArgs(), cir::MissingFeatures::opCallObjCMethod(), clang::CIRGen::CIRGenFunction::PrototypeWrapper::p, and cir::MissingFeatures::sanitizers().
Referenced by commonBuildCXXMemberOrOperatorCall(), emitCall(), emitCXXConstructorCall(), emitCXXMemberOrOperatorMemberCallExpr(), and emitCXXNewExpr().
CIRGenCallee CIRGenFunction::emitCallee | ( | const clang::Expr * | e | ) |
Definition at line 1638 of file CIRGenExpr.cpp.
References cgm, emitCallee(), emitLValue(), emitScalarExpr(), clang::CIRGen::CIRGenModule::errorNYI(), clang::CIRGen::CIRGenCallee::forPseudoDestructor(), clang::ast_matchers::functionType, clang::Type::getAs(), clang::CIRGen::LValue::getPointer(), clang::Expr::getReferencedDeclOfCallee(), clang::Stmt::getSourceRange(), clang::Expr::getType(), and clang::Expr::IgnoreParens().
Referenced by emitCallee(), and emitCallExpr().
RValue CIRGenFunction::emitCallExpr | ( | const clang::CallExpr * | e, |
ReturnValueSlot | returnValue = ReturnValueSlot() |
||
) |
Definition at line 1686 of file CIRGenExpr.cpp.
References cgm, emitBuiltinExpr(), emitCall(), emitCallee(), emitCXXMemberCallExpr(), emitCXXOperatorMemberCallExpr(), emitCXXPseudoDestructorExpr(), clang::CIRGen::CIRGenModule::errorNYI(), clang::CIRGen::RValue::get(), clang::CIRGen::CIRGenCallee::getBuiltinDecl(), clang::CIRGen::CIRGenCallee::getBuiltinID(), clang::CallExpr::getCallee(), clang::CIRGen::CIRGenCallee::getPseudoDestructorExpr(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::CIRGen::CIRGenCallee::isBuiltin(), clang::CIRGen::CIRGenCallee::isPseudoDestructor(), and cir::MissingFeatures::objCBlocks().
Referenced by emitCallExprLValue().
LValue CIRGenFunction::emitCallExprLValue | ( | const clang::CallExpr * | e | ) |
Definition at line 1410 of file CIRGenExpr.cpp.
References cgm, emitCallExpr(), clang::CIRGen::CIRGenModule::errorNYI(), clang::CallExpr::getCallReturnType(), getContext(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::CIRGen::RValue::getValue(), clang::CIRGen::RValue::isScalar(), and makeNaturalAlignPointeeAddrLValue().
Referenced by emitLValue().
mlir::LogicalResult clang::CIRGen::CIRGenFunction::emitCaseDefaultCascade | ( | const T * | stmt, |
mlir::Type | condType, | ||
mlir::ArrayAttr | value, | ||
CaseOpKind | kind, | ||
bool | buildingTopLevelCase | ||
) |
Definition at line 556 of file CIRGenStmt.cpp.
References cir::CIRBaseBuilderTy::createYield(), clang::Default, emitCaseStmt(), emitDefaultStmt(), emitStmt(), getLoc(), clang::Other, and clang::ast_matchers::stmt.
mlir::LogicalResult clang::CIRGen::CIRGenFunction::emitCaseDefaultCascade | ( | const T * | stmt, |
mlir::Type | condType, | ||
mlir::ArrayAttr | value, | ||
cir::CaseOpKind | kind, | ||
bool | buildingTopLevelCase | ||
) |
Referenced by emitCaseStmt(), and emitDefaultStmt().
mlir::LogicalResult CIRGenFunction::emitCaseStmt | ( | const clang::CaseStmt & | s, |
mlir::Type | condType, | ||
bool | buildingTopLevelCase | ||
) |
Definition at line 638 of file CIRGenStmt.cpp.
References emitCaseDefaultCascade(), getContext(), and s.
Referenced by emitCaseDefaultCascade(), and emitSwitchCase().
Casts are never lvalues unless that cast is to a reference type.
If the cast is to a reference, we can have the usual lvalue result, otherwise if a cast is needed by the code generator in an lvalue context, then it must mean that we need the address of an aggregate in order to access one of its members. This can happen for all the reasons that casts are permitted with aggregate result, including noop aggregate casts, and cast from scalar to union.
Definition at line 1011 of file CIRGenExpr.cpp.
References clang::Type::castAsCXXRecordDecl(), cgm, clang::CastExpr::changesVolatileQualification(), convertTypeForMem(), clang::CIRGen::CIRGenModule::emitExplicitCastExprType(), emitLValue(), clang::CIRGen::CIRGenModule::errorNYI(), clang::CIRGen::LValue::getAddress(), getAddressOfBaseClass(), clang::CIRGen::LValue::getBaseInfo(), clang::CastExpr::getCastKind(), clang::CastExpr::getCastKindName(), clang::CIRGen::Address::getElementType(), clang::Expr::getExprLoc(), clang::Stmt::getSourceRange(), clang::CastExpr::getSubExpr(), clang::Expr::getType(), clang::CIRGen::LValue::isSimple(), clang::CIRGen::Address::isValid(), makeAddrLValue(), cir::MissingFeatures::opTBAA(), clang::CastExpr::path(), V, and clang::CIRGen::Address::withElementType().
Referenced by emitLValue().
mlir::Value CIRGenFunction::emitCheckedArgForAssume | ( | const Expr * | e | ) |
Emits an argument for a call to a __builtin_assume
.
If the builtin sanitizer is enabled, a runtime check is also emitted.
Definition at line 384 of file CIRGenBuiltin.cpp.
References cgm, clang::CIRGen::CIRGenModule::errorNYI(), evaluateExprAsBool(), clang::Stmt::getSourceRange(), clang::SanitizerSet::has(), cir::MissingFeatures::sanitizers(), and sanOpts.
Referenced by emitBuiltinExpr().
LValue CIRGenFunction::emitComplexAssignmentLValue | ( | const BinaryOperator * | e | ) |
Definition at line 1038 of file CIRGenExprComplex.cpp.
References cgm, clang::CIRGen::CIRGenModule::errorNYI(), getLangOpts(), and clang::BinaryOperator::getOpcode().
Referenced by emitBinaryOperatorLValue().
LValue CIRGenFunction::emitComplexCompoundAssignmentLValue | ( | const CompoundAssignOperator * | e | ) |
Definition at line 1067 of file CIRGenExprComplex.cpp.
References getComplexOp(), and clang::BinaryOperator::getOpcode().
Referenced by emitLValue().
mlir::Value CIRGenFunction::emitComplexExpr | ( | const Expr * | e | ) |
Emit the computation of the specified expression of complex type, returning the result.
EmitComplexExpr - Emit the computation of the specified expression of complex type, ignoring the result.
Definition at line 1012 of file CIRGenExprComplex.cpp.
References getComplexType(), and clang::Expr::getType().
Referenced by emitAnyExpr(), emitBuiltinExpr(), and emitExprAsInit().
Definition at line 1019 of file CIRGenExprComplex.cpp.
References getComplexType(), clang::Expr::getExprLoc(), getLoc(), and clang::Expr::getType().
Referenced by emitAnyExprToMem().
mlir::Value CIRGenFunction::emitComplexPrePostIncDec | ( | const UnaryOperator * | e, |
LValue | lv, | ||
cir::UnaryOpKind | op, | ||
bool | isPre | ||
) |
Definition at line 1074 of file CIRGenExprComplex.cpp.
References cgm, cir::CIRBaseBuilderTy::createUnaryOp(), emitLoadOfComplex(), emitStoreOfComplex(), clang::CIRGen::CIRGenModule::errorNYI(), clang::UnaryOperator::getExprLoc(), getLangOpts(), and getLoc().
mlir::Value CIRGenFunction::emitComplexToScalarConversion | ( | mlir::Value | src, |
QualType | srcTy, | ||
QualType | dstTy, | ||
SourceLocation | loc | ||
) |
Emit a conversion from the specified complex type to the specified destination type, where the destination type is an LLVM scalar type.
Definition at line 2002 of file CIRGenExprScalar.cpp.
References clang::Type::castAs(), convertType(), emitScalarConversion(), getLoc(), hasScalarEvaluationKind(), clang::Type::isAnyComplexType(), clang::Type::isBooleanType(), and clang::Type::isFloatingType().
LValue CIRGenFunction::emitCompoundAssignmentLValue | ( | const clang::CompoundAssignOperator * | e | ) |
Definition at line 1291 of file CIRGenExprScalar.cpp.
References ::ScalarExprEmitter, clang::And, COMPOUND_OP, clang::BinaryOperator::getOpcode(), and clang::Or.
Referenced by emitLValue().
LValue CIRGenFunction::emitCompoundLiteralLValue | ( | const CompoundLiteralExpr * | e | ) |
Definition at line 1379 of file CIRGenExpr.cpp.
References cgm, clang::CPlusPlus, createMemTemp(), clang::CIRGen::Decl, emitAnyExprToMem(), clang::CIRGen::CIRGenModule::errorNYI(), clang::CompoundLiteralExpr::getInitializer(), getLangOpts(), getLoc(), clang::QualType::getQualifiers(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::QualType::isDestructedType(), clang::CompoundLiteralExpr::isFileScope(), clang::Type::isVariablyModifiedType(), and makeAddrLValue().
Referenced by emitLValue().
mlir::LogicalResult CIRGenFunction::emitCompoundStmt | ( | const clang::CompoundStmt & | s, |
Address * | lastValue = nullptr , |
||
AggValueSlot | slot = AggValueSlot::ignored() |
||
) |
Definition at line 87 of file CIRGenStmt.cpp.
References b, emitCompoundStmtWithoutScope(), getLoc(), s, symbolTable, and clang::ast_matchers::type.
Referenced by emitSimpleStmt().
mlir::LogicalResult CIRGenFunction::emitCompoundStmtWithoutScope | ( | const clang::CompoundStmt & | s, |
Address * | lastValue = nullptr , |
||
AggValueSlot | slot = AggValueSlot::ignored() |
||
) |
Definition at line 66 of file CIRGenStmt.cpp.
References emitStmt(), emitStmtWithResult(), and s.
Referenced by emitCompoundStmt(), emitFunctionBody(), and emitSimpleStmt().
ConditionalInfo clang::CIRGen::CIRGenFunction::emitConditionalBlocks | ( | const AbstractConditionalOperator * | e, |
const FuncTy & | branchGenFunc | ||
) |
void clang::CIRGen::CIRGenFunction::emitConstructorBody | ( | FunctionArgList & | args | ) |
Definition at line 574 of file CIRGenFunction.cpp.
References cgm, clang::Ctor_Base, clang::Ctor_Complete, curGD, emitCtorPrologue(), emitDelegateCXXConstructorCall(), emitStmt(), clang::CIRGen::CIRGenModule::errorNYI(), clang::GlobalDecl::getCtorType(), clang::TargetInfo::getCXXABI(), clang::GlobalDecl::getDecl(), clang::CIRGen::CIRGenModule::getTarget(), clang::TargetCXXABI::hasConstructorVariants(), cir::MissingFeatures::incrementProfileCounter(), isConstructorDelegationValid(), cir::MissingFeatures::runCleanupsScope(), and cir::MissingFeatures::sanitizers().
Referenced by generateCode().
mlir::LogicalResult CIRGenFunction::emitContinueStmt | ( | const clang::ContinueStmt & | s | ) |
Definition at line 510 of file CIRGenStmt.cpp.
References cir::CIRBaseBuilderTy::createContinue(), getLoc(), and s.
Referenced by emitSimpleStmt().
void CIRGenFunction::emitCtorPrologue | ( | const clang::CXXConstructorDecl * | ctor, |
clang::CXXCtorType | ctorType, | ||
FunctionArgList & | args | ||
) |
This routine generates necessary code to initialize base classes and non-static data members belonging to this constructor.
Definition at line 215 of file CIRGenClass.cpp.
References cgm, clang::Ctor_Base, cir::MissingFeatures::ctorMemcpyizer(), cxxThisValue, emitBaseInitializer(), emitDelegatingCXXConstructorCall(), emitMemberInitializer(), clang::CIRGen::CIRGenModule::errorNYI(), clang::DeclaratorDecl::getBeginLoc(), clang::CIRGen::CIRGenModule::getCodeGenOpts(), clang::TargetInfo::getCXXABI(), getLoc(), clang::CXXRecordDecl::getNumVBases(), clang::CXXMethodDecl::getParent(), clang::FunctionDecl::getSourceRange(), clang::CIRGen::CIRGenModule::getTarget(), clang::TargetCXXABI::hasConstructorVariants(), clang::Init, initializeVTablePointers(), clang::CXXConstructorDecl::inits(), clang::CXXRecordDecl::isAbstract(), clang::CXXConstructorDecl::isDelegatingConstructor(), isInitializerOfDynamicClass(), loadCXXThisAddress(), and cir::MissingFeatures::msabi().
Referenced by emitConstructorBody().
void CIRGenFunction::emitCXXAggrConstructorCall | ( | const CXXConstructorDecl * | ctor, |
const clang::ArrayType * | arrayType, | ||
Address | arrayBegin, | ||
const CXXConstructExpr * | e, | ||
bool | newPointerIsChecked, | ||
bool | zeroInitialize = false |
||
) |
Emit a loop to call a particular constructor for each of several members of an array.
ctor | the constructor to call for each element |
arrayType | the type of the array to initialize |
arrayBegin | an arrayType* |
zeroInitialize | true if each element should be zero-initialized before it is constructed |
Definition at line 522 of file CIRGenClass.cpp.
References clang::ast_matchers::arrayType, emitArrayLength(), and emitCXXAggrConstructorCall().
Referenced by emitCXXAggrConstructorCall(), and emitCXXConstructExpr().
void CIRGenFunction::emitCXXAggrConstructorCall | ( | const CXXConstructorDecl * | ctor, |
mlir::Value | numElements, | ||
Address | arrayBase, | ||
const CXXConstructExpr * | e, | ||
bool | newPointerIsChecked, | ||
bool | zeroInitialize | ||
) |
Emit a loop to call a particular constructor for each of several members of an array.
ctor | the constructor to call for each element |
numElements | the number of elements in the array; may be zero |
arrayBase | a T*, where T is the type constructed by ctor |
zeroInitialize | true if each element should be zero-initialized before it is constructed |
Definition at line 541 of file CIRGenClass.cpp.
References clang::CharUnits::alignmentOfArrayElement(), b, cgm, cir::CIRBaseBuilderTy::createPtrBitcast(), clang::Ctor_Complete, currSrcLoc, clang::CIRGen::AggValueSlot::DoesNotOverlap, emitCXXConstructorCall(), emitNullInitialization(), clang::CIRGen::CIRGenModule::errorNYI(), clang::CIRGen::AggValueSlot::forAddr(), clang::CIRGen::Address::getAlignment(), clang::ASTContext::getCanonicalTagType(), getContext(), clang::CIRGen::Address::getElementType(), getLangOpts(), clang::CXXMethodDecl::getParent(), clang::CIRGen::Address::getPointer(), cir::CIRBaseBuilderTy::getPointerTo(), clang::Stmt::getSourceRange(), clang::CXXRecordDecl::hasTrivialDestructor(), clang::CIRGen::AggValueSlot::IsDestructed, clang::CIRGen::AggValueSlot::IsNotAliased, clang::CIRGen::AggValueSlot::IsNotZeroed, cir::MissingFeatures::runCleanupsScope(), cir::MissingFeatures::sanitizers(), and clang::ast_matchers::type.
void CIRGenFunction::emitCXXConstructExpr | ( | const clang::CXXConstructExpr * | e, |
AggValueSlot | dest | ||
) |
Definition at line 1959 of file CIRGenExpr.cpp.
References clang::ast_matchers::arrayType, cgm, clang::Complete, clang::Ctor_Base, clang::Ctor_Complete, curGD, clang::Delegating, emitCXXAggrConstructorCall(), emitCXXConstructorCall(), clang::CIRGen::CIRGenModule::errorNYI(), clang::CIRGen::AggValueSlot::getAddress(), clang::CXXConstructExpr::getConstructionKind(), clang::CXXConstructExpr::getConstructor(), getContext(), clang::GlobalDecl::getCtorType(), getLangOpts(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::CXXConstructExpr::isElidable(), clang::CIRGen::AggValueSlot::isIgnored(), clang::CIRGen::AggValueSlot::isZeroed(), clang::NonVirtualBase, clang::CXXConstructExpr::requiresZeroInitialization(), cir::MissingFeatures::sanitizers(), clang::ast_matchers::type, and clang::VirtualBase.
void CIRGenFunction::emitCXXConstructorCall | ( | const clang::CXXConstructorDecl * | d, |
clang::CXXCtorType | type, | ||
bool | forVirtualBase, | ||
bool | delegating, | ||
Address | thisAddr, | ||
CallArgList & | args, | ||
clang::SourceLocation | loc | ||
) |
Definition at line 835 of file CIRGenClass.cpp.
References clang::CIRGen::CIRGenTypes::arrangeCXXConstructorCall(), c, cgm, clang::Ctor_Base, emitCall(), clang::CIRGen::CIRGenModule::errorNYI(), clang::CIRGen::CIRGenCallee::forDirect(), clang::CIRGen::CIRGenModule::getAddrOfCXXStructor(), clang::CIRGen::CIRGenModule::getCodeGenOpts(), clang::CXXConstructorDecl::getInheritedConstructor(), getLoc(), clang::CXXMethodDecl::getParent(), clang::FunctionDecl::getSourceRange(), clang::CIRGen::CIRGenModule::getTypes(), cir::MissingFeatures::implicitConstructorArgs(), clang::CXXRecordDecl::isDynamicClass(), cir::MissingFeatures::isMemcpyEquivalentSpecialMember(), cir::MissingFeatures::isTrivialCtorOrDtor(), and clang::ast_matchers::type.
void CIRGenFunction::emitCXXConstructorCall | ( | const clang::CXXConstructorDecl * | d, |
clang::CXXCtorType | type, | ||
bool | forVirtualBase, | ||
bool | delegating, | ||
AggValueSlot | thisAVS, | ||
const clang::CXXConstructExpr * | e | ||
) |
Definition at line 803 of file CIRGenClass.cpp.
References clang::CIRGen::CallArgList::add(), cir::MissingFeatures::addressSpace(), clang::CXXConstructExpr::arguments(), clang::Type::castAs(), emitCallArgs(), emitCXXConstructorCall(), clang::CIRGen::RValue::get(), clang::CIRGen::AggValueSlot::getAddress(), clang::CXXConstructExpr::getConstructor(), clang::Expr::getExprLoc(), clang::CIRGen::Address::getPointer(), clang::CXXMethodDecl::getThisType(), clang::ValueDecl::getType(), cir::MissingFeatures::isMemcpyEquivalentSpecialMember(), cir::MissingFeatures::opCallArgEvaluationOrder(), cir::MissingFeatures::sanitizers(), and clang::ast_matchers::type.
Referenced by emitCXXAggrConstructorCall(), emitCXXConstructExpr(), emitCXXConstructorCall(), and emitDelegateCXXConstructorCall().
void CIRGenFunction::emitCXXDestructorCall | ( | const CXXDestructorDecl * | dd, |
CXXDtorType | type, | ||
bool | forVirtualBase, | ||
bool | delegating, | ||
Address | thisAddr, | ||
QualType | thisTy | ||
) |
Definition at line 718 of file CIRGenClass.cpp.
References cgm, clang::CIRGen::CIRGenCXXABI::emitDestructorCall(), clang::CIRGen::CIRGenModule::getCXXABI(), and clang::ast_matchers::type.
Referenced by emitDestructorBody().
RValue CIRGenFunction::emitCXXDestructorCall | ( | GlobalDecl | dtor, |
const CIRGenCallee & | callee, | ||
mlir::Value | thisVal, | ||
QualType | thisTy, | ||
mlir::Value | implicitParam, | ||
QualType | implicitParamTy, | ||
const CallExpr * | e | ||
) |
Definition at line 270 of file CIRGenCXXExpr.cpp.
References cir::MissingFeatures::addressSpace(), clang::CIRGen::CIRGenTypes::arrangeCXXStructorDeclaration(), cgm, commonBuildCXXMemberOrOperatorCall(), emitCall(), clang::Type::getAsCXXRecordDecl(), clang::GlobalDecl::getDecl(), clang::Expr::getExprLoc(), getLoc(), clang::CXXMethodDecl::getParent(), clang::Decl::getSourceRange(), clang::CIRGen::CIRGenModule::getTypes(), clang::QualType::isNull(), and cir::MissingFeatures::opCallMustTail().
mlir::LogicalResult CIRGenFunction::emitCXXForRangeStmt | ( | const CXXForRangeStmt & | s, |
llvm::ArrayRef< const Attr * > | attrs | ||
) |
Definition at line 686 of file CIRGenStmt.cpp.
References b, cir::CIRBaseBuilderTy::createFor(), emitStmt(), getLoc(), cir::MissingFeatures::loopInfoStack(), cir::MissingFeatures::requiresCleanups(), s, and terminateBody().
Referenced by emitStmt().
RValue CIRGenFunction::emitCXXMemberCallExpr | ( | const clang::CXXMemberCallExpr * | e, |
ReturnValueSlot | returnValue | ||
) |
Definition at line 1932 of file CIRGenExpr.cpp.
References cgm, emitCXXMemberOrOperatorMemberCallExpr(), clang::CIRGen::CIRGenModule::errorNYI(), clang::CIRGen::RValue::get(), clang::CallExpr::getCallee(), clang::Stmt::getSourceRange(), and clang::Expr::IgnoreParens().
Referenced by emitCallExpr().
RValue CIRGenFunction::emitCXXMemberOrOperatorCall | ( | const clang::CXXMethodDecl * | md, |
const CIRGenCallee & | callee, | ||
ReturnValueSlot | returnValue, | ||
mlir::Value | thisPtr, | ||
mlir::Value | implicitParam, | ||
clang::QualType | implicitParamTy, | ||
const clang::CallExpr * | ce, | ||
CallArgList * | rtlArgs | ||
) |
Definition at line 197 of file CIRGenCXXExpr.cpp.
References clang::CIRGen::CIRGenTypes::arrangeCXXMethodCall(), clang::Type::castAs(), cgm, commonBuildCXXMemberOrOperatorCall(), currSrcLoc, emitCall(), clang::Expr::getExprLoc(), getLoc(), clang::ValueDecl::getType(), clang::CIRGen::CIRGenModule::getTypes(), and cir::MissingFeatures::opCallMustTail().
Referenced by emitCXXMemberOrOperatorMemberCallExpr().
RValue CIRGenFunction::emitCXXMemberOrOperatorMemberCallExpr | ( | const clang::CallExpr * | ce, |
const clang::CXXMethodDecl * | md, | ||
ReturnValueSlot | returnValue, | ||
bool | hasQualifier, | ||
clang::NestedNameSpecifier | qualifier, | ||
bool | isArrow, | ||
const clang::Expr * | base | ||
) |
Definition at line 76 of file CIRGenCXXExpr.cpp.
References clang::CIRGen::CIRGenCXXABI::adjustThisArgumentForVirtualFunctionCall(), clang::CallExpr::arguments(), clang::CIRGen::CIRGenTypes::arrangeCXXMethodDeclaration(), clang::Type::castAs(), cgm, cir::MissingFeatures::devirtualizeMemberFunction(), emitCallArgs(), emitCXXMemberOrOperatorCall(), emitLValue(), emitPointerWithAlignment(), cir::MissingFeatures::emitTypeCheck(), clang::CIRGen::CIRGenModule::errorNYI(), clang::CIRGen::CIRGenCallee::forDirect(), clang::CIRGen::CIRGenCallee::forVirtual(), clang::CIRGen::RValue::get(), clang::CIRGen::LValue::getAddress(), clang::CIRGen::CIRGenModule::getAddrOfFunction(), clang::CIRGen::CIRGenModule::getCXXABI(), clang::CallExpr::getDirectCallee(), clang::CIRGen::CIRGenTypes::getFunctionType(), getLangOpts(), clang::CXXMethodDecl::getParent(), clang::CIRGen::LValue::getPointer(), clang::Stmt::getSourceRange(), clang::ValueDecl::getType(), clang::Expr::getType(), clang::CIRGen::CIRGenModule::getTypes(), clang::FunctionDecl::isDefaulted(), clang::FunctionDecl::isTrivial(), clang::TagDecl::isUnion(), clang::CXXMethodDecl::isVirtual(), makeAddrLValue(), cir::MissingFeatures::opTBAA(), cir::MissingFeatures::sanitizers(), and clang::CIRGen::LValue::setAddress().
Referenced by emitCXXMemberCallExpr(), and emitCXXOperatorMemberCallExpr().
mlir::Value CIRGenFunction::emitCXXNewExpr | ( | const CXXNewExpr * | e | ) |
Definition at line 316 of file CIRGenCXXExpr.cpp.
References clang::CIRGen::CallArgList::add(), clang::Type::castAs(), cgm, convertTypeForMem(), clang::CIRGen::CIRGenBuilderTy::createElementBitCast(), emitCallArgs(), emitCXXNewAllocSize(), emitNewDeleteCall(), emitNewInitializer(), clang::CIRGen::CIRGenModule::errorNYI(), cir::MissingFeatures::exprNewNullCheck(), cir::MissingFeatures::generateDebugInfo(), clang::CIRGen::RValue::get(), clang::CXXNewExpr::getAllocatedType(), clang::CIRGen::CIRGenModule::getASTContext(), clang::ASTContext::getBaseElementType(), clang::CIRGen::CIRGenModule::getCodeGenOpts(), getContext(), getLoc(), clang::TargetInfo::getNewAlign(), clang::CXXNewExpr::getOperatorDelete(), clang::CXXNewExpr::getOperatorNew(), clang::CIRGen::Address::getPointer(), clang::CIRGen::CIRGenTypeCache::getSizeAlign(), clang::ASTContext::getSizeType(), clang::CXXNewExpr::getSourceRange(), clang::ASTContext::getTargetInfo(), clang::ValueDecl::getType(), clang::ASTContext::getTypeAlignInChars(), clang::CIRGen::RValue::getValue(), clang::CXXNewExpr::hasInitializer(), clang::CIRGen::Address::invalid(), clang::CXXNewExpr::isArray(), clang::QualType::isPODType(), clang::FunctionDecl::isReplaceableGlobalAllocationFunction(), clang::FunctionDecl::isReservedGlobalPlacementOperator(), clang::CXXNewExpr::passAlignment(), clang::CXXNewExpr::placement_arguments(), cir::MissingFeatures::sanitizers(), and clang::CXXNewExpr::shouldNullCheckAllocation().
RValue CIRGenFunction::emitCXXOperatorMemberCallExpr | ( | const CXXOperatorCallExpr * | e, |
const CXXMethodDecl * | md, | ||
ReturnValueSlot | returnValue | ||
) |
Definition at line 187 of file CIRGenCXXExpr.cpp.
References emitCXXMemberOrOperatorMemberCallExpr(), clang::CallExpr::getArg(), and clang::CXXMethodDecl::isInstance().
Referenced by emitCallExpr().
RValue CIRGenFunction::emitCXXPseudoDestructorExpr | ( | const CXXPseudoDestructorExpr * | expr | ) |
Definition at line 19 of file CIRGenExprCXX.cpp.
References cgm, emitIgnoredExpr(), clang::CIRGen::CIRGenModule::errorNYI(), clang::ast_matchers::expr, clang::CIRGen::RValue::get(), clang::QualType::hasStrongOrWeakObjCLifetime(), and cir::MissingFeatures::objCLifetime().
Referenced by emitCallExpr().
void CIRGenFunction::emitCXXThrowExpr | ( | const CXXThrowExpr * | e | ) |
Definition at line 21 of file CIRGenException.cpp.
References cgm, clang::CIRGen::CIRGenCXXABI::emitRethrow(), clang::CIRGen::CIRGenModule::errorNYI(), clang::CIRGen::CIRGenModule::getCXXABI(), clang::CIRGen::CIRGenModule::getLangOpts(), clang::CXXThrowExpr::getSubExpr(), getTarget(), clang::TargetInfo::getTriple(), and clang::Type::isObjCObjectPointerType().
void CIRGenFunction::emitDecl | ( | const clang::Decl & | d, |
bool | evaluateConditionDecl = false |
||
) |
Definition at line 530 of file CIRGenDecl.cpp.
References cgm, emitOpenACCDeclare(), emitOpenACCRoutine(), emitVarDecl(), clang::CIRGen::CIRGenModule::errorNYI(), cir::MissingFeatures::generateDebugInfo(), clang::Decl::getDeclKindName(), clang::Decl::getKind(), clang::Decl::getSourceRange(), clang::VarDecl::isLocalVarDecl(), clang::Type::isVariablyModifiedType(), and maybeEmitDeferredVarDeclInit().
Referenced by emitDeclStmt(), emitIfStmt(), and emitSwitchStmt().
LValue CIRGenFunction::emitDeclRefLValue | ( | const clang::DeclRefExpr * | e | ) |
Definition at line 648 of file CIRGenExpr.cpp.
References cgm, clang::CIRGen::Decl, emitFunctionDeclLValue(), emitGlobalVarDeclLValue(), emitLoadOfReferenceLValue(), emitLValue(), clang::CIRGen::CIRGenModule::errorNYI(), cir::MissingFeatures::generateDebugInfo(), getContext(), clang::DeclRefExpr::getDecl(), getLoc(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::CIRGen::LValue::getType(), clang::CIRGen::Address::invalid(), clang::DeclRefExpr::isNonOdrUse(), clang::Type::isReferenceType(), cir::MissingFeatures::lambdaCaptures(), localDeclMap, makeAddrLValue(), clang::NOUR_Unevaluated, cir::MissingFeatures::opAllocaEscapeByReference(), cir::MissingFeatures::opAllocaImpreciseLifetime(), cir::MissingFeatures::opAllocaNonGC(), cir::MissingFeatures::opAllocaOpenMPThreadPrivate(), cir::MissingFeatures::opAllocaStaticLocal(), cir::MissingFeatures::opAllocaTLS(), clang::DeclRefExpr::refersToEnclosingVariableOrCapture(), and symbolTable.
Referenced by emitLValue(), emitMemberExpr(), and getOpenACCDataOperandInfo().
mlir::LogicalResult CIRGenFunction::emitDeclStmt | ( | const clang::DeclStmt & | s | ) |
Definition at line 433 of file CIRGenStmt.cpp.
References emitDecl(), and s.
Referenced by emitSimpleStmt().
mlir::LogicalResult CIRGenFunction::emitDefaultStmt | ( | const clang::DefaultStmt & | s, |
mlir::Type | condType, | ||
bool | buildingTopLevelCase | ||
) |
Definition at line 662 of file CIRGenStmt.cpp.
References emitCaseDefaultCascade(), and s.
Referenced by emitCaseDefaultCascade(), and emitSwitchCase().
void CIRGenFunction::emitDelegateCallArg | ( | CallArgList & | args, |
const clang::VarDecl * | param, | ||
clang::SourceLocation | loc | ||
) |
We are performing a delegate call; that is, the current function is delegating to another one.
Produce a r-value suitable for passing the given parameter.
Definition at line 257 of file CIRGenCall.cpp.
References clang::CIRGen::CallArgList::add(), cgm, convertTempToRValue(), clang::CIRGen::CIRGenBuilderTy::createLoad(), clang::CIRGen::CIRGenModule::errorNYI(), clang::CIRGen::RValue::get(), getAddrOfLocalVar(), getContext(), getLangOpts(), getLoc(), clang::VarDecl::getSourceRange(), clang::ValueDecl::getType(), clang::VarDecl::needsDestruction(), cir::MissingFeatures::thunks(), and clang::ast_matchers::type.
Referenced by emitDelegateCXXConstructorCall().
void CIRGenFunction::emitDelegateCXXConstructorCall | ( | const clang::CXXConstructorDecl * | ctor, |
clang::CXXCtorType | ctorType, | ||
const FunctionArgList & | args, | ||
clang::SourceLocation | loc | ||
) |
Definition at line 625 of file CIRGenClass.cpp.
References clang::CIRGen::CallArgList::add(), cgm, curGD, emitCXXConstructorCall(), emitDelegateCallArg(), clang::CIRGen::CIRGenModule::errorNYI(), clang::CIRGen::RValue::get(), clang::CIRGen::CIRGenModule::getCXXABI(), clang::CIRGen::Address::getPointer(), loadCXXThisAddress(), clang::CIRGen::CIRGenCXXABI::needsVTTParameter(), and cir::MissingFeatures::sanitizers().
Referenced by emitConstructorBody().
void CIRGenFunction::emitDelegatingCXXConstructorCall | ( | const CXXConstructorDecl * | ctor, |
const FunctionArgList & | args | ||
) |
Definition at line 695 of file CIRGenClass.cpp.
References cgm, emitAggExpr(), clang::CIRGen::CIRGenModule::errorNYI(), clang::CIRGen::AggValueSlot::forAddr(), clang::CXXCtorInitializer::getInit(), clang::CIRGen::CIRGenModule::getLangOpts(), clang::CXXMethodDecl::getParent(), clang::FunctionDecl::getSourceRange(), clang::CXXRecordDecl::hasTrivialDestructor(), clang::CXXConstructorDecl::init_begin(), clang::CXXConstructorDecl::isDelegatingConstructor(), clang::CIRGen::AggValueSlot::IsDestructed, clang::CIRGen::AggValueSlot::IsNotAliased, clang::CIRGen::AggValueSlot::IsNotZeroed, loadCXXThisAddress(), clang::CIRGen::AggValueSlot::MayOverlap, cir::MissingFeatures::objCGC(), and cir::MissingFeatures::sanitizers().
Referenced by emitCtorPrologue().
Immediately perform the destruction of the given object.
addr | - the address of the object; a type* |
type | - the type of the object; if an array type, all objects are destroyed in reverse order |
destroyer | - the function to call to destroy individual elements |
Definition at line 727 of file CIRGenDecl.cpp.
References clang::CharUnits::alignmentOfArrayElement(), clang::ast_matchers::arrayType, cgm, emitArrayDestroy(), emitArrayLength(), clang::CIRGen::CIRGenModule::errorNYI(), clang::CIRGen::Address::getAlignment(), clang::ASTContext::getAsArrayType(), getContext(), clang::CIRGen::Address::getPointer(), length(), clang::ast_matchers::type, and cir::MissingFeatures::vlas().
void clang::CIRGen::CIRGenFunction::emitDestructorBody | ( | FunctionArgList & | args | ) |
Emits the body of the current destructor.
Definition at line 617 of file CIRGenFunction.cpp.
References cir::MissingFeatures::appleKext(), cgm, curGD, clang::Dtor_Base, clang::Dtor_Comdat, clang::Dtor_Complete, clang::Dtor_Deleting, cir::MissingFeatures::dtorCleanups(), emitCXXDestructorCall(), emitStmt(), clang::CIRGen::CIRGenModule::errorNYI(), clang::FunctionDecl::getBody(), clang::GlobalDecl::getDecl(), clang::GlobalDecl::getDtorType(), clang::CXXMethodDecl::getFunctionObjectParameterType(), clang::CXXMethodDecl::getParent(), clang::FunctionDecl::getSourceRange(), getTarget(), cir::MissingFeatures::incrementProfileCounter(), clang::CXXRecordDecl::isAbstract(), clang::Decl::isImplicit(), loadCXXThisAddress(), cir::MissingFeatures::sanitizers(), and cir::MissingFeatures::vtableInitialization().
Referenced by generateCode().
mlir::LogicalResult CIRGenFunction::emitDoStmt | ( | const clang::DoStmt & | s | ) |
Definition at line 834 of file CIRGenStmt.cpp.
References b, cir::CIRBaseBuilderTy::createDoWhile(), getLoc(), cir::MissingFeatures::loopInfoStack(), cir::MissingFeatures::requiresCleanups(), s, and terminateBody().
Referenced by emitStmt().
void CIRGenFunction::emitExprAsInit | ( | const clang::Expr * | init, |
const clang::ValueDecl * | d, | ||
LValue | lvalue, | ||
bool | capturedByInit = false |
||
) |
Emit an expression as an initializer for an object (variable, field, etc.) at the given location.
The expression is not necessarily the normal initializer for the object, and the address is not necessarily its normal location.
init | the initializing expression |
d | the object to act as if we're initializing |
lvalue | the lvalue to initialize |
capturedByInit | true if d is a __block variable whose address is potentially changed by the initializer |
Definition at line 487 of file CIRGenDecl.cpp.
References cir::MissingFeatures::aggValueSlotMayOverlap(), cgm, emitAggExpr(), emitComplexExpr(), emitReferenceBindingToExpr(), emitScalarInit(), emitStoreOfComplex(), emitStoreThroughLValue(), clang::CIRGen::CIRGenModule::errorNYI(), clang::CIRGen::AggValueSlot::forLValue(), getEvaluationKind(), clang::Expr::getExprLoc(), getLoc(), clang::Decl::getSourceRange(), clang::Stmt::getSourceRange(), clang::ValueDecl::getType(), clang::CIRGen::AggValueSlot::IsDestructed, clang::CIRGen::AggValueSlot::IsNotAliased, clang::CIRGen::AggValueSlot::MayOverlap, cir::TEK_Aggregate, cir::TEK_Complex, cir::TEK_Scalar, and clang::ast_matchers::type.
Referenced by emitAutoVarInit(), and emitInitializerForField().
mlir::LogicalResult CIRGenFunction::emitForStmt | ( | const clang::ForStmt & | s | ) |
Definition at line 762 of file CIRGenStmt.cpp.
References b, cir::CIRBaseBuilderTy::createCondition(), cir::CIRBaseBuilderTy::createFor(), cir::CIRBaseBuilderTy::createYield(), emitStmt(), emitStopPoint(), getLoc(), cir::MissingFeatures::loopInfoStack(), cir::MissingFeatures::requiresCleanups(), and s.
Referenced by emitStmt().
mlir::LogicalResult clang::CIRGen::CIRGenFunction::emitFunctionBody | ( | const clang::Stmt * | body | ) |
Definition at line 485 of file CIRGenFunction.cpp.
References emitCompoundStmtWithoutScope(), emitStmt(), and symbolTable.
Referenced by generateCode().
mlir::LogicalResult CIRGenFunction::emitGotoStmt | ( | const clang::GotoStmt & | s | ) |
Definition at line 491 of file CIRGenStmt.cpp.
References cir::MissingFeatures::generateDebugInfo(), getLoc(), and s.
Referenced by emitSimpleStmt().
cir::IfOp CIRGenFunction::emitIfOnBoolExpr | ( | const clang::Expr * | cond, |
BuilderCallbackRef | thenBuilder, | ||
mlir::Location | thenLoc, | ||
BuilderCallbackRef | elseBuilder, | ||
std::optional< mlir::Location > | elseLoc = {} |
||
) |
Emit an if
on a boolean condition, filling then
and else
into appropriated regions.
Definition at line 1820 of file CIRGenExpr.cpp.
References emitOpOnBoolExpr(), and getMLIRContext().
mlir::LogicalResult CIRGenFunction::emitIfOnBoolExpr | ( | const clang::Expr * | cond, |
const clang::Stmt * | thenS, | ||
const clang::Stmt * | elseS | ||
) |
Emit an if
on a boolean condition to the specified blocks.
Emit an if
on a boolean condition, filling then
and else
into appropriated regions.
FIXME: Based on the condition, this might try to simplify the codegen of the conditional based on the branch. In the future, we may apply code generation simplifications here, similar to those used in classic LLVM codegen See EmitBranchOnBoolExpr
for inspiration.
Definition at line 1790 of file CIRGenExpr.cpp.
References emitIfOnBoolExpr(), emitStmt(), getLoc(), and clang::Stmt::getSourceRange().
Referenced by emitIfOnBoolExpr(), and emitIfStmt().
mlir::LogicalResult CIRGenFunction::emitIfStmt | ( | const clang::IfStmt & | s | ) |
Definition at line 371 of file CIRGenStmt.cpp.
References b, constantFoldsToBool(), cir::MissingFeatures::emitCondLikelihoodViaExpectIntrinsic(), emitDecl(), emitIfOnBoolExpr(), emitStmt(), getLoc(), cir::MissingFeatures::incrementProfileCounter(), and s.
Referenced by emitStmt().
void CIRGenFunction::emitIgnoredExpr | ( | const clang::Expr * | e | ) |
Emit code to compute the specified expression, ignoring the result.
Definition at line 1722 of file CIRGenExpr.cpp.
References cir::MissingFeatures::aggValueSlot(), emitAnyExpr(), emitLValue(), and clang::Expr::isPRValue().
Referenced by emitBinaryOperatorLValue(), emitCXXPseudoDestructorExpr(), emitMaterializeTemporaryExpr(), emitMemberExpr(), emitStmt(), and emitVariablyModifiedType().
void CIRGenFunction::emitImplicitAssignmentOperatorBody | ( | FunctionArgList & | args | ) |
Definition at line 658 of file CIRGenClass.cpp.
References cir::MissingFeatures::assignMemcpyizer(), cgm, curGD, emitStmt(), clang::CIRGen::CIRGenModule::errorNYI(), clang::GlobalDecl::getDecl(), cir::MissingFeatures::incrementProfileCounter(), cir::MissingFeatures::runCleanupsScope(), and s.
Referenced by generateCode().
void CIRGenFunction::emitInitializerForField | ( | clang::FieldDecl * | field, |
LValue | lhs, | ||
clang::Expr * | init | ||
) |
Definition at line 487 of file CIRGenClass.cpp.
References cgm, emitExprAsInit(), clang::CIRGen::CIRGenModule::errorNYI(), getEvaluationKind(), clang::FieldDecl::getSourceRange(), clang::ValueDecl::getType(), clang::QualType::isDestructedType(), clang::CIRGen::LValue::isSimple(), cir::MissingFeatures::requiresCleanups(), cir::TEK_Aggregate, cir::TEK_Complex, and cir::TEK_Scalar.
Referenced by emitMemberInitializer().
mlir::LogicalResult CIRGenFunction::emitLabel | ( | const clang::LabelDecl & | d | ) |
Definition at line 519 of file CIRGenStmt.cpp.
References cir::MissingFeatures::ehstackBranches(), cir::MissingFeatures::generateDebugInfo(), getLoc(), clang::NamedDecl::getName(), clang::LabelDecl::getSourceRange(), and cir::MissingFeatures::incrementProfileCounter().
Referenced by emitLabelStmt(), and emitStmtWithResult().
mlir::LogicalResult CIRGenFunction::emitLabelStmt | ( | const clang::LabelStmt & | s | ) |
Definition at line 333 of file CIRGenStmt.cpp.
References emitLabel(), emitStmt(), clang::CIRGen::CIRGenModule::errorNYI(), getCIRGenModule(), getContext(), getLangOpts(), and s.
Referenced by emitSimpleStmt().
RValue CIRGenFunction::emitLoadOfBitfieldLValue | ( | LValue | lv, |
SourceLocation | loc | ||
) |
Definition at line 383 of file CIRGenExpr.cpp.
References cgm, convertType(), clang::CIRGen::CIRGenBuilderTy::createGetBitfield(), clang::CIRGen::RValue::get(), clang::CIRGen::LValue::getBitFieldAddress(), clang::CIRGen::LValue::getBitFieldInfo(), clang::CIRGen::Address::getElementType(), getLoc(), clang::CIRGen::CIRGenModule::getTarget(), clang::CIRGen::LValue::getType(), isAAPCS(), clang::CIRGen::LValue::isVolatile(), clang::CIRGen::LValue::isVolatileQualified(), cir::MissingFeatures::opLoadEmitScalarRangeCheck(), and clang::CIRGen::CIRGenBitFieldInfo::volatileOffset.
Referenced by emitLoadOfLValue().
mlir::Value CIRGenFunction::emitLoadOfComplex | ( | LValue | src, |
SourceLocation | loc | ||
) |
Load a complex number from the specified l-value.
Definition at line 1034 of file CIRGenExprComplex.cpp.
Referenced by emitComplexPrePostIncDec().
RValue CIRGenFunction::emitLoadOfLValue | ( | LValue | lv, |
SourceLocation | loc | ||
) |
Given an expression that represents a value lvalue, this method emits the address of the lvalue, then loads the result as an rvalue, returning the rvalue.
Definition at line 596 of file CIRGenExpr.cpp.
References cgm, clang::CIRGen::CIRGenBuilderTy::createLoad(), emitLoadOfBitfieldLValue(), emitLoadOfScalar(), clang::CIRGen::CIRGenModule::errorNYI(), clang::CIRGen::RValue::get(), getLoc(), clang::CIRGen::LValue::getType(), clang::CIRGen::LValue::getVectorAddress(), clang::CIRGen::LValue::getVectorIdx(), clang::CIRGen::LValue::isBitField(), clang::Type::isConstantMatrixType(), clang::Type::isFunctionType(), clang::CIRGen::LValue::isSimple(), and clang::CIRGen::LValue::isVectorElt().
Address CIRGenFunction::emitLoadOfReference | ( | LValue | refLVal, |
mlir::Location | loc, | ||
LValueBaseInfo * | pointeeBaseInfo | ||
) |
Definition at line 2027 of file CIRGenExpr.cpp.
References cgm, convertTypeForMem(), clang::CIRGen::CIRGenModule::errorNYI(), clang::CIRGen::LValue::getAddress(), clang::CIRGen::Address::getElementType(), clang::CIRGen::CIRGenModule::getNaturalTypeAlignment(), clang::Type::getPointeeType(), clang::CIRGen::Address::getPointer(), clang::CIRGen::LValue::getType(), clang::CIRGen::LValue::isVolatile(), and cir::MissingFeatures::opTBAA().
Referenced by emitLoadOfReferenceLValue().
LValue CIRGenFunction::emitLoadOfReferenceLValue | ( | Address | refAddr, |
mlir::Location | loc, | ||
QualType | refTy, | ||
AlignmentSource | source | ||
) |
Definition at line 2043 of file CIRGenExpr.cpp.
References emitLoadOfReference(), clang::Type::getPointeeType(), clang::CIRGen::LValue::getType(), makeAddrLValue(), and cir::MissingFeatures::opTBAA().
Referenced by emitDeclRefLValue().
mlir::Value CIRGenFunction::emitLoadOfScalar | ( | Address | addr, |
bool | isVolatile, | ||
QualType | ty, | ||
SourceLocation | loc, | ||
LValueBaseInfo | baseInfo | ||
) |
Definition at line 547 of file CIRGenExpr.cpp.
References cgm, cir::MissingFeatures::cirgenABIInfo(), clang::CIRGen::CIRGenBuilderTy::createLoad(), clang::CIRGen::CIRGenModule::errorNYI(), clang::Type::getAs(), clang::CIRGen::Address::getElementType(), getLangOpts(), getLoc(), clang::CIRGen::Address::getPointer(), clang::Type::hasBooleanRepresentation(), clang::Type::isAtomicType(), clang::Type::isBooleanType(), isLValueSuitableForInlineAtomic(), clang::CIRGen::LValue::makeAddr(), cir::MissingFeatures::opLoadEmitScalarRangeCheck(), cir::MissingFeatures::opLoadStoreTbaa(), and cir::MissingFeatures::opLoadStoreThreadLocal().
mlir::Value CIRGenFunction::emitLoadOfScalar | ( | LValue | lvalue, |
SourceLocation | loc | ||
) |
EmitLoadOfScalar - Load a scalar value from an address, taking care to appropriately convert from the memory representation to the LLVM value representation.
The l-value must be a simple l-value.
Definition at line 585 of file CIRGenExpr.cpp.
References emitLoadOfScalar(), clang::CIRGen::LValue::getAddress(), clang::CIRGen::LValue::getBaseInfo(), clang::CIRGen::LValue::getType(), clang::CIRGen::LValue::isVolatile(), cir::MissingFeatures::opLoadStoreNontemporal(), and cir::MissingFeatures::opLoadStoreTbaa().
Referenced by convertTempToRValue(), emitLoadOfLValue(), and emitLoadOfScalar().
LValue clang::CIRGen::CIRGenFunction::emitLValue | ( | const clang::Expr * | e | ) |
Emit code to compute a designator that specifies the location of the expression.
FIXME: document this function better.
Definition at line 759 of file CIRGenFunction.cpp.
References cgm, emitArraySubscriptExpr(), emitBinaryOperatorLValue(), emitCallExprLValue(), emitCastLValue(), emitComplexCompoundAssignmentLValue(), emitCompoundAssignmentLValue(), emitCompoundLiteralLValue(), emitDeclRefLValue(), emitLValue(), emitMaterializeTemporaryExpr(), emitMemberExpr(), emitStringLiteralLValue(), emitUnaryOpLValue(), clang::CIRGen::CIRGenModule::errorNYI(), clang::Type::getAs(), getCIRGenModule(), clang::Stmt::getSourceRange(), clang::Stmt::getStmtClass(), clang::Stmt::getStmtClassName(), clang::Expr::getType(), and clang::Type::isAnyComplexType().
Referenced by clang::CIRGen::CIRGenFunction::OpaqueValueMappingData::bind(), emitArraySubscriptExpr(), emitArrayToPointerDecay(), emitBinaryOperatorLValue(), emitCallArg(), emitCallee(), emitCastLValue(), emitCXXMemberOrOperatorMemberCallExpr(), emitDeclRefLValue(), emitIgnoredExpr(), emitLValue(), emitMemberExpr(), emitPointerWithAlignment(), emitReferenceBindingToExpr(), emitUnaryOpLValue(), and emitVAListRef().
Definition at line 415 of file CIRGenExpr.cpp.
References cgm, clang::CIRGen::CIRGenBuilderTy::createElementBitCast(), getAddrOfBitFieldStorage(), clang::CIRGen::LValueBaseInfo::getAlignmentSource(), clang::CIRGen::LValue::getBaseInfo(), clang::CIRGen::CIRGenRecordLayout::getBitFieldInfo(), clang::CIRGen::CIRGenRecordLayout::getCIRFieldNo(), clang::CIRGen::CIRGenTypes::getCIRGenRecordLayout(), clang::CIRGen::Address::getElementType(), getLoc(), clang::Decl::getLocation(), clang::FieldDecl::getParent(), clang::ValueDecl::getType(), clang::CIRGen::CIRGenModule::getTypes(), clang::CIRGen::LValue::getVRQualifiers(), clang::CIRGen::LValue::makeBitfield(), cir::MissingFeatures::opTBAA(), cir::MissingFeatures::preservedAccessIndexRegion(), clang::CIRGen::CIRGenBitFieldInfo::storageType, and clang::QualType::withCVRQualifiers().
Referenced by emitLValueForField().
LValue CIRGenFunction::emitLValueForField | ( | LValue | base, |
const clang::FieldDecl * | field | ||
) |
Definition at line 439 of file CIRGenExpr.cpp.
References clang::Qualifiers::addCVRQualifiers(), cgm, emitAddrOfFieldStorage(), emitLValueForBitField(), clang::CIRGen::CIRGenModule::errorNYI(), clang::CIRGen::LValue::getAddress(), clang::CIRGen::LValueBaseInfo::getAlignmentSource(), clang::CIRGen::LValue::getBaseInfo(), clang::CIRGen::CIRGenRecordLayout::getCIRFieldNo(), clang::CIRGen::CIRGenTypes::getCIRGenRecordLayout(), clang::CIRGen::CIRGenModule::getCodeGenOpts(), clang::CIRGen::getFieldAlignmentSource(), clang::FieldDecl::getFieldIndex(), clang::NamedDecl::getName(), clang::Qualifiers::getObjCGCAttr(), clang::FieldDecl::getParent(), clang::CIRGen::LValue::getQuals(), clang::FieldDecl::getSourceRange(), clang::ValueDecl::getType(), clang::CIRGen::CIRGenModule::getTypes(), clang::CIRGen::LValue::getVRQualifiers(), clang::Decl::hasAttr(), clang::FieldDecl::isBitField(), clang::Type::isReferenceType(), clang::TagDecl::isUnion(), cir::MissingFeatures::lambdaFieldToName(), makeAddrLValue(), cir::MissingFeatures::opTBAA(), cir::MissingFeatures::preservedAccessIndexRegion(), and clang::Qualifiers::Weak.
Referenced by emitLValueForFieldInitialization(), and emitMemberExpr().
LValue CIRGenFunction::emitLValueForFieldInitialization | ( | LValue | base, |
const clang::FieldDecl * | field, | ||
llvm::StringRef | fieldName | ||
) |
Like emitLValueForField, excpet that if the Field is a reference, this will return the address of the reference and not the address of the value stored in the reference.
Definition at line 501 of file CIRGenExpr.cpp.
References cgm, convertTypeForMem(), clang::CIRGen::CIRGenBuilderTy::createElementBitCast(), emitAddrOfFieldStorage(), emitLValueForField(), clang::CIRGen::LValue::getAddress(), clang::CIRGen::LValueBaseInfo::getAlignmentSource(), clang::CIRGen::LValue::getBaseInfo(), clang::CIRGen::CIRGenRecordLayout::getCIRFieldNo(), clang::CIRGen::CIRGenTypes::getCIRGenRecordLayout(), clang::CIRGen::getFieldAlignmentSource(), getLoc(), clang::FieldDecl::getParent(), clang::FieldDecl::getSourceRange(), clang::ValueDecl::getType(), clang::CIRGen::CIRGenModule::getTypes(), clang::Type::isReferenceType(), makeAddrLValue(), and cir::MissingFeatures::opTBAA().
Referenced by emitLValueForAnyFieldInitialization().
LValue CIRGenFunction::emitMaterializeTemporaryExpr | ( | const MaterializeTemporaryExpr * | e | ) |
Definition at line 1323 of file CIRGenExpr.cpp.
References cgm, createReferenceTemporary(), clang::CIRGen::Decl, emitAnyExprToMem(), emitIgnoredExpr(), cir::MissingFeatures::emitLifetimeMarkers(), clang::CIRGen::CIRGenModule::errorNYI(), clang::MaterializeTemporaryExpr::getExtendingDecl(), clang::QualType::getObjCLifetime(), clang::Stmt::getSourceRange(), clang::MaterializeTemporaryExpr::getSubExpr(), clang::Expr::getType(), makeAddrLValue(), clang::Qualifiers::OCL_ExplicitNone, clang::Qualifiers::OCL_None, pushTemporaryCleanup(), and clang::Expr::skipRValueSubobjectAdjustments().
Referenced by emitLValue().
LValue CIRGenFunction::emitMemberExpr | ( | const MemberExpr * | e | ) |
Definition at line 1161 of file CIRGenExpr.cpp.
References cgm, emitDeclRefLValue(), emitIgnoredExpr(), emitLValue(), emitLValueForField(), emitPointerWithAlignment(), clang::CIRGen::CIRGenModule::errorNYI(), clang::MemberExpr::getBase(), getLangOpts(), clang::MemberExpr::getMemberDecl(), clang::Type::getPointeeType(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::MemberExpr::isArrow(), makeAddrLValue(), cir::MissingFeatures::opTBAA(), cir::MissingFeatures::setObjCGCLValueClass(), tryToConvertMemberExprToDeclRefExpr(), and cir::MissingFeatures::typeChecks().
Referenced by emitLValue(), and getOpenACCDataOperandInfo().
void CIRGenFunction::emitNullabilityCheck | ( | LValue | lhs, |
mlir::Value | rhs, | ||
clang::SourceLocation | loc | ||
) |
Given an assignment *lhs = rhs
, emit a test that checks if rhs
is nonnull, if 1LHS
is marked _Nonnull.
Definition at line 653 of file CIRGenDecl.cpp.
References clang::SanitizerSet::has(), cir::MissingFeatures::sanitizers(), and sanOpts.
void clang::CIRGen::CIRGenFunction::emitNullInitialization | ( | mlir::Location | loc, |
Address | destPtr, | ||
QualType | ty | ||
) |
Definition at line 825 of file CIRGenFunction.cpp.
References cgm, convertType(), clang::CPlusPlus, clang::CIRGen::CIRGenModule::errorNYI(), clang::Type::getAsCXXRecordDecl(), getContext(), clang::CIRGen::Address::getElementType(), getLangOpts(), clang::CIRGen::CIRGenModule::getTypes(), clang::ASTContext::getTypeSizeInChars(), clang::CXXRecordDecl::isEmpty(), clang::CharUnits::isZero(), and clang::CIRGen::CIRGenTypes::isZeroInitializable().
Referenced by emitCXXAggrConstructorCall().
mlir::LogicalResult CIRGenFunction::emitOpenACCAtomicConstruct | ( | const OpenACCAtomicConstruct & | s | ) |
Definition at line 308 of file CIRGenStmtOpenACC.cpp.
References cgm, clang::CIRGen::CIRGenModule::errorNYI(), and s.
Referenced by emitStmt().
mlir::LogicalResult CIRGenFunction::emitOpenACCCacheConstruct | ( | const OpenACCCacheConstruct & | s | ) |
Definition at line 278 of file CIRGenStmtOpenACC.cpp.
References clang::CIRGen::CIRGenFunction::OpenACCDataOperandInfo::beginLoc, clang::CIRGen::CIRGenFunction::OpenACCDataOperandInfo::bounds, getOpenACCDataOperandInfo(), clang::CIRGen::CIRGenFunction::OpenACCDataOperandInfo::name, s, and clang::CIRGen::CIRGenFunction::OpenACCDataOperandInfo::varValue.
Referenced by emitStmt().
mlir::LogicalResult CIRGenFunction::emitOpenACCCombinedConstruct | ( | const OpenACCCombinedConstruct & | s | ) |
Definition at line 220 of file CIRGenStmtOpenACC.cpp.
References getLoc(), clang::KernelsLoop, clang::ParallelLoop, s, and clang::SerialLoop.
Referenced by emitStmt().
mlir::LogicalResult CIRGenFunction::emitOpenACCComputeConstruct | ( | const OpenACCComputeConstruct & | s | ) |
Definition at line 128 of file CIRGenStmtOpenACC.cpp.
References getLoc(), clang::Kernels, clang::Parallel, s, and clang::Serial.
Referenced by emitStmt().
mlir::LogicalResult CIRGenFunction::emitOpenACCDataConstruct | ( | const OpenACCDataConstruct & | s | ) |
Definition at line 151 of file CIRGenStmtOpenACC.cpp.
Referenced by emitStmt().
void CIRGenFunction::emitOpenACCDeclare | ( | const OpenACCDeclareDecl & | d | ) |
Definition at line 19 of file CIRGenDeclOpenACC.cpp.
References clang::CIRGen::CIRGenModule::errorNYI(), getCIRGenModule(), and clang::OpenACCConstructDecl::getSourceRange().
Referenced by emitDecl().
mlir::LogicalResult CIRGenFunction::emitOpenACCEnterDataConstruct | ( | const OpenACCEnterDataConstruct & | s | ) |
Definition at line 253 of file CIRGenStmtOpenACC.cpp.
Referenced by emitStmt().
mlir::LogicalResult CIRGenFunction::emitOpenACCExitDataConstruct | ( | const OpenACCExitDataConstruct & | s | ) |
Definition at line 261 of file CIRGenStmtOpenACC.cpp.
Referenced by emitStmt().
mlir::LogicalResult CIRGenFunction::emitOpenACCHostDataConstruct | ( | const OpenACCHostDataConstruct & | s | ) |
Definition at line 243 of file CIRGenStmtOpenACC.cpp.
Referenced by emitStmt().
mlir::LogicalResult CIRGenFunction::emitOpenACCInitConstruct | ( | const OpenACCInitConstruct & | s | ) |
Definition at line 161 of file CIRGenStmtOpenACC.cpp.
Referenced by emitStmt().
mlir::Value CIRGenFunction::emitOpenACCIntExpr | ( | const Expr * | intExpr | ) |
Definition at line 41 of file CIRGenOpenACC.cpp.
References cgm, emitScalarExpr(), clang::ast_matchers::expr, clang::Stmt::getBeginLoc(), getContext(), clang::CIRGen::CIRGenModule::getLoc(), getMLIRContext(), clang::Expr::getType(), and clang::Type::isSignedIntegerOrEnumerationType().
Referenced by getOpenACCDataOperandInfo().
mlir::LogicalResult CIRGenFunction::emitOpenACCLoopConstruct | ( | const OpenACCLoopConstruct & | s | ) |
Definition at line 56 of file CIRGenStmtOpenACCLoop.cpp.
References emitStmt(), getLoc(), and s.
Referenced by emitStmt().
void CIRGenFunction::emitOpenACCRoutine | ( | const OpenACCRoutineDecl & | d | ) |
Definition at line 23 of file CIRGenDeclOpenACC.cpp.
References clang::CIRGen::CIRGenModule::errorNYI(), getCIRGenModule(), and clang::OpenACCConstructDecl::getSourceRange().
Referenced by emitDecl().
mlir::LogicalResult CIRGenFunction::emitOpenACCSetConstruct | ( | const OpenACCSetConstruct & | s | ) |
Definition at line 169 of file CIRGenStmtOpenACC.cpp.
Referenced by emitStmt().
mlir::LogicalResult CIRGenFunction::emitOpenACCShutdownConstruct | ( | const OpenACCShutdownConstruct & | s | ) |
Definition at line 176 of file CIRGenStmtOpenACC.cpp.
Referenced by emitStmt().
mlir::LogicalResult CIRGenFunction::emitOpenACCUpdateConstruct | ( | const OpenACCUpdateConstruct & | s | ) |
Definition at line 270 of file CIRGenStmtOpenACC.cpp.
Referenced by emitStmt().
mlir::LogicalResult CIRGenFunction::emitOpenACCWaitConstruct | ( | const OpenACCWaitConstruct & | s | ) |
Definition at line 185 of file CIRGenStmtOpenACC.cpp.
References cgm, emitScalarExpr(), clang::ast_matchers::expr, getContext(), clang::CIRGen::CIRGenModule::getLoc(), getLoc(), getMLIRContext(), and s.
Referenced by emitStmt().
mlir::Value CIRGenFunction::emitOpOnBoolExpr | ( | mlir::Location | loc, |
const clang::Expr * | cond | ||
) |
TODO(cir): see EmitBranchOnBoolExpr for extra ideas).
Definition at line 1840 of file CIRGenExpr.cpp.
References b, cgm, createDummyValue(), emitOpOnBoolExpr(), emitScalarConversion(), emitScalarExpr(), clang::CIRGen::CIRGenModule::errorNYI(), evaluateExprAsBool(), cir::MissingFeatures::generateDebugInfo(), getContext(), clang::Expr::getType(), clang::Expr::IgnoreParens(), cir::MissingFeatures::insertBuiltinUnpredictable(), cir::MissingFeatures::pgoUse(), and cir::MissingFeatures::shouldReverseUnaryCondOnBoolExpr().
Referenced by emitIfOnBoolExpr(), and emitOpOnBoolExpr().
Address CIRGenFunction::emitPointerWithAlignment | ( | const clang::Expr * | expr, |
LValueBaseInfo * | baseInfo = nullptr |
||
) |
Given an expression with a pointer type, emit the value and compute our best estimate of the alignment of the pointee.
Given an expression of pointer type, try to derive a more accurate bound on the alignment of the pointer.
One reasonable way to use this information is when there's a language guarantee that the pointer must be aligned to some stricter value, and we're simply trying to ensure that sufficiently obvious uses of under- aligned objects don't get miscompiled; for example, a placement new into the address of a local variable. In such a case, it's quite reasonable to just ignore the returned alignment when it isn't from an explicit source.
Definition at line 67 of file CIRGenExpr.cpp.
References cir::MissingFeatures::addressIsKnownNonNull(), cir::MissingFeatures::addressSpace(), cgm, convertTypeForMem(), clang::CIRGen::CIRGenBuilderTy::createElementBitCast(), clang::CIRGen::Decl, emitArrayToPointerDecay(), clang::CIRGen::CIRGenModule::emitExplicitCastExprType(), emitLValue(), emitPointerWithAlignment(), emitScalarExpr(), clang::CIRGen::CIRGenModule::errorNYI(), clang::ast_matchers::expr, clang::CIRGen::LValue::getAddress(), getAddressOfBaseClass(), clang::CIRGen::LValueBaseInfo::getAlignmentSource(), clang::CIRGen::LValue::getBaseInfo(), getBuilder(), clang::CIRGen::Address::getElementType(), getLoc(), clang::CIRGen::CIRGenModule::getNaturalTypeAlignment(), clang::CIRGen::Address::getPointer(), clang::CIRGen::Address::invalid(), makeNaturalAddressForPointer(), clang::CIRGen::LValueBaseInfo::mergeForCast(), cir::MissingFeatures::opTBAA(), cir::MissingFeatures::sanitizers(), and shouldNullCheckClassCastValue().
Referenced by emitArraySubscriptExpr(), emitAtomicExpr(), emitCXXMemberOrOperatorMemberCallExpr(), emitMemberExpr(), emitPointerWithAlignment(), emitUnaryOpLValue(), and emitVAListRef().
Definition at line 776 of file CIRGenExprComplex.cpp.
Definition at line 1347 of file CIRGenExprScalar.cpp.
References ::ScalarExprEmitter, and clang::QualType::isNull().
mlir::Value CIRGenFunction::emitPromotedValue | ( | mlir::Value | result, |
QualType | promotionType | ||
) |
Definition at line 733 of file CIRGenExprComplex.cpp.
References convertType(), and cir::CIRBaseBuilderTy::createCast().
Emits a reference binding to the passed in expression.
Definition at line 2016 of file CIRGenExpr.cpp.
References emitLValue(), clang::CIRGen::RValue::get(), clang::CIRGen::LValue::getPointer(), clang::CIRGen::LValue::isSimple(), and cir::MissingFeatures::sanitizers().
Referenced by emitCallArg(), emitExprAsInit(), and emitReturnStmt().
mlir::LogicalResult CIRGenFunction::emitReturnStmt | ( | const clang::ReturnStmt & | s | ) |
Definition at line 442 of file CIRGenStmt.cpp.
References cgm, curGD, curLexScope, currentCleanupStackDepth, ehStack, emitAnyExpr(), emitReferenceBindingToExpr(), emitScalarExpr(), clang::CIRGen::CIRGenModule::errorNYI(), fnRetAlloca, getCIRGenModule(), getContext(), clang::GlobalDecl::getDecl(), getEvaluationKind(), getLangOpts(), getLoc(), clang::CIRGen::CIRGenFunction::LexicalScope::getOrCreateRetBlock(), clang::Expr::getType(), clang::CIRGen::RValue::getValue(), clang::Type::isVoidType(), s, clang::CIRGen::EHScopeStack::stable_begin(), and cir::TEK_Scalar.
Referenced by emitSimpleStmt().
Definition at line 61 of file CIRGenBuiltin.cpp.
References emitScalarExpr(), clang::CIRGen::RValue::get(), clang::CallExpr::getArg(), getLoc(), clang::Stmt::getSourceRange(), and cir::MissingFeatures::msvcBuiltins().
Referenced by emitBuiltinExpr().
LValue CIRGenFunction::emitScalarCompoundAssignWithComplex | ( | const CompoundAssignOperator * | e, |
mlir::Value & | result | ||
) |
Definition at line 1096 of file CIRGenExprComplex.cpp.
References getComplexOp(), clang::BinaryOperator::getOpcode(), and clang::CIRGen::RValue::getValue().
mlir::Value CIRGenFunction::emitScalarConstant | ( | const ConstantEmission & | constant, |
Expr * | e | ||
) |
Definition at line 2209 of file CIRGenExpr.cpp.
References cgm, clang::CIRGen::CIRGenModule::errorNYI(), cir::CIRBaseBuilderTy::getConstant(), getLoc(), clang::Stmt::getSourceRange(), clang::CIRGen::CIRGenFunction::ConstantEmission::getValue(), and clang::CIRGen::CIRGenFunction::ConstantEmission::isReference().
mlir::Value CIRGenFunction::emitScalarConversion | ( | mlir::Value | src, |
clang::QualType | srcType, | ||
clang::QualType | dstType, | ||
clang::SourceLocation | loc | ||
) |
Emit a conversion from the specified type to the specified destination type, both of which are CIR scalar types.
Definition at line 1992 of file CIRGenExprScalar.cpp.
References ::ScalarExprEmitter, and hasScalarEvaluationKind().
Referenced by emitComplexToScalarConversion(), emitOpOnBoolExpr(), and evaluateExprAsBool().
mlir::Value CIRGenFunction::emitScalarExpr | ( | const clang::Expr * | e | ) |
Emit the computation of the specified expression of scalar type.
Definition at line 1340 of file CIRGenExprScalar.cpp.
References ::ScalarExprEmitter, clang::Expr::getType(), and hasScalarEvaluationKind().
Referenced by emitAnyExpr(), emitAnyExprToMem(), emitArraySubscriptExpr(), emitAtomicExpr(), emitAtomicInit(), emitBuiltinBitOp(), emitBuiltinExpr(), emitCallee(), emitOpenACCIntExpr(), emitOpenACCWaitConstruct(), emitOpOnBoolExpr(), emitPointerWithAlignment(), emitReturnStmt(), emitRotate(), emitScalarInit(), emitSwitchStmt(), emitUnaryMaybeConstrainedFPBuiltin(), and evaluateExprAsBool().
void CIRGenFunction::emitScalarInit | ( | const clang::Expr * | init, |
mlir::Location | loc, | ||
LValue | lvalue, | ||
bool | capturedByInit = false |
||
) |
Definition at line 473 of file CIRGenDecl.cpp.
References cgm, cir::MissingFeatures::emitNullabilityCheck(), emitScalarExpr(), emitStoreThroughLValue(), clang::CIRGen::CIRGenModule::errorNYI(), clang::CIRGen::RValue::get(), clang::Stmt::getSourceRange(), and cir::MissingFeatures::objCLifetime().
Referenced by emitExprAsInit(), and storeAnyExprIntoOneUnit().
mlir::Value CIRGenFunction::emitScalarPrePostIncDec | ( | const UnaryOperator * | e, |
LValue | lv, | ||
cir::UnaryOpKind | kind, | ||
bool | isPre | ||
) |
Definition at line 2282 of file CIRGenExprScalar.cpp.
References ::ScalarExprEmitter.
Referenced by emitUnaryOpLValue().
mlir::LogicalResult CIRGenFunction::emitSimpleStmt | ( | const clang::Stmt * | s, |
bool | useCurrentScope | ||
) |
Definition at line 295 of file CIRGenStmt.cpp.
References emitBreakStmt(), emitCompoundStmt(), emitCompoundStmtWithoutScope(), emitContinueStmt(), emitDeclStmt(), emitGotoStmt(), emitLabelStmt(), emitReturnStmt(), emitSwitchCase(), and s.
Referenced by emitStmt().
void CIRGenFunction::emitStaticVarDecl | ( | const VarDecl & | d, |
cir::GlobalLinkageKind | linkage | ||
) |
Definition at line 410 of file CIRGenDecl.cpp.
References addInitializerToStaticVarDecl(), cgm, convertTypeForMem(), cir::CIRBaseBuilderTy::createBitcast(), cir::CIRBaseBuilderTy::createGetGlobal(), cir::MissingFeatures::cudaSupport(), clang::CIRGen::CIRGenModule::errorNYI(), cir::MissingFeatures::generateDebugInfo(), clang::CharUnits::getAsAlign(), clang::CIRGen::CIRGenModule::getCodeGenOpts(), getContext(), clang::ASTContext::getDeclAlign(), clang::VarDecl::getInit(), clang::CIRGen::CIRGenModule::getOrCreateStaticVarDecl(), clang::VarDecl::getSourceRange(), clang::ValueDecl::getType(), clang::Decl::hasAttrs(), clang::Type::isVariablyModifiedType(), localDeclMap, cir::MissingFeatures::sanitizers(), setAddrOfLocalVar(), and clang::CIRGen::CIRGenModule::setStaticLocalDeclAddress().
Referenced by emitVarDecl().
mlir::LogicalResult CIRGenFunction::emitStmt | ( | const clang::Stmt * | s, |
bool | useCurrentScope, | ||
llvm::ArrayRef< const Attr * > | attrs = {} |
||
) |
Definition at line 110 of file CIRGenStmt.cpp.
References clang::ast_matchers::attr, cgm, emitAsmStmt(), emitCXXForRangeStmt(), emitDoStmt(), emitForStmt(), emitIfStmt(), emitIgnoredExpr(), emitOpenACCAtomicConstruct(), emitOpenACCCacheConstruct(), emitOpenACCCombinedConstruct(), emitOpenACCComputeConstruct(), emitOpenACCDataConstruct(), emitOpenACCEnterDataConstruct(), emitOpenACCExitDataConstruct(), emitOpenACCHostDataConstruct(), emitOpenACCInitConstruct(), emitOpenACCLoopConstruct(), emitOpenACCSetConstruct(), emitOpenACCShutdownConstruct(), emitOpenACCUpdateConstruct(), emitOpenACCWaitConstruct(), emitSimpleStmt(), emitSwitchStmt(), emitWhileStmt(), clang::CIRGen::CIRGenModule::errorNYI(), clang::Stmt::NoStmtClass, and s.
Referenced by emitCaseDefaultCascade(), emitCompoundStmtWithoutScope(), emitConstructorBody(), emitCXXForRangeStmt(), emitDestructorBody(), emitForStmt(), emitFunctionBody(), emitIfOnBoolExpr(), emitIfStmt(), emitImplicitAssignmentOperatorBody(), emitLabelStmt(), emitOpenACCLoopConstruct(), emitSwitchBody(), and emitSwitchStmt().
void CIRGenFunction::emitStopPoint | ( | const Stmt * | s | ) |
Build a debug stoppoint if we are emitting debug info.
Definition at line 104 of file CIRGenStmt.cpp.
References cir::MissingFeatures::generateDebugInfo().
Referenced by emitForStmt().
void CIRGenFunction::emitStoreOfComplex | ( | mlir::Location | loc, |
mlir::Value | v, | ||
LValue | dest, | ||
bool | isInit | ||
) |
EmitStoreOfComplex - Store a complex number into the specified l-value.
Definition at line 1029 of file CIRGenExprComplex.cpp.
Referenced by emitComplexPrePostIncDec(), and emitExprAsInit().
void CIRGenFunction::emitStoreOfScalar | ( | mlir::Value | value, |
Address | addr, | ||
bool | isVolatile, | ||
clang::QualType | ty, | ||
bool | isInit = false , |
||
bool | isNontemporal = false |
||
) |
Definition at line 312 of file CIRGenExpr.cpp.
References cgm, cir::MissingFeatures::cirgenABIInfo(), clang::CIRGen::CIRGenBuilderTy::createStore(), currSrcLoc, emitToMemory(), clang::CIRGen::CIRGenModule::errorNYI(), clang::Type::getAs(), clang::CIRGen::Address::getDefiningOp(), clang::CIRGen::Address::getElementType(), getLangOpts(), getMLIRContext(), clang::CIRGen::Address::getPointer(), clang::VarDecl::hasInit(), cir::MissingFeatures::opLoadStoreAtomic(), cir::MissingFeatures::opLoadStoreThreadLocal(), and cir::MissingFeatures::opTBAA().
Referenced by emitStoreOfScalar(), and emitStoreThroughLValue().
Definition at line 536 of file CIRGenExpr.cpp.
References emitStoreOfScalar(), clang::CIRGen::LValue::getAddress(), clang::CIRGen::LValue::getType(), clang::Type::isConstantMatrixType(), and clang::CIRGen::LValue::isVolatile().
Definition at line 365 of file CIRGenExpr.cpp.
References cgm, convertTypeForMem(), clang::CIRGen::CIRGenBuilderTy::createSetBitfield(), clang::CIRGen::CIRGenModule::getCodeGenOpts(), clang::CIRGen::Address::getElementType(), clang::CIRGen::CIRGenModule::getTarget(), clang::CIRGen::RValue::getValue(), isAAPCS(), and clang::CIRGen::CIRGenBitFieldInfo::volatileStorageSize.
Referenced by emitBinaryOperatorLValue(), and emitStoreThroughLValue().
Store the specified rvalue into the specified lvalue, where both are guaranteed to the have the same type, and that type is 'Ty'.
Definition at line 246 of file CIRGenExpr.cpp.
References cgm, clang::CIRGen::CIRGenBuilderTy::createLoad(), clang::CIRGen::CIRGenBuilderTy::createStore(), emitStoreOfScalar(), emitStoreThroughBitfieldLValue(), clang::CIRGen::CIRGenModule::errorNYI(), clang::CIRGen::RValue::getValue(), clang::CIRGen::RValue::isScalar(), and cir::MissingFeatures::opLoadStoreObjC().
Referenced by emitAnyExprToMem(), emitAutoVarInit(), emitBinaryOperatorLValue(), emitExprAsInit(), and emitScalarInit().
LValue CIRGenFunction::emitStringLiteralLValue | ( | const StringLiteral * | e | ) |
Definition at line 994 of file CIRGenExpr.cpp.
References cgm, cir::CIRBaseBuilderTy::createGetGlobal(), clang::CIRGen::Decl, clang::CharUnits::fromQuantity(), clang::CIRGen::CIRGenModule::getGlobalForStringLiteral(), getLoc(), clang::Stmt::getSourceRange(), clang::Expr::getType(), and makeAddrLValue().
Referenced by emitLValue().
mlir::LogicalResult CIRGenFunction::emitSwitchBody | ( | const clang::Stmt * | s | ) |
Definition at line 941 of file CIRGenStmt.cpp.
References c, clang::ast_matchers::compoundStmt, emitStmt(), emitSwitchCase(), s, and clang::ast_matchers::switchCase.
Referenced by emitSwitchStmt().
mlir::LogicalResult CIRGenFunction::emitSwitchCase | ( | const clang::SwitchCase & | s, |
bool | buildingTopLevelCase | ||
) |
Definition at line 669 of file CIRGenStmt.cpp.
References condTypeStack, emitCaseStmt(), emitDefaultStmt(), and s.
Referenced by emitSimpleStmt(), and emitSwitchBody().
mlir::LogicalResult CIRGenFunction::emitSwitchStmt | ( | const clang::SwitchStmt & | s | ) |
Definition at line 978 of file CIRGenStmt.cpp.
References b, condTypeStack, cir::MissingFeatures::constantFoldSwitchStatement(), curLexScope, cir::MissingFeatures::emitCondLikelihoodViaExpectIntrinsic(), emitDecl(), emitScalarExpr(), emitStmt(), emitSwitchBody(), getLoc(), cir::MissingFeatures::insertBuiltinUnpredictable(), cir::MissingFeatures::pgoUse(), s, clang::CIRGen::CIRGenFunction::LexicalScope::setAsSwitch(), and terminateBody().
Referenced by emitStmt().
mlir::Value clang::CIRGen::CIRGenFunction::emitTernaryOnBoolExpr | ( | const clang::Expr * | cond, |
mlir::Location | loc, | ||
const clang::Stmt * | thenS, | ||
const clang::Stmt * | elseS | ||
) |
mlir::Value CIRGenFunction::emitToMemory | ( | mlir::Value | value, |
clang::QualType | ty | ||
) |
Given a value and its clang type, returns the value casted to its memory representation.
Note: CIR defers most of the special casting to the final lowering passes to conserve the high level information.
Definition at line 529 of file CIRGenExpr.cpp.
Referenced by emitStoreOfScalar().
void CIRGenFunction::emitTrap | ( | mlir::Location | loc, |
bool | createNewBlock | ||
) |
Emit a trap instruction, which is used to abort the program in an abnormal way, usually for debugging purposes.
createNewBlock
indicates whether to create a new block for the IR builder. Since the cir.trap
operation is a terminator, operations that follow a trap cannot be emitted after cir.trap
in the same block. To ensure these operations get emitted successfully, you need to create a new dummy block and set the insertion point there before continuing from the trap operation.
Definition at line 2055 of file CIRGenExpr.cpp.
Referenced by emitBuiltinExpr().
LValue CIRGenFunction::emitUnaryOpLValue | ( | const clang::UnaryOperator * | e | ) |
Definition at line 737 of file CIRGenExpr.cpp.
References clang::Qualifiers::addQualifiers(), cir::MissingFeatures::addressSpace(), clang::Type::castAs(), cgm, clang::CIRGen::CIRGenBuilderTy::createComplexImagPtr(), clang::CIRGen::CIRGenBuilderTy::createComplexRealPtr(), emitLValue(), emitPointerWithAlignment(), emitScalarPrePostIncDec(), clang::CIRGen::CIRGenModule::errorNYI(), clang::CIRGen::LValue::getAddress(), clang::ASTContext::getCanonicalType(), getContext(), clang::CIRGen::Address::getDefiningOp(), clang::CIRGen::Address::getElementType(), clang::UnaryOperator::getExprLoc(), getLoc(), getMLIRContext(), clang::UnaryOperator::getOpcode(), clang::Type::getPointeeType(), clang::CIRGen::LValue::getQuals(), clang::Stmt::getSourceRange(), clang::UnaryOperator::getSubExpr(), clang::Expr::getType(), clang::Type::isAnyComplexType(), clang::Type::isArithmeticType(), clang::UnaryOperator::isIncrementOp(), clang::QualType::isNull(), clang::UnaryOperator::isPrefix(), clang::CIRGen::LValue::isSimple(), makeAddrLValue(), cir::MissingFeatures::opTBAA(), and cir::MissingFeatures::setNonGC().
Referenced by emitLValue().
mlir::Value CIRGenFunction::emitUnPromotedValue | ( | mlir::Value | result, |
QualType | unPromotionType | ||
) |
Definition at line 725 of file CIRGenExprComplex.cpp.
References convertType(), and cir::CIRBaseBuilderTy::createCast().
void CIRGenFunction::emitUnreachable | ( | clang::SourceLocation | loc, |
bool | createNewBlock | ||
) |
Emit a reached-unreachable diagnostic if loc
is valid and runtime checking is enabled.
Otherwise, just emit an unreachable instruction. createNewBlock
indicates whether to create a new block for the IR builder. Since the cir.unreachable
operation is a terminator, operations that follow an unreachable point cannot be emitted after cir.unreachable
in the same block. To ensure these operations get emitted successfully, you need to create a dummy block and set the insertion point there before continuing from the unreachable point.
Definition at line 2061 of file CIRGenExpr.cpp.
References getLoc(), and cir::MissingFeatures::sanitizers().
Referenced by emitBuiltinExpr().
mlir::Value CIRGenFunction::emitVAArg | ( | VAArgExpr * | ve | ) |
Generate code to get an argument from the passed in pointer and update it accordingly.
ve | The VAArgExpr for which to generate code. |
vaListAddr | Receives a reference to the va_list as emitted by either emitVAListRef or emitMSVAListRef . |
Definition at line 408 of file CIRGenBuiltin.cpp.
References cgm, convertType(), emitVAListRef(), clang::Expr::getExprLoc(), clang::CIRGen::CIRGenModule::getLoc(), clang::CIRGen::Address::getPointer(), clang::VAArgExpr::getSubExpr(), clang::Expr::getType(), cir::MissingFeatures::msabi(), clang::ast_matchers::type, and cir::MissingFeatures::vlas().
void CIRGenFunction::emitVAEnd | ( | mlir::Value | vaList | ) |
Emits the end of a CIR variable-argument operation (cir.va_start
)
vaList | A reference to the va_list as emitted by either emitVAListRef or emitMSVAListRef . |
Definition at line 401 of file CIRGenBuiltin.cpp.
Referenced by emitBuiltinExpr().
Build a "reference" to a va_list; this is either the address or the value of the expression, depending on how va_list is defined.
Definition at line 1070 of file CIRGenFunction.cpp.
References emitLValue(), emitPointerWithAlignment(), clang::CIRGen::LValue::getAddress(), and getContext().
Referenced by emitBuiltinExpr(), and emitVAArg().
void CIRGenFunction::emitVarDecl | ( | const clang::VarDecl & | d | ) |
This method handles emission of any variable declaration inside a function, including static vars etc.
Definition at line 211 of file CIRGenDecl.cpp.
References cgm, emitAutoVarDecl(), emitStaticVarDecl(), clang::CIRGen::CIRGenModule::errorNYI(), clang::QualType::getAddressSpace(), clang::CIRGen::CIRGenModule::getCIRLinkageVarDefinition(), clang::VarDecl::getSourceRange(), clang::VarDecl::getStorageDuration(), clang::ValueDecl::getType(), clang::VarDecl::hasExternalStorage(), clang::VarDecl::hasLocalStorage(), clang::Type::isSamplerT(), clang::opencl_local, and clang::SD_Automatic.
Referenced by emitDecl(), and maybeEmitDeferredVarDeclInit().
void clang::CIRGen::CIRGenFunction::emitVariablyModifiedType | ( | QualType | ty | ) |
Definition at line 949 of file CIRGenFunction.cpp.
References cgm, emitIgnoredExpr(), clang::CIRGen::CIRGenModule::errorNYI(), getContext(), clang::Type::getTypeClass(), and clang::ast_matchers::type.
Referenced by clang::CIRGen::CIRGenModule::emitExplicitCastExprType().
void CIRGenFunction::emitVAStart | ( | mlir::Value | vaList, |
mlir::Value | count | ||
) |
Emits the start of a CIR variable-argument operation (cir.va_start
)
vaList | A reference to the va_list as emitted by either emitVAListRef or emitMSVAListRef . |
count | The number of arguments in vaList |
Definition at line 395 of file CIRGenBuiltin.cpp.
Referenced by emitBuiltinExpr().
mlir::LogicalResult CIRGenFunction::emitWhileStmt | ( | const clang::WhileStmt & | s | ) |
Definition at line 885 of file CIRGenStmt.cpp.
References b, cir::CIRBaseBuilderTy::createWhile(), getLoc(), cir::MissingFeatures::loopInfoStack(), cir::MissingFeatures::requiresCleanups(), s, and terminateBody().
Referenced by emitStmt().
mlir::Value CIRGenFunction::evaluateExprAsBool | ( | const clang::Expr * | e | ) |
Perform the usual unary conversions on the specified expression and compare the result against zero, returning an Int1Ty value.
Definition at line 718 of file CIRGenExpr.cpp.
References clang::ASTContext::BoolTy, cir::MissingFeatures::cgFPOptionsRAII(), cgm, createDummyValue(), emitScalarConversion(), emitScalarExpr(), clang::CIRGen::CIRGenModule::errorNYI(), clang::Type::getAs(), getContext(), clang::Expr::getExprLoc(), getLoc(), clang::Stmt::getSourceRange(), clang::Expr::getType(), clang::Type::isAnyComplexType(), and cir::MissingFeatures::pgoUse().
Referenced by emitCheckedArgForAssume(), and emitOpOnBoolExpr().
void clang::CIRGen::CIRGenFunction::finishFunction | ( | SourceLocation | endLoc | ) |
Definition at line 471 of file CIRGenFunction.cpp.
References ehStack, cir::MissingFeatures::generateDebugInfo(), popCleanupBlocks(), prologueCleanupDepth, and clang::CIRGen::EHScopeStack::stable_begin().
Referenced by generateCode().
cir::FuncOp clang::CIRGen::CIRGenFunction::generateCode | ( | clang::GlobalDecl | gd, |
cir::FuncOp | fn, | ||
cir::FuncType | funcType | ||
) |
Definition at line 508 of file CIRGenFunction.cpp.
References buildFunctionArgList(), clang::CUDA, curGD, emitConstructorBody(), emitDestructorBody(), emitFunctionBody(), emitImplicitAssignmentOperatorBody(), clang::CIRGen::eraseEmptyAndUnusedBlocks(), clang::CIRGen::CIRGenModule::errorNYI(), finishFunction(), clang::SourceRange::getBegin(), getCIRGenModule(), clang::GlobalDecl::getDecl(), clang::SourceRange::getEnd(), getLangOpts(), getLoc(), getMLIRContext(), clang::Stmt::getSourceRange(), clang::SourceLocation::isValid(), startFunction(), and symbolTable.
Referenced by clang::CIRGen::CIRGenModule::emitGlobalFunctionDefinition().
Address CIRGenFunction::getAddressOfBaseClass | ( | Address | value, |
const CXXRecordDecl * | derived, | ||
llvm::iterator_range< CastExpr::path_const_iterator > | path, | ||
bool | nullCheckValue, | ||
SourceLocation | loc | ||
) |
Definition at line 726 of file CIRGenClass.cpp.
References cir::MissingFeatures::addressSpace(), cgm, clang::CIRGen::CIRGenModule::computeNonVirtualBaseClassOffset(), convertType(), clang::CIRGen::CIRGenBuilderTy::createBaseClassAddr(), clang::CIRGen::CIRGenModule::errorNYI(), getLoc(), clang::CharUnits::getQuantity(), clang::CIRGen::Address::invalid(), clang::CharUnits::isZero(), cir::MissingFeatures::sanitizers(), and clang::CIRGen::Address::withElementType().
Referenced by emitCastLValue(), and emitPointerWithAlignment().
Address CIRGenFunction::getAddressOfDirectBaseInCompleteClass | ( | mlir::Location | loc, |
Address | thisAddr, | ||
const CXXRecordDecl * | derived, | ||
const CXXRecordDecl * | base, | ||
bool | baseIsVirtual | ||
) |
Convert the given pointer to a complete class to the given direct base.
Gets the address of a direct base class within a complete object.
This should only be used for (1) non-virtual bases or (2) virtual bases when the type is known to be complete (e.g. in complete destructors).
The object pointed to by 'thisAddr' is assumed to be non-null.
Definition at line 159 of file CIRGenClass.cpp.
References convertType(), clang::CIRGen::CIRGenBuilderTy::createBaseClassAddr(), clang::ASTContext::getASTRecordLayout(), clang::ASTRecordLayout::getBaseClassOffset(), getContext(), clang::CIRGen::Address::getElementType(), clang::CharUnits::getQuantity(), and clang::ASTRecordLayout::getVBaseClassOffset().
Referenced by emitBaseInitializer().
Address CIRGenFunction::getAddrOfBitFieldStorage | ( | LValue | base, |
const clang::FieldDecl * | field, | ||
mlir::Type | fieldType, | ||
unsigned | index | ||
) |
Definition at line 400 of file CIRGenExpr.cpp.
References clang::CharUnits::alignmentAtOffset(), cgm, cir::CIRBaseBuilderTy::createGetMember(), clang::CharUnits::fromQuantity(), clang::CIRGen::LValue::getAddress(), clang::CIRGen::LValue::getAlignment(), getBuilder(), clang::CIRGen::CIRGenModule::getDataLayout(), clang::CIRGen::Address::getElementType(), clang::FieldDecl::getFieldIndex(), getLoc(), clang::Decl::getLocation(), clang::NamedDecl::getName(), clang::CIRGen::LValue::getPointer(), and cir::CIRDataLayout::layout.
Referenced by emitLValueForBitField().
|
inline |
Return the address of a local variable.
Definition at line 650 of file CIRGenFunction.h.
References localDeclMap.
Referenced by emitDelegateCallArg(), and clang::CIRGen::CIRGenCXXABI::loadIncomingCXXThis().
|
inline |
Definition at line 97 of file CIRGenFunction.h.
Referenced by emitAtomicOp(), emitBuiltinBitOp(), emitCallLikeOp(), emitCXXNewAllocSize(), emitFunctionDeclLValue(), emitGlobalVarDeclLValue(), emitPointerArithmetic(), emitPointerWithAlignment(), emitUnaryMaybeConstrainedFPBuiltin(), clang::CIRGen::CIRGenFunction::RunCleanupsScope::forceCleanup(), getAddrOfBitFieldStorage(), and clang::CIRGen::CIRGenCXXABI::loadIncomingCXXThis().
|
inline |
Definition at line 99 of file CIRGenFunction.h.
References cgm.
Referenced by collectClobbers(), emitArraySubscriptPtr(), emitLabelStmt(), emitLValue(), emitOpenACCDeclare(), emitOpenACCRoutine(), emitReturnStmt(), and generateCode().
|
inline |
Definition at line 100 of file CIRGenFunction.h.
References cgm.
|
inline |
Definition at line 95 of file CIRGenFunction.h.
References cgm, and clang::CIRGen::CIRGenModule::getASTContext().
Referenced by addInitializerToStaticVarDecl(), constantFoldsToSimpleInteger(), convertType(), createDummyValue(), createMemTemp(), emitAddrOfFieldStorage(), emitArrayLength(), emitArraySubscriptExpr(), emitArraySubscriptPtr(), emitAsmStmt(), emitAtomicExpr(), emitAutoVarAlloca(), emitAutoVarCleanups(), emitAutoVarInit(), emitBaseInitializer(), emitBuiltinExpr(), emitCall(), emitCallExprLValue(), emitCaseStmt(), emitCXXAggrConstructorCall(), emitCXXConstructExpr(), emitCXXNewAllocSize(), emitCXXNewExpr(), emitDeclRefLValue(), emitDelegateCallArg(), emitDestroy(), emitFunctionDeclLValue(), emitGlobalVarDeclLValue(), emitLabelStmt(), emitMemberInitializer(), emitNullInitialization(), emitOpenACCIntExpr(), emitOpenACCWaitConstruct(), emitOpOnBoolExpr(), emitPointerArithmetic(), emitReturnStmt(), emitStaticVarDecl(), emitUnaryOpLValue(), emitVAListRef(), emitVariablyModifiedType(), evaluateExprAsBool(), getAddressOfDirectBaseInCompleteClass(), getLoc(), getOpenACCDataOperandInfo(), getOverlapForBaseInit(), getVTablePointers(), initializeVTablePointer(), isCheapEnoughToEvaluateUnconditionally(), startFunction(), tryEmitAsConstant(), and tryToConvertMemberExprToDeclRefExpr().
std::string clang::CIRGen::CIRGenFunction::getCounterAggTmpAsString | ( | ) |
Definition at line 821 of file CIRGenFunction.cpp.
References counterAggTmp, and clang::CIRGen::getVersionedTmpName().
Referenced by emitAnyExpr(), emitAnyExprToTemp(), and emitCall().
std::string clang::CIRGen::CIRGenFunction::getCounterRefTmpAsString | ( | ) |
Definition at line 817 of file CIRGenFunction.cpp.
References counterRefTmp, and clang::CIRGen::getVersionedTmpName().
Referenced by createReferenceTemporary().
|
inline |
Definition at line 102 of file CIRGenFunction.h.
References curFn.
CIRGenFunction::Destroyer * CIRGenFunction::getDestroyer | ( | clang::QualType::DestructionKind | kind | ) |
Definition at line 760 of file CIRGenDecl.cpp.
References cgm, destroyCXXObject, clang::QualType::DK_cxx_destructor, clang::QualType::DK_none, clang::QualType::DK_nontrivial_c_struct, clang::QualType::DK_objc_strong_lifetime, clang::QualType::DK_objc_weak_lifetime, and clang::CIRGen::CIRGenModule::errorNYI().
Referenced by emitAutoVarTypeCleanup().
|
static |
Return the cir::TypeEvaluationKind of QualType type
.
Definition at line 36 of file CIRGenFunction.cpp.
References cir::TEK_Aggregate, cir::TEK_Complex, cir::TEK_Scalar, and clang::ast_matchers::type.
Referenced by convertTempToRValue(), emitAnyExpr(), emitAnyExprToMem(), emitBinaryOperatorLValue(), emitCall(), emitExprAsInit(), emitInitializerForField(), emitReturnStmt(), hasAggregateEvaluationKind(), hasScalarEvaluationKind(), and storeAnyExprIntoOneUnit().
|
inline |
Definition at line 351 of file CIRGenFunction.h.
References cgm, and clang::CIRGen::CIRGenModule::getLangOpts().
Referenced by emitArraySubscriptExpr(), emitBinaryOperatorLValue(), emitCall(), emitComplexAssignmentLValue(), emitComplexPrePostIncDec(), emitCompoundLiteralLValue(), emitCXXAggrConstructorCall(), emitCXXConstructExpr(), emitCXXMemberOrOperatorMemberCallExpr(), emitDelegateCallArg(), emitGlobalVarDeclLValue(), emitLabelStmt(), emitLoadOfScalar(), emitMemberExpr(), emitNullInitialization(), emitReturnStmt(), emitStoreOfScalar(), and generateCode().
mlir::Location clang::CIRGen::CIRGenFunction::getLoc | ( | clang::SourceLocation | srcLoc | ) |
Helpers to convert Clang's SourceLocation to a MLIR Location.
Definition at line 103 of file CIRGenFunction.cpp.
References currSrcLoc, clang::PresumedLoc::getColumn(), getContext(), clang::PresumedLoc::getFilename(), clang::PresumedLoc::getLine(), clang::SourceManager::getPresumedLoc(), clang::ASTContext::getSourceManager(), and clang::SourceLocation::isValid().
Referenced by createReferenceTemporary(), emitAddrOfFieldStorage(), emitAggExprToLValue(), emitAlignmentAssumption(), emitAnyExpr(), emitAnyExprToTemp(), emitAsmStmt(), emitAtomicExpr(), emitAtomicInit(), emitAtomicOp(), emitAutoVarAlloca(), emitAutoVarInit(), emitBinaryOperatorLValue(), emitBreakStmt(), emitBuiltinBitOp(), emitBuiltinExpr(), emitCall(), emitCaseDefaultCascade(), emitComplexExprIntoLValue(), emitComplexPrePostIncDec(), emitComplexToScalarConversion(), emitCompoundLiteralLValue(), emitCompoundStmt(), emitContinueStmt(), emitCtorPrologue(), emitCXXConstructorCall(), emitCXXDestructorCall(), emitCXXForRangeStmt(), emitCXXMemberOrOperatorCall(), emitCXXNewAllocSize(), emitCXXNewExpr(), emitDeclRefLValue(), emitDelegateCallArg(), emitDoStmt(), emitExprAsInit(), emitForStmt(), emitFunctionDeclLValue(), emitGotoStmt(), emitIfOnBoolExpr(), emitIfStmt(), emitLabel(), emitLoadOfBitfieldLValue(), emitLoadOfLValue(), emitLoadOfScalar(), emitLValueForBitField(), emitLValueForFieldInitialization(), emitOpenACCCombinedConstruct(), emitOpenACCComputeConstruct(), emitOpenACCDataConstruct(), emitOpenACCEnterDataConstruct(), emitOpenACCExitDataConstruct(), emitOpenACCHostDataConstruct(), emitOpenACCInitConstruct(), emitOpenACCLoopConstruct(), emitOpenACCSetConstruct(), emitOpenACCShutdownConstruct(), emitOpenACCUpdateConstruct(), emitOpenACCWaitConstruct(), emitPointerArithmetic(), emitPointerWithAlignment(), emitReturnStmt(), emitRotate(), emitScalarConstant(), emitStringLiteralLValue(), emitSwitchStmt(), emitUnaryOpLValue(), emitUnreachable(), emitValToTemp(), emitWhileStmt(), evaluateExprAsBool(), generateCode(), getAddressOfBaseClass(), getAddrOfBitFieldStorage(), getLoc(), clang::CIRGen::CIRGenCXXABI::loadIncomingCXXThis(), startFunction(), and storeAnyExprIntoOneUnit().
mlir::Location clang::CIRGen::CIRGenFunction::getLoc | ( | clang::SourceRange | srcLoc | ) |
Definition at line 118 of file CIRGenFunction.cpp.
References currSrcLoc, clang::SourceRange::getBegin(), clang::SourceRange::getEnd(), getLoc(), getMLIRContext(), and clang::SourceRange::isValid().
mlir::Location clang::CIRGen::CIRGenFunction::getLoc | ( | mlir::Location | lhs, |
mlir::Location | rhs | ||
) |
Definition at line 135 of file CIRGenFunction.cpp.
References getMLIRContext().
|
inline |
Definition at line 144 of file CIRGenFunction.h.
References cgm, and clang::CIRGen::CIRGenModule::getMLIRContext().
Referenced by createOpenACCConstantInt(), emitAutoVarInit(), emitBuiltinExpr(), emitIfOnBoolExpr(), emitOpenACCIntExpr(), emitOpenACCWaitConstruct(), emitStoreOfScalar(), emitUnaryOpLValue(), generateCode(), and getLoc().
CIRGenFunction::OpenACCDataOperandInfo CIRGenFunction::getOpenACCDataOperandInfo | ( | const Expr * | e | ) |
Definition at line 69 of file CIRGenOpenACC.cpp.
References cgm, createOpenACCConstantInt(), emitDeclRefLValue(), emitMemberExpr(), emitOpenACCIntExpr(), clang::ASTContext::getAsConstantArrayType(), clang::ArraySectionExpr::getBaseOriginalType(), clang::Stmt::getBeginLoc(), getContext(), clang::CIRGen::CIRGenModule::getLoc(), clang::QualType::getNonReferenceType(), clang::CIRGen::LValue::getPointer(), clang::Expr::getType(), clang::QualType::getUnqualifiedType(), clang::Expr::IgnoreParenImpCasts(), and clang::Stmt::printPretty().
Referenced by emitOpenACCCacheConstruct().
AggValueSlot::Overlap_t CIRGenFunction::getOverlapForBaseInit | ( | const CXXRecordDecl * | rd, |
const CXXRecordDecl * | baseRD, | ||
bool | isVirtual | ||
) |
Determine whether a base class initialization may overlap some other object.
Definition at line 690 of file CIRGenExprAggregate.cpp.
References clang::CIRGen::AggValueSlot::DoesNotOverlap, clang::ASTContext::getASTRecordLayout(), clang::ASTRecordLayout::getBaseClassOffset(), getContext(), clang::ASTRecordLayout::getNonVirtualSize(), and clang::CIRGen::AggValueSlot::MayOverlap.
Referenced by emitBaseInitializer().
|
inline |
Definition at line 143 of file CIRGenFunction.h.
References cgm, and clang::CIRGen::CIRGenModule::getTarget().
Referenced by collectClobbers(), emitCXXThrowExpr(), and emitDestructorBody().
|
inline |
Definition at line 141 of file CIRGenFunction.h.
References cgm, and clang::CIRGen::CIRGenModule::getTypes().
Referenced by commonBuildCXXMemberOrOperatorCall(), and emitCall().
RValue CIRGenFunction::getUndefRValue | ( | clang::QualType | ty | ) |
Get an appropriate 'undef' rvalue for the given type.
TODO: What's the equivalent for MLIR? Currently we're only using this for void types so it just returns RValue::get(nullptr) but it'll need addressed later.
Definition at line 1549 of file CIRGenExpr.cpp.
References cgm, clang::CIRGen::CIRGenModule::errorNYI(), clang::CIRGen::RValue::get(), and clang::Type::isVoidType().
Referenced by emitBuiltinExpr(), and emitCall().
void CIRGenFunction::getVTablePointers | ( | clang::BaseSubobject | base, |
const clang::CXXRecordDecl * | nearestVBase, | ||
clang::CharUnits | offsetFromNearestVBase, | ||
bool | baseIsNonVirtualPrimaryBase, | ||
const clang::CXXRecordDecl * | vtableClass, | ||
VisitedVirtualBasesSetTy & | vbases, | ||
VPtrsVector & | vptrs | ||
) |
Definition at line 410 of file CIRGenClass.cpp.
References clang::CXXRecordDecl::bases(), clang::ASTContext::getASTRecordLayout(), clang::BaseSubobject::getBase(), clang::ASTRecordLayout::getBaseClassOffset(), clang::BaseSubobject::getBaseOffset(), getContext(), clang::CXXRecordDecl::getDefinitionOrSelf(), clang::RecordType::getOriginalDecl(), clang::ASTRecordLayout::getPrimaryBase(), clang::ASTRecordLayout::getVBaseClassOffset(), getVTablePointers(), and clang::CharUnits::Zero().
CIRGenFunction::VPtrsVector CIRGenFunction::getVTablePointers | ( | const clang::CXXRecordDecl * | vtableClass | ) |
Definition at line 399 of file CIRGenClass.cpp.
References getVTablePointers(), and clang::CharUnits::Zero().
Referenced by getVTablePointers(), and initializeVTablePointers().
mlir::Value CIRGenFunction::getVTablePtr | ( | mlir::Location | loc, |
Address | thisAddr, | ||
const clang::CXXRecordDecl * | vtableClass | ||
) |
Return the Value of the vtable pointer member pointed to by thisAddr.
Definition at line 786 of file CIRGenClass.cpp.
References cgm, cir::MissingFeatures::createInvariantGroup(), clang::CIRGen::CIRGenBuilderTy::createLoad(), clang::CIRGen::Address::getAlignment(), clang::CIRGen::CIRGenModule::getCodeGenOpts(), clang::CIRGen::Address::getPointer(), clang::CIRGen::CIRGenBuilderTy::getPtrToVPtrType(), and cir::MissingFeatures::opTBAA().
|
inlinestatic |
Definition at line 133 of file CIRGenFunction.h.
References getEvaluationKind(), cir::TEK_Aggregate, and clang::ast_matchers::type.
Referenced by emitAggExprToLValue(), emitAnyExprToTemp(), emitCallArg(), emitStmtWithResult(), and clang::CIRGen::CIRGenFunction::OpaqueValueMappingData::shouldBindAsLValue().
|
inlinestatic |
Definition at line 129 of file CIRGenFunction.h.
References getEvaluationKind(), cir::TEK_Scalar, and clang::ast_matchers::type.
Referenced by emitComplexToScalarConversion(), emitScalarConversion(), and emitScalarExpr().
|
inline |
True if an insertion point is defined.
If not, this indicates that the current code being emitted is unreachable. FIXME(cir): we need to inspect this and perhaps use a cleaner mechanism since we don't yet force null insertion point to designate behavior (like LLVM's codegen does) and we probably shouldn't.
Definition at line 358 of file CIRGenFunction.h.
Referenced by emitCleanup().
void CIRGenFunction::initializeVTablePointer | ( | mlir::Location | loc, |
const VPtr & | vptr | ||
) |
Definition at line 338 of file CIRGenClass.cpp.
References cir::MissingFeatures::addressSpace(), applyNonVirtualAndVirtualOffset(), clang::CIRGen::CIRGenFunction::VPtr::base, cgm, convertType(), cir::MissingFeatures::createInvariantGroup(), clang::CIRGen::CIRGenBuilderTy::createStore(), clang::CIRGen::CIRGenModule::errorNYI(), clang::CIRGen::Address::getAlignment(), clang::BaseSubobject::getBase(), clang::BaseSubobject::getBaseOffset(), getContext(), clang::CIRGen::CIRGenModule::getCXXABI(), clang::CIRGen::Address::getPointer(), clang::CIRGen::CIRGenBuilderTy::getPtrToVPtrType(), clang::CIRGen::CIRGenCXXABI::getVTableAddressPointInStructor(), clang::CIRGen::CIRGenCXXABI::isVirtualOffsetNeededForVTableField(), clang::CharUnits::isZero(), loadCXXThisAddress(), clang::CIRGen::CIRGenFunction::VPtr::nearestVBase, cir::MissingFeatures::opTBAA(), clang::CIRGen::CIRGenFunction::VPtr::vtableClass, and clang::CharUnits::Zero().
Referenced by initializeVTablePointers().
void CIRGenFunction::initializeVTablePointers | ( | mlir::Location | loc, |
const clang::CXXRecordDecl * | rd | ||
) |
Definition at line 383 of file CIRGenClass.cpp.
References cgm, clang::CIRGen::CIRGenCXXABI::doStructorsInitializeVPtrs(), clang::CIRGen::CIRGenModule::getCXXABI(), clang::CXXRecordDecl::getNumVBases(), getVTablePointers(), clang::CIRGen::CIRGenCXXABI::initializeHiddenVirtualInheritanceMembers(), initializeVTablePointer(), and clang::CXXRecordDecl::isDynamicClass().
Referenced by emitBaseInitializer(), and emitCtorPrologue().
|
static |
Checks whether the given constructor is a valid subject for the complete-to-base constructor delegation optimization, i.e.
emitting the complete constructor as a simple call to the base constructor.
Definition at line 29 of file CIRGenClass.cpp.
References clang::Type::castAs(), clang::CXXRecordDecl::getNumVBases(), clang::CXXMethodDecl::getParent(), clang::ValueDecl::getType(), clang::CXXConstructorDecl::isDelegatingConstructor(), and clang::FunctionProtoType::isVariadic().
Referenced by emitConstructorBody().
|
inline |
Definition at line 1450 of file CIRGenFunction.h.
References outermostConditional.
Referenced by pushFullExprCleanup(), and setBeforeOutermostConditional().
An LValue is a candidate for having its loads and stores be made atomic if we are operating under /volatile:ms and the LValue itself is volatile and performing such an operation can be performed without a libcall.
Definition at line 2222 of file CIRGenExpr.cpp.
References cgm, clang::CIRGen::CIRGenModule::errorNYI(), and clang::CIRGen::CIRGenModule::getLangOpts().
Referenced by emitLoadOfScalar().
Determine whether the given initializer is trivial in the sense that it requires no code to be generated.
Definition at line 66 of file CIRGenDecl.cpp.
Referenced by emitAutoVarInit().
|
inline |
Load the value for 'this'.
This function is only valid while generating code for an C++ member function. FIXME(cir): this should return a mlir::Value!
Definition at line 663 of file CIRGenFunction.h.
References cxxThisValue.
Referenced by emitMemberInitializer(), and loadCXXThisAddress().
Address CIRGenFunction::loadCXXThisAddress | ( | ) |
Definition at line 471 of file CIRGenClass.cpp.
References cgm, curFuncDecl, cxxThisAlignment, clang::CIRGen::CIRGenModule::getClassPointerAlignment(), clang::CharUnits::isZero(), and loadCXXThis().
Referenced by emitBaseInitializer(), emitCtorPrologue(), emitDelegateCXXConstructorCall(), emitDelegatingCXXConstructorCall(), emitDestructorBody(), and initializeVTablePointer().
|
inline |
Definition at line 636 of file CIRGenFunction.h.
References makeAddrLValue().
Referenced by convertTempToRValue(), emitAggExprToLValue(), emitAnyExprToMem(), emitAtomicExpr(), emitAutoVarInit(), emitCastLValue(), emitCompoundLiteralLValue(), emitCXXMemberOrOperatorMemberCallExpr(), emitDeclRefLValue(), emitFunctionDeclLValue(), emitGlobalVarDeclLValue(), emitLoadOfReferenceLValue(), emitLValueForField(), emitLValueForFieldInitialization(), emitMaterializeTemporaryExpr(), emitMemberExpr(), emitStringLiteralLValue(), emitUnaryOpLValue(), makeAddrLValue(), makeNaturalAlignAddrLValue(), makeNaturalAlignPointeeAddrLValue(), and storeAnyExprIntoOneUnit().
|
inline |
Definition at line 641 of file CIRGenFunction.h.
References clang::CIRGen::LValue::makeAddr().
|
inline |
Construct an address with the natural alignment of T.
If a pointer to T is expected to be signed, the pointer passed to this function must have been signed, and the returned Address will have the pointer authentication information needed to authenticate the signed pointer.
Definition at line 622 of file CIRGenFunction.h.
References cgm, convertTypeForMem(), clang::CIRGen::CIRGenModule::getNaturalTypeAlignment(), and clang::CharUnits::isZero().
Referenced by emitPointerWithAlignment().
Definition at line 719 of file CIRGenFunction.cpp.
References cgm, convertTypeForMem(), clang::CIRGen::CIRGenModule::getNaturalTypeAlignment(), makeAddrLValue(), and cir::MissingFeatures::opTBAA().
Referenced by emitMemberInitializer().
LValue clang::CIRGen::CIRGenFunction::makeNaturalAlignPointeeAddrLValue | ( | mlir::Value | v, |
clang::QualType | t | ||
) |
Given a value of type T* that may not be to a complete object, construct an l-vlaue withi the natural pointee alignment of T.
Definition at line 709 of file CIRGenFunction.cpp.
References cgm, clang::CIRGen::CIRGenModule::getNaturalTypeAlignment(), makeAddrLValue(), and cir::MissingFeatures::opTBAA().
Referenced by emitCallExprLValue(), and emitMemberInitializer().
void CIRGenFunction::maybeEmitDeferredVarDeclInit | ( | const VarDecl * | vd | ) |
Definition at line 821 of file CIRGenDecl.cpp.
References b, and emitVarDecl().
Referenced by emitDecl().
void CIRGenFunction::popCleanupBlock | ( | ) |
Pops a cleanup block.
If the block includes a normal cleanup, the current insertion point is threaded through the cleanup, as are any branch fixups on the cleanup.
Definition at line 116 of file CIRGenCleanup.cpp.
References cir::MissingFeatures::ehCleanupBranchFixups(), cir::MissingFeatures::ehCleanupFlags(), cir::MissingFeatures::ehCleanupScopeRequiresEHCleanup(), emitCleanup(), clang::CIRGen::EHCleanupScope::getCleanupBuffer(), clang::CIRGen::EHCleanupScope::getCleanupSize(), clang::CIRGen::EHCleanupScope::isActive(), clang::CIRGen::EHCleanupScope::isNormalCleanup(), clang::CIRGen::EHCleanupScope::markEmitted(), memcpy(), and clang::CIRGen::EHScopeStack::ScopeStackAlignment.
void CIRGenFunction::popCleanupBlocks | ( | EHScopeStack::stable_iterator | oldCleanupStackDepth | ) |
Takes the old cleanup stack size and emits the cleanup blocks that have been added.
Pops cleanup blocks until the given savepoint is reached.
Definition at line 171 of file CIRGenCleanup.cpp.
References cir::MissingFeatures::ehstackBranches().
Referenced by finishFunction(), and clang::CIRGen::CIRGenFunction::RunCleanupsScope::forceCleanup().
void CIRGenFunction::pushDestroy | ( | CleanupKind | kind, |
Address | addr, | ||
QualType | type, | ||
Destroyer * | destroyer | ||
) |
Definition at line 683 of file CIRGenDecl.cpp.
References clang::ast_matchers::type.
Referenced by pushTemporaryCleanup().
|
inline |
Push a cleanup to be run at the end of the current full-expression.
Safe against the possibility that we're currently inside a conditionally-evaluated expression.
Definition at line 715 of file CIRGenFunction.h.
References cgm, ehStack, clang::CIRGen::CIRGenModule::errorNYI(), isInConditionalBranch(), and clang::T.
|
inline |
Set the address of a local variable.
Definition at line 523 of file CIRGenFunction.h.
References clang::CIRGen::Address::getPointer(), localDeclMap, and symbolTable.
Referenced by emitAutoVarAlloca(), emitStaticVarDecl(), and startFunction().
|
inline |
Definition at line 1452 of file CIRGenFunction.h.
References clang::CIRGen::CIRGenBuilderTy::createStore(), clang::CIRGen::Address::getAlignment(), clang::CharUnits::getAsAlign(), clang::CIRGen::CIRGenFunction::ConditionalEvaluation::getInsertPoint(), isInConditionalBranch(), and outermostConditional.
bool CIRGenFunction::shouldEmitVTableTypeCheckedLoad | ( | const CXXRecordDecl * | rd | ) |
Returns whether we should perform a type checked load when loading a virtual function for virtual calls to members of RD.
This is generally true when both vcall CFI and whole-program-vtables are enabled.
Definition at line 773 of file CIRGenClass.cpp.
References cgm, clang::CIRGen::CIRGenModule::getCodeGenOpts(), cir::MissingFeatures::hiddenVisibility(), and cir::MissingFeatures::sanitizers().
Definition at line 866 of file CIRGenFunction.cpp.
References clang::CastExpr::getCastKind(), clang::CastExpr::getSubExpr(), and clang::Expr::IgnoreParens().
Referenced by emitPointerWithAlignment().
void clang::CIRGen::CIRGenFunction::startFunction | ( | clang::GlobalDecl | gd, |
clang::QualType | returnType, | ||
cir::FuncOp | fn, | ||
cir::FuncType | funcType, | ||
FunctionArgList | args, | ||
clang::SourceLocation | loc, | ||
clang::SourceLocation | startLoc | ||
) |
Emit code for the start of a function.
loc | The location to be associated with the function. |
startLoc | The location of the function body. |
Definition at line 396 of file CIRGenFunction.cpp.
References cgm, cir::MissingFeatures::constructABIArgDirectExtend(), convertType(), curFn, curFuncDecl, cxxabiThisValue, cxxThisValue, ehStack, emitAlloca(), clang::CIRGen::CIRGenCXXABI::emitInstanceFunctionProlog(), cir::MissingFeatures::emitTypeCheck(), clang::CIRGen::CIRGenModule::errorNYI(), getContext(), clang::CIRGen::CIRGenModule::getCXXABI(), clang::GlobalDecl::getDecl(), clang::ASTContext::getDeclAlign(), getLoc(), clang::Decl::getNonClosureContext(), clang::VarDecl::getSourceRange(), clang::ValueDecl::getType(), clang::Type::isVoidType(), prologueCleanupDepth, cir::MissingFeatures::sanitizers(), setAddrOfLocalVar(), and clang::CIRGen::EHScopeStack::stable_begin().
Referenced by generateCode().
CIRGenFunction::ConstantEmission CIRGenFunction::tryEmitAsConstant | ( | const DeclRefExpr * | refExpr | ) |
Try to emit a reference to the given value without producing it as an l-value.
For many cases, this is just an optimization, but it avoids us needing to emit global copies of variables if they're named without triggering a formal use in a context where we can't emit a direct reference to them, for instance if a block or lambda or a member of a local class uses a const int variable or constexpr variable from an enclosing function.
For named members of enums, this is the only way they are emitted.
Definition at line 2168 of file CIRGenExpr.cpp.
References c, clang::CIRGen::ConstantEmitter::emitAbstract(), clang::Expr::EvaluateAsRValue(), clang::CIRGen::CIRGenFunction::ConstantEmission::forValue(), cir::MissingFeatures::generateDebugInfo(), getContext(), clang::DeclRefExpr::getDecl(), clang::DeclRefExpr::getLocation(), clang::Expr::getType(), clang::Expr::EvalStatus::HasSideEffects, cir::MissingFeatures::tryEmitAsConstant(), and clang::Expr::EvalResult::Val.
Referenced by tryEmitAsConstant().
CIRGenFunction::ConstantEmission CIRGenFunction::tryEmitAsConstant | ( | const MemberExpr * | me | ) |
Definition at line 2203 of file CIRGenExpr.cpp.
References tryEmitAsConstant(), and tryToConvertMemberExprToDeclRefExpr().
|
friend |
Definition at line 53 of file CIRGenFunction.h.
Referenced by emitCompoundAssignmentLValue(), emitPromotedScalarExpr(), emitScalarConversion(), emitScalarExpr(), and emitScalarPrePostIncDec().
CIRGenModule& clang::CIRGen::CIRGenFunction::cgm |
Definition at line 50 of file CIRGenFunction.h.
Referenced by addInitializerToStaticVarDecl(), buildFunctionArgList(), commonBuildCXXMemberOrOperatorCall(), convertTempToRValue(), convertType(), convertTypeForMem(), createMemTemp(), createReferenceTemporary(), createTempAllocaWithoutCast(), emitAddrOfFieldStorage(), emitArrayLength(), emitArraySubscriptExpr(), emitArrayToPointerDecay(), emitAsmStmt(), emitAtomicExpr(), emitAtomicInit(), emitAtomicOp(), emitAutoVarAlloca(), emitAutoVarCleanups(), emitAutoVarInit(), emitAutoVarTypeCleanup(), emitBinaryOperatorLValue(), emitBuiltinExpr(), emitCall(), emitCallArg(), emitCallArgs(), emitCallee(), emitCallExpr(), emitCallExprLValue(), emitCastLValue(), emitCheckedArgForAssume(), emitComplexAssignmentLValue(), emitComplexPrePostIncDec(), emitCompoundLiteralLValue(), emitConstructorBody(), emitCtorPrologue(), emitCXXAggrConstructorCall(), emitCXXConstructExpr(), emitCXXConstructorCall(), emitCXXDestructorCall(), emitCXXMemberCallExpr(), emitCXXMemberOrOperatorCall(), emitCXXMemberOrOperatorMemberCallExpr(), emitCXXNewAllocSize(), emitCXXNewExpr(), emitCXXPseudoDestructorExpr(), emitCXXThrowExpr(), emitDecl(), emitDeclRefLValue(), emitDelegateCallArg(), emitDelegateCXXConstructorCall(), emitDelegatingCXXConstructorCall(), emitDestroy(), emitDestructorBody(), emitExprAsInit(), emitFunctionDeclLValue(), emitGlobalVarDeclLValue(), emitImplicitAssignmentOperatorBody(), emitInitializerForField(), emitLoadOfBitfieldLValue(), emitLoadOfLValue(), emitLoadOfReference(), emitLoadOfScalar(), emitLValue(), emitLValueForBitField(), emitLValueForField(), emitLValueForFieldInitialization(), emitMaterializeTemporaryExpr(), emitMemberExpr(), emitMemberInitializer(), emitNewDeleteCall(), emitNewInitializer(), emitNullInitialization(), emitOpenACCAtomicConstruct(), emitOpenACCIntExpr(), emitOpenACCWaitConstruct(), emitOpOnBoolExpr(), emitPointerArithmetic(), emitPointerWithAlignment(), emitReturnStmt(), emitScalarConstant(), emitScalarInit(), emitStaticVarDecl(), emitStmt(), emitStoreOfScalar(), emitStoreThroughBitfieldLValue(), emitStoreThroughLValue(), emitStringLiteralLValue(), emitUnaryOpLValue(), emitVAArg(), emitVarDecl(), emitVariablyModifiedType(), evaluateExprAsBool(), getAddressOfBaseClass(), getAddrOfBitFieldStorage(), getCIRGenModule(), getContext(), getDestroyer(), getLangOpts(), getMLIRContext(), getOpenACCDataOperandInfo(), clang::CIRGen::CIRGenFunction::ConstantEmission::getReferenceLValue(), getTarget(), getTypes(), getUndefRValue(), getVTablePtr(), initializeVTablePointer(), initializeVTablePointers(), isLValueSuitableForInlineAtomic(), loadCXXThisAddress(), makeNaturalAddressForPointer(), makeNaturalAlignAddrLValue(), makeNaturalAlignPointeeAddrLValue(), clang::CIRGen::CIRGenCallee::prepareConcreteCallee(), pushFullExprCleanup(), pushTemporaryCleanup(), shouldEmitVTableTypeCheckedLoad(), startFunction(), and storeAnyExprIntoOneUnit().
llvm::SmallVector<mlir::Type, 2> clang::CIRGen::CIRGenFunction::condTypeStack |
The type of the condition for the emitting switch statement.
Definition at line 93 of file CIRGenFunction.h.
Referenced by emitSwitchCase(), and emitSwitchStmt().
unsigned clang::CIRGen::CIRGenFunction::counterAggTmp = 0 |
Definition at line 342 of file CIRGenFunction.h.
Referenced by getCounterAggTmpAsString().
unsigned clang::CIRGen::CIRGenFunction::counterRefTmp = 0 |
Hold counters for incrementally naming temporaries.
Definition at line 341 of file CIRGenFunction.h.
Referenced by getCounterRefTmpAsString().
cir::FuncOp clang::CIRGen::CIRGenFunction::curFn |
The function for which code is currently being generated.
Definition at line 85 of file CIRGenFunction.h.
Referenced by clang::CIRGen::CIRGenModule::createCIRFunction(), clang::CIRGen::CIRGenFunction::LexicalScope::createCleanupBlock(), getCurFunctionEntryBlock(), and startFunction().
const clang::Decl* clang::CIRGen::CIRGenFunction::curFuncDecl = nullptr |
Definition at line 82 of file CIRGenFunction.h.
Referenced by emitBaseInitializer(), loadCXXThisAddress(), and startFunction().
clang::GlobalDecl clang::CIRGen::CIRGenFunction::curGD |
The GlobalDecl for the current function being compiled or the global variable currently being initialized.
Definition at line 62 of file CIRGenFunction.h.
Referenced by clang::CIRGen::CIRGenCXXABI::buildThisParam(), emitConstructorBody(), emitCXXConstructExpr(), emitDelegateCXXConstructorCall(), emitDestructorBody(), emitImplicitAssignmentOperatorBody(), emitMemberInitializer(), emitReturnStmt(), and generateCode().
LexicalScope* clang::CIRGen::CIRGenFunction::curLexScope = nullptr |
Definition at line 916 of file CIRGenFunction.h.
Referenced by clang::CIRGen::CIRGenFunction::LexicalScope::cleanup(), emitReturnStmt(), emitSwitchStmt(), clang::CIRGen::CIRGenFunction::LexicalScope::LexicalScope(), and clang::CIRGen::CIRGenFunction::LexicalScope::restore().
EHScopeStack::stable_iterator clang::CIRGen::CIRGenFunction::currentCleanupStackDepth = ehStack.stable_end() |
Definition at line 768 of file CIRGenFunction.h.
Referenced by emitReturnStmt(), clang::CIRGen::CIRGenFunction::RunCleanupsScope::forceCleanup(), and clang::CIRGen::CIRGenFunction::RunCleanupsScope::RunCleanupsScope().
std::optional<mlir::Location> clang::CIRGen::CIRGenFunction::currSrcLoc |
Use to track source locations across nested visitor traversals.
Always use a SourceLocRAIIObject
to change currSrcLoc.
Definition at line 319 of file CIRGenFunction.h.
Referenced by emitAggregateStore(), emitArrayDestroy(), emitArrayLength(), emitCall(), emitCXXAggrConstructorCall(), emitCXXMemberOrOperatorCall(), emitStoreOfScalar(), getLoc(), clang::CIRGen::CIRGenFunction::SourceLocRAIIObject::restore(), and clang::CIRGen::CIRGenFunction::SourceLocRAIIObject::SourceLocRAIIObject().
ImplicitParamDecl* clang::CIRGen::CIRGenFunction::cxxabiThisDecl = nullptr |
CXXThisDecl - When generating code for a C++ member function, this will hold the implicit 'this' declaration.
Definition at line 72 of file CIRGenFunction.h.
Referenced by clang::CIRGen::CIRGenCXXABI::buildThisParam(), and clang::CIRGen::CIRGenCXXABI::getThisDecl().
mlir::Value clang::CIRGen::CIRGenFunction::cxxabiThisValue = nullptr |
Definition at line 73 of file CIRGenFunction.h.
Referenced by clang::CIRGen::CIRGenCXXABI::setCXXABIThisValue(), and startFunction().
Address clang::CIRGen::CIRGenFunction::cxxDefaultInitExprThis = Address::invalid() |
The value of 'this' to sue when evaluating CXXDefaultInitExprs within this expression.
Definition at line 79 of file CIRGenFunction.h.
Referenced by clang::CIRGen::CIRGenFunction::FieldConstructionScope::FieldConstructionScope(), and clang::CIRGen::CIRGenFunction::FieldConstructionScope::~FieldConstructionScope().
clang::CharUnits clang::CIRGen::CIRGenFunction::cxxThisAlignment |
Definition at line 75 of file CIRGenFunction.h.
Referenced by loadCXXThisAddress().
mlir::Value clang::CIRGen::CIRGenFunction::cxxThisValue = nullptr |
Definition at line 74 of file CIRGenFunction.h.
Referenced by emitCtorPrologue(), loadCXXThis(), and startFunction().
|
static |
Definition at line 920 of file CIRGenFunction.h.
Referenced by getDestroyer(), and pushTemporaryCleanup().
EHScopeStack clang::CIRGen::CIRGenFunction::ehStack |
Tracks function scope overall cleanup handling.
Definition at line 68 of file CIRGenFunction.h.
Referenced by CIRGenFunction(), emitAutoVarTypeCleanup(), emitReturnStmt(), finishFunction(), pushFullExprCleanup(), clang::CIRGen::CIRGenFunction::RunCleanupsScope::RunCleanupsScope(), and startFunction().
std::optional<mlir::Value> clang::CIRGen::CIRGenFunction::fnRetAlloca |
The compiler-generated variable that holds the return value.
Definition at line 65 of file CIRGenFunction.h.
Referenced by emitReturnStmt().
DeclMapTy clang::CIRGen::CIRGenFunction::localDeclMap |
This keeps track of the CIR allocas or globals for local C declarations.
Definition at line 90 of file CIRGenFunction.h.
Referenced by createReferenceTemporary(), clang::CIRGen::CIRGenFunction::DeclMapRevertingRAII::DeclMapRevertingRAII(), emitDeclRefLValue(), emitStaticVarDecl(), getAddrOfLocalVar(), setAddrOfLocalVar(), and clang::CIRGen::CIRGenFunction::DeclMapRevertingRAII::~DeclMapRevertingRAII().
llvm::DenseMap<const OpaqueValueExpr *, LValue> clang::CIRGen::CIRGenFunction::opaqueLValues |
Keeps track of the current set of opaque value expressions.
Definition at line 151 of file CIRGenFunction.h.
Referenced by clang::CIRGen::CIRGenFunction::OpaqueValueMappingData::bind(), and clang::CIRGen::CIRGenFunction::OpaqueValueMappingData::unbind().
llvm::DenseMap<const OpaqueValueExpr *, RValue> clang::CIRGen::CIRGenFunction::opaqueRValues |
Definition at line 152 of file CIRGenFunction.h.
Referenced by clang::CIRGen::CIRGenFunction::OpaqueValueMappingData::bind(), and clang::CIRGen::CIRGenFunction::OpaqueValueMappingData::unbind().
ConditionalEvaluation* clang::CIRGen::CIRGenFunction::outermostConditional = nullptr |
Definition at line 1467 of file CIRGenFunction.h.
Referenced by clang::CIRGen::CIRGenFunction::ConditionalEvaluation::beginEvaluation(), clang::CIRGen::CIRGenFunction::ConditionalEvaluation::endEvaluation(), isInConditionalBranch(), setBeforeOutermostConditional(), clang::CIRGen::CIRGenFunction::StmtExprEvaluation::StmtExprEvaluation(), and clang::CIRGen::CIRGenFunction::StmtExprEvaluation::~StmtExprEvaluation().
EHScopeStack::stable_iterator clang::CIRGen::CIRGenFunction::prologueCleanupDepth |
The cleanup depth enclosing all the cleanups associated with the parameters.
Definition at line 704 of file CIRGenFunction.h.
Referenced by finishFunction(), and startFunction().
clang::SanitizerSet clang::CIRGen::CIRGenFunction::sanOpts |
Sanitizers enabled for this function.
Definition at line 105 of file CIRGenFunction.h.
Referenced by emitCheckedArgForAssume(), and emitNullabilityCheck().
Whether or not a Microsoft-style asm block has been processed within this fuction.
These can potentially set the return value.
Definition at line 117 of file CIRGenFunction.h.
SymTableTy clang::CIRGen::CIRGenFunction::symbolTable |
Definition at line 113 of file CIRGenFunction.h.
Referenced by emitCompoundStmt(), emitDeclRefLValue(), emitFunctionBody(), generateCode(), and setAddrOfLocalVar().