Home
last modified time | relevance | path

Searched refs:cgf (Results 1 – 24 of 24) sorted by relevance

/freebsd/contrib/llvm-project/clang/lib/CIR/CodeGen/
H A DCIRGenExprScalar.cpp79 CIRGenFunction &cgf; member in __anon1373b7f80111::ScalarExprEmitter
84 ScalarExprEmitter(CIRGenFunction &cgf, CIRGenBuilderTy &builder) in ScalarExprEmitter() argument
85 : cgf(cgf), builder(builder) {} in ScalarExprEmitter()
92 return builder.createFloatingCast(result, cgf.convertType(promotionType)); in emitPromotedValue()
96 return builder.createFloatingCast(result, cgf.convertType(exprType)); in emitUnPromotedValue()
123 cgf.getCIRGenModule().errorNYI( in VisitExpr()
140 LValue lv = cgf.emitLValue(e); in emitLoadOfLValue()
142 return cgf.emitLoadOfLValue(lv, e->getExprLoc()).getValue(); in emitLoadOfLValue()
146 return cgf.emitLoadOfLValue(lv, loc).getValue(); in emitLoadOfLValue()
151 if (CIRGenFunction::ConstantEmission constant = cgf.tryEmitAsConstant(e)) in VisitDeclRefExpr()
[all …]
H A DCIRGenExprAggregate.cpp29 CIRGenFunction &cgf; member in __anon36b4a6a90111::AggExprEmitter
45 cgf.cgm.errorNYI(loc, "Slot for ignored address"); in ensureSlot()
50 AggExprEmitter(CIRGenFunction &cgf, AggValueSlot dest) in AggExprEmitter() argument
51 : cgf(cgf), dest(dest) {} in AggExprEmitter()
108 LValue lv = cgf.emitLValue(e); in emitAggLoadOfLValue()
119 CIRGenBuilderTy &builder = cgf.getBuilder(); in emitArrayInit()
120 const mlir::Location loc = cgf.getLoc(e->getSourceRange()); in emitArrayInit()
125 cgf.getContext().getAsArrayType(arrayQTy)->getElementType(); in emitArrayInit()
128 cgf.cgm.errorNYI(loc, "dtorKind NYI"); in emitArrayInit()
132 const QualType elementPtrType = cgf.getContext().getPointerType(elementType); in emitArrayInit()
[all …]
H A DCIRGenExprComplex.cpp11 CIRGenFunction &cgf; member in __anonb9062a7a0111::ComplexExprEmitter
15 explicit ComplexExprEmitter(CIRGenFunction &cgf) in ComplexExprEmitter() argument
16 : cgf(cgf), builder(cgf.getBuilder()) {} in ComplexExprEmitter()
33 return emitLoadOfLValue(cgf.emitLValue(e), e->getExprLoc()); in emitLoadOfLValue()
83 cgf.getLangOpts().getComplexRange() == in getPromotionType()
85 cgf.cgm.errorNYI("HigherPrecisionTypeForComplexArithmetic"); in getPromotionType()
89 if (elementTy.UseExcessPrecision(cgf.getContext())) in getPromotionType()
90 return cgf.getContext().getComplexType(cgf.getContext().FloatTy); in getPromotionType()
93 if (ty.UseExcessPrecision(cgf.getContext())) in getPromotionType()
94 return cgf.getContext().FloatTy; in getPromotionType()
[all …]
H A DCIRGenCXXABI.cpp25 void CIRGenCXXABI::buildThisParam(CIRGenFunction &cgf, in buildThisParam() argument
27 const auto *md = cast<CXXMethodDecl>(cgf.curGD.getDecl()); in buildThisParam()
36 cgf.cxxabiThisDecl = thisDecl; in buildThisParam()
51 mlir::Value CIRGenCXXABI::loadIncomingCXXThis(CIRGenFunction &cgf) { in loadIncomingCXXThis() argument
52 ImplicitParamDecl *vd = getThisDecl(cgf); in loadIncomingCXXThis()
53 Address addr = cgf.getAddrOfLocalVar(vd); in loadIncomingCXXThis()
54 return cgf.getBuilder().create<cir::LoadOp>( in loadIncomingCXXThis()
55 cgf.getLoc(vd->getLocation()), addr.getElementType(), addr.getPointer()); in loadIncomingCXXThis()
58 void CIRGenCXXABI::setCXXABIThisValue(CIRGenFunction &cgf, in setCXXABIThisValue() argument
61 assert(getThisDecl(cgf) && "no 'this' variable for function"); in setCXXABIThisValue()
[all …]
H A DCIRGenFunction.h168 bind(CIRGenFunction &cgf, const OpaqueValueExpr *ov, const Expr *e) { in bind() argument
170 return bind(cgf, ov, cgf.emitLValue(e)); in bind()
171 return bind(cgf, ov, cgf.emitAnyExpr(e)); in bind()
175 bind(CIRGenFunction &cgf, const OpaqueValueExpr *ov, const LValue &lv) { in bind() argument
177 cgf.opaqueLValues.insert(std::make_pair(ov, lv)); in bind()
182 bind(CIRGenFunction &cgf, const OpaqueValueExpr *ov, const RValue &rv) { in bind() argument
184 cgf.opaqueRValues.insert(std::make_pair(ov, rv)); in bind()
198 void unbind(CIRGenFunction &cgf) { in unbind() argument
202 cgf.opaqueLValues.erase(opaqueValue); in unbind()
204 cgf.opaqueRValues.erase(opaqueValue); in unbind()
[all …]
H A DCIRGenCXXExpr.cpp32 CIRGenFunction &cgf, const CXXMethodDecl *md, mlir::Value thisPtr, in commonBuildCXXMemberOrOperatorCall() argument
42 cgf.cgm.getCXXABI().getThisArgumentTypeForMethod(md); in commonBuildCXXMemberOrOperatorCall()
43 args.add(RValue::get(thisPtr), cgf.getTypes().deriveThisType(rd, md)); in commonBuildCXXMemberOrOperatorCall()
64 cgf.emitCallArgs(args, fpt, drop_begin(ce->arguments(), argsToSkip), in commonBuildCXXMemberOrOperatorCall()
192 static mlir::Value emitCXXNewAllocSize(CIRGenFunction &cgf, const CXXNewExpr *e, in emitCXXNewAllocSize() argument
197 mlir::Location loc = cgf.getLoc(e->getSourceRange()); in emitCXXNewAllocSize()
200 CharUnits typeSize = cgf.getContext().getTypeSizeInChars(type); in emitCXXNewAllocSize()
201 sizeWithoutCookie = cgf.getBuilder().getConstant( in emitCXXNewAllocSize()
202 loc, cir::IntAttr::get(cgf.SizeTy, typeSize.getQuantity())); in emitCXXNewAllocSize()
206 cgf.cgm.errorNYI(e->getSourceRange(), "emitCXXNewAllocSize: array"); in emitCXXNewAllocSize()
[all …]
H A DCIRGenConstantEmitter.h29 const CIRGenFunction *cgf; variable
54 ConstantEmitter(CIRGenFunction &cgf) : cgm(cgf.cgm), cgf(&cgf) {} in ConstantEmitter() argument
56 ConstantEmitter(CIRGenModule &cgm, CIRGenFunction *cgf = nullptr)
57 : cgm(cgm), cgf(cgf) {} in cgm()
H A DCIRGenItaniumCXXABI.cpp43 CIRGenFunction &cgf) override;
61 CIRGenFunction &cgf) { in emitInstanceFunctionProlog() argument
63 if (cgf.curFuncDecl && cgf.curFuncDecl->hasAttr<NakedAttr>()) { in emitInstanceFunctionProlog()
64 cgf.cgm.errorNYI(cgf.curFuncDecl->getLocation(), in emitInstanceFunctionProlog()
70 setCXXABIThisValue(cgf, loadIncomingCXXThis(cgf)); in emitInstanceFunctionProlog()
85 if (hasThisReturn(cgf.curGD)) { in emitInstanceFunctionProlog()
86 cgf.cgm.errorNYI(cgf.curFuncDecl->getLocation(), in emitInstanceFunctionProlog()
H A DCIRGenCXXABI.h38 void setCXXABIThisValue(CIRGenFunction &cgf, mlir::Value thisPtr);
45 clang::ImplicitParamDecl *getThisDecl(CIRGenFunction &cgf) { in getThisDecl() argument
46 return cgf.cxxabiThisDecl; in getThisDecl()
51 CIRGenFunction &cgf) = 0;
67 void buildThisParam(CIRGenFunction &cgf, FunctionArgList &params);
70 mlir::Value loadIncomingCXXThis(CIRGenFunction &cgf);
H A DCIRGenClass.cpp56 static void emitLValueForAnyFieldInitialization(CIRGenFunction &cgf, in emitLValueForAnyFieldInitialization() argument
65 lhs = cgf.emitLValueForFieldInitialization(lhs, fd, fd->getName()); in emitLValueForAnyFieldInitialization()
68 lhs = cgf.emitLValueForFieldInitialization(lhs, field, field->getName()); in emitLValueForAnyFieldInitialization()
72 static void emitMemberInitializer(CIRGenFunction &cgf, in emitMemberInitializer() argument
87 mlir::Value thisPtr = cgf.loadCXXThis(); in emitMemberInitializer()
88 QualType recordTy = cgf.getContext().getTypeDeclType(classDecl); in emitMemberInitializer()
92 LValue lhs = (cgf.curGD.getCtorType() == Ctor_Base) in emitMemberInitializer()
93 ? cgf.makeNaturalAlignPointeeAddrLValue(thisPtr, recordTy) in emitMemberInitializer()
94 : cgf.makeNaturalAlignAddrLValue(thisPtr, recordTy); in emitMemberInitializer()
96 emitLValueForAnyFieldInitialization(cgf, memberInit, lhs); in emitMemberInitializer()
[all …]
H A DCIRGenBuiltin.cpp31 static RValue emitLibraryCall(CIRGenFunction &cgf, const FunctionDecl *fd, in emitLibraryCall() argument
34 return cgf.emitCall(e->getCallee()->getType(), callee, e, ReturnValueSlot()); in emitLibraryCall()
38 static RValue emitBuiltinBitOp(CIRGenFunction &cgf, const CallExpr *e, in emitBuiltinBitOp() argument
42 mlir::Value arg = cgf.emitScalarExpr(e->getArg(0)); in emitBuiltinBitOp()
43 CIRGenBuilderTy &builder = cgf.getBuilder(); in emitBuiltinBitOp()
48 op = builder.create<Op>(cgf.getLoc(e->getSourceRange()), arg, poisonZero); in emitBuiltinBitOp()
50 op = builder.create<Op>(cgf.getLoc(e->getSourceRange()), arg); in emitBuiltinBitOp()
53 mlir::Type exprTy = cgf.convertType(e->getType()); in emitBuiltinBitOp()
H A DCIRGenCXX.cpp29 CIRGenFunction cgf{*this, builder}; in codegenCXXStructor() local
30 curCGF = &cgf; in codegenCXXStructor()
33 cgf.generateCode(gd, fn, funcType); in codegenCXXStructor()
H A DCIRGenOpenACCClause.cpp54 CIRGen::CIRGenFunction &cgf; member in __anone65c1a390111::OpenACCClauseCIREmitter
72 cgf.cgm.errorNYI(c.getSourceRange(), "OpenACC Clause", c.getClauseKind()); in clauseNotImplemented()
83 return cgf.emitOpenACCIntExpr(intExpr); in emitIntExpr()
91 mlir::Value condition = cgf.evaluateExprAsBool(condExpr); in createCondition()
92 mlir::Location exprLoc = cgf.cgm.getLoc(condExpr->getBeginLoc()); in createCondition()
94 &cgf.getMLIRContext(), /*width=*/1, in createCondition()
103 return cgf.createOpenACCConstantInt(loc, width, value); in createConstantInt()
105 &cgf.getMLIRContext(), width, in createConstantInt()
115 return createConstantInt(cgf.cgm.getLoc(loc), width, value); in createConstantInt()
149 operation.loopOp, cgf, builder, dirKind, dirLoc}; in applyToLoopOp()
[all …]
H A DCIRGenFunction.cpp227 CIRGenBuilderTy &builder = cgf.builder; in cleanup()
228 LexicalScope *localScope = cgf.curLexScope; in cleanup()
281 CIRGenBuilderTy &builder = cgf.getBuilder(); in emitReturn()
283 if (!cgf.curFn.getFunctionType().hasVoidReturn()) { in emitReturn()
286 loc, cgf.curFn.getFunctionType().getReturnType(), *cgf.fnRetAlloca); in emitReturn()
308 CIRGenBuilderTy &builder = cgf.getBuilder(); in emitImplicitReturn()
309 LexicalScope *localScope = cgf.curLexScope; in emitImplicitReturn()
311 const auto *fd = cast<clang::FunctionDecl>(cgf.curGD.getDecl()); in emitImplicitReturn()
318 if (cgf.getLangOpts().CPlusPlus && !fd->hasImplicitReturnZero() && in emitImplicitReturn()
319 !cgf.sawAsmBlock && !fd->getReturnType()->isVoidType() && in emitImplicitReturn()
[all …]
H A DCIRGenOpenACC.cpp22 mlir::Value createBound(CIRGenFunction &cgf, CIRGen::CIRGenBuilderTy &builder, in createBound() argument
26 mlir::Value startIdx = cgf.createOpenACCConstantInt(boundLoc, 64, 0); in createBound()
28 mlir::Value stride = cgf.createOpenACCConstantInt(boundLoc, 64, 1); in createBound()
H A DCIRGenExpr.cpp242 static LValue emitGlobalVarDeclLValue(CIRGenFunction &cgf, const Expr *e, in emitGlobalVarDeclLValue() argument
249 cgf.cgm.errorNYI(e->getSourceRange(), in emitGlobalVarDeclLValue()
254 if (cgf.getLangOpts().OpenMP) in emitGlobalVarDeclLValue()
255 cgf.cgm.errorNYI(e->getSourceRange(), "emitGlobalVarDeclLValue: OpenMP"); in emitGlobalVarDeclLValue()
259 mlir::Value v = cgf.cgm.getAddrOfGlobalVar(vd); in emitGlobalVarDeclLValue()
262 mlir::Type realVarTy = cgf.convertTypeForMem(vd->getType()); in emitGlobalVarDeclLValue()
263 cir::PointerType realPtrTy = cgf.getBuilder().getPointerTo(realVarTy); in emitGlobalVarDeclLValue()
265 v = cgf.getBuilder().createBitcast(v.getLoc(), v, realPtrTy); in emitGlobalVarDeclLValue()
267 CharUnits alignment = cgf.getContext().getDeclAlign(vd); in emitGlobalVarDeclLValue()
271 cgf.cgm.errorNYI(e->getSourceRange(), in emitGlobalVarDeclLValue()
[all …]
H A DCIRGenModule.cpp420 CIRGenFunction cgf(*this, builder); in emitGlobalFunctionDefinition() local
421 curCGF = &cgf; in emitGlobalFunctionDefinition()
424 cgf.generateCode(gd, funcOp, funcType); in emitGlobalFunctionDefinition()
1801 CIRGenFunction *cgf = this->curCGF; in createCIRFunction() local
1802 if (cgf) in createCIRFunction()
1803 builder.setInsertionPoint(cgf->curFn); in createCIRFunction()
1821 if (!cgf) in createCIRFunction()
H A DCIRGenCall.h107 CIRGenCallee prepareConcreteCallee(CIRGenFunction &cgf) const;
H A DCIRGenCall.cpp58 CIRGenCallee CIRGenCallee::prepareConcreteCallee(CIRGenFunction &cgf) const { in prepareConcreteCallee()
441 emitCallLikeOp(CIRGenFunction &cgf, mlir::Location callLoc, in emitCallLikeOp() argument
446 CIRGenBuilderTy &builder = cgf.getBuilder(); in emitCallLikeOp()
/freebsd/contrib/llvm-project/clang/lib/CodeGen/
H A DCGExprComplex.cpp56 ComplexExprEmitter(CodeGenFunction &cgf, bool ir = false, bool ii = false) in ComplexExprEmitter() argument
57 : CGF(cgf), Builder(CGF.Builder), IgnoreReal(ir), IgnoreImag(ii), in ComplexExprEmitter()
H A DCodeGenFunction.h2007 OutlinedRegionBodyRAII(CodeGenFunction &cgf, InsertPointTy &AllocaIP,
2009 : CGF(cgf) {
2032 InlinedRegionBodyRAII(CodeGenFunction &cgf, InsertPointTy &AllocaIP,
2034 : CGF(cgf) {
H A DCGExprAgg.cpp74 AggExprEmitter(CodeGenFunction &cgf, AggValueSlot Dest, bool IsResultUnused) in AggExprEmitter() argument
75 : CGF(cgf), Builder(CGF.Builder), Dest(Dest), in AggExprEmitter()
H A DCGExprScalar.cpp264 ScalarExprEmitter(CodeGenFunction &cgf, bool ira=false) in ScalarExprEmitter() argument
265 : CGF(cgf), Builder(CGF.Builder), IgnoreResultAssign(ira), in ScalarExprEmitter()
266 VMContext(cgf.getLLVMContext()) { in ScalarExprEmitter()
/freebsd/contrib/llvm-project/llvm/lib/Target/SystemZ/
H A DSystemZInstrInfo.td1638 def CGF : CompareRXY<"cgf", 0xE330, z_scmp, GR64, z_asextloadi32, 4>;