Home
last modified time | relevance | path

Searched refs:ConstantOp (Results 1 – 25 of 26) sorted by relevance

12

/freebsd/contrib/llvm-project/clang/lib/CIR/CodeGen/
H A DCIRGenBuilder.cpp42 cir::ConstantOp CIRGenBuilderTy::getConstInt(mlir::Location loc, in getConstInt()
51 cir::ConstantOp CIRGenBuilderTy::getConstInt(mlir::Location loc, in getConstInt()
56 cir::ConstantOp CIRGenBuilderTy::getConstInt(mlir::Location loc, mlir::Type t, in getConstInt()
59 return create<cir::ConstantOp>(loc, cir::IntAttr::get(t, c)); in getConstInt()
62 cir::ConstantOp
66 return create<cir::ConstantOp>(loc, cir::FPAttr::get(t, fpVal)); in getConstFP()
H A DCIRGenBuilder.h224 cir::ConstantOp getConstInt(mlir::Location loc, llvm::APSInt intVal);
226 cir::ConstantOp getConstInt(mlir::Location loc, llvm::APInt intVal);
228 cir::ConstantOp getConstInt(mlir::Location loc, mlir::Type t, uint64_t c);
230 cir::ConstantOp getConstFP(mlir::Location loc, mlir::Type t,
251 cir::ConstantOp getSInt32(int32_t c, mlir::Location loc) { in getSInt32()
256 cir::ConstantOp getNullPtr(mlir::Type ty, mlir::Location loc) { in getNullPtr()
258 return create<cir::ConstantOp>(loc, getConstPtrAttr(ty, 0)); in getNullPtr()
H A DCIRGenOpenACC.cpp62 auto constOp = builder.create<mlir::arith::ConstantOp>( in createOpenACCConstantInt()
H A DCIRGenExprScalar.cpp51 auto lhsci = dyn_cast<cir::ConstantOp>(lhs.getDefiningOp()); in mayHaveIntegerOverflow()
52 auto rhsci = dyn_cast<cir::ConstantOp>(rhs.getDefiningOp()); in mayHaveIntegerOverflow()
159 return builder.create<cir::ConstantOp>( in VisitIntegerLiteral()
167 return builder.create<cir::ConstantOp>( in VisitFloatingLiteral()
174 return builder.create<cir::ConstantOp>(cgf.getLoc(e->getExprLoc()), init); in VisitCharacterLiteral()
1016 auto res = b.create<cir::ConstantOp>(loc, builder.getFalseAttr()); in VisitBinLAnd()
1041 auto res = b.create<cir::ConstantOp>(loc, builder.getTrueAttr()); in VisitBinLOr()
H A DCIRGenExprComplex.cpp325 return builder.create<cir::ConstantOp>(loc, complexAttr); in VisitImaginaryLiteral()
H A DCIRGenStmt.cpp679 condVal = b.create<cir::ConstantOp>(loc, builder.getTrueAttr()); in emitForStmt()
H A DCIRGenOpenACCClause.cpp107 auto constOp = builder.create<mlir::arith::ConstantOp>( in createConstantInt()
H A DCIRGenExpr.cpp713 if (auto constantOp = dyn_cast<cir::ConstantOp>(idx.getDefiningOp())) in getConstantIndexOrNull()
/freebsd/contrib/llvm-project/clang/lib/CIR/Dialect/Transforms/
H A DCIRSimplify.cpp100 auto yieldValueDefOp = mlir::dyn_cast_if_present<cir::ConstantOp>( in isSimpleTernaryBranch()
132 mlir::dyn_cast_if_present<cir::ConstantOp>(trueValueOp); in matchAndRewrite()
134 mlir::dyn_cast_if_present<cir::ConstantOp>(falseValueOp); in matchAndRewrite()
269 mlir::dyn_cast_if_present<cir::ConstantOp>(splatValue.getDefiningOp()); in matchAndRewrite()
283 rewriter.replaceOpWithNewOp<cir::ConstantOp>(op, constVecAttr); in matchAndRewrite()
H A DFlattenCFG.cpp198 cir::ConstantOp rangeLength = rewriter.create<cir::ConstantOp>( in condBrToRangeDestination()
201 cir::ConstantOp lowerBoundValue = rewriter.create<cir::ConstantOp>( in condBrToRangeDestination()
/freebsd/contrib/llvm-project/clang/include/clang/CIR/Dialect/Builder/
H A DCIRBaseBuilder.h66 return create<cir::ConstantOp>(loc, cir::IntAttr::get(typ, val)); in getConstAPInt()
69 cir::ConstantOp getConstant(mlir::Location loc, mlir::TypedAttr attr) { in getConstant()
70 return create<cir::ConstantOp>(loc, attr); in getConstant()
73 cir::ConstantOp getConstantInt(mlir::Location loc, mlir::Type ty, in getConstantInt()
79 cir::ConstantOp getNullValue(mlir::Type ty, mlir::Location loc) { in getNullValue()
109 cir::ConstantOp getBool(bool state, mlir::Location loc) { in getBool()
110 return create<cir::ConstantOp>(loc, getCIRBoolAttr(state)); in getBool()
112 cir::ConstantOp getFalse(mlir::Location loc) { return getBool(false, loc); } in getFalse()
113 cir::ConstantOp getTrue(mlir::Location loc) { return getBool(true, loc); } in getTrue()
/freebsd/contrib/llvm-project/clang/lib/CIR/Lowering/DirectToLLVM/
H A DLowerToLLVM.cpp271 return rewriter.create<mlir::LLVM::ConstantOp>( in visitCirAttr()
278 return rewriter.create<mlir::LLVM::ConstantOp>( in visitCirAttr()
306 return rewriter.create<mlir::LLVM::ConstantOp>( in visitCirAttr()
319 mlir::Value ptrVal = rewriter.create<mlir::LLVM::ConstantOp>( in visitCirAttr()
355 auto init = rewriter.create<mlir::LLVM::ConstantOp>( in visitCirAttr()
388 return rewriter.create<mlir::LLVM::ConstantOp>( in visitCirAttr()
466 auto zero = rewriter.create<mlir::LLVM::ConstantOp>( in matchAndRewrite()
474 auto negOne = rewriter.create<mlir::LLVM::ConstantOp>( in matchAndRewrite()
486 auto one = rewriter.create<mlir::LLVM::ConstantOp>(op.getLoc(), resTy, 1); in matchAndRewrite()
520 auto one = rewriter.create<mlir::LLVM::ConstantOp>(op.getLoc(), resTy, 1); in matchAndRewrite()
[all …]
H A DLowerToLLVM.h220 : public mlir::OpConversionPattern<cir::ConstantOp> {
229 matchAndRewrite(cir::ConstantOp op, OpAdaptor,
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/
H A DStackMaps.cpp49 MI.getOperand(Idx).getImm() == StackMaps::ConstantOp); in getConstMetaVal()
183 case StackMaps::ConstantOp: in getNextMetaArgIdx()
236 case StackMaps::ConstantOp: { in parseOperand()
436 assert(MOI->isImm() && MOI->getImm() == StackMaps::ConstantOp); in parseStatepointOpers()
475 assert(MOI->isImm() && MOI->getImm() == StackMaps::ConstantOp); in parseStatepointOpers()
H A DMachineVerifier.cpp2432 MI->getOperand(Offset - 1).getImm() != StackMaps::ConstantOp || in visitMachineInstrBefore()
/freebsd/contrib/llvm-project/clang/lib/CIR/Lowering/
H A DLoweringHelpers.cpp151 return bld.create<mlir::LLVM::ConstantOp>(loc, typ, val); in getConstAPInt()
156 return bld.create<mlir::LLVM::ConstantOp>(loc, typ, val); in getConst()
/freebsd/contrib/llvm-project/clang/lib/CIR/Dialect/IR/
H A DCIRMemorySlot.cpp37 return builder.create<cir::ConstantOp>(getLoc(), in getDefaultValue()
H A DCIRDialect.cpp92 return builder.create<cir::ConstantOp>(loc, type, in materializeConstant()
349 LogicalResult cir::ConstantOp::verify() { in verify()
356 OpFoldResult cir::ConstantOp::fold(FoldAdaptor /*adaptor*/) { in fold()
1719 return !mlir::isa<cir::ConstantOp>(value.getDefiningOp()); in fold()
/freebsd/contrib/llvm-project/llvm/lib/Transforms/InstCombine/
H A DInstCombinePHI.cpp908 Constant *ConstantOp = nullptr; in foldPHIArgOpIntoPHI() local
923 ConstantOp = dyn_cast<Constant>(FirstInst->getOperand(1)); in foldPHIArgOpIntoPHI()
924 if (!ConstantOp) in foldPHIArgOpIntoPHI()
938 } else if (I->getOperand(1) != ConstantOp) { in foldPHIArgOpIntoPHI()
982 BinOp = BinaryOperator::Create(BinOp->getOpcode(), PhiVal, ConstantOp); in foldPHIArgOpIntoPHI()
994 PhiVal, ConstantOp); in foldPHIArgOpIntoPHI()
/freebsd/contrib/llvm-project/llvm/include/llvm/CodeGen/
H A DStackMaps.h294 using OpType = enum { DirectMemRefOp, IndirectMemRefOp, ConstantOp }; enumerator
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/
H A DStatepointLowering.cpp81 Ops.push_back(Builder.DAG.getTargetConstant(StackMaps::ConstantOp, L, in pushStackMapConstant()
H A DFastISel.cpp619 Ops.push_back(MachineOperand::CreateImm(StackMaps::ConstantOp)); in addStackMapLiveVars()
622 Ops.push_back(MachineOperand::CreateImm(StackMaps::ConstantOp)); in addStackMapLiveVars()
H A DSelectionDAGISel.cpp2565 CurDAG->getTargetConstant(StackMaps::ConstantOp, DL, MVT::i64)); in pushStackMapLiveVariable()
H A DLegalizeIntegerTypes.cpp6449 DAG.getTargetConstant(StackMaps::ConstantOp, DL, MVT::i64)); in ExpandIntOp_STACKMAP()
6488 DAG.getTargetConstant(StackMaps::ConstantOp, DL, MVT::i64)); in ExpandIntOp_PATCHPOINT()
/freebsd/contrib/llvm-project/clang/include/clang/CIR/Dialect/IR/
H A DCIROps.td262 // ConstantOp
265 def ConstantOp : CIR_Op<"const",

12