Home
last modified time | relevance | path

Searched refs:builder (Results 1 – 25 of 452) sorted by relevance

12345678910>>...19

/llvm-project-15.0.7/flang/lib/Optimizer/Builder/
H A DLowLevelIntrinsics.cpp25 auto ptrTy = builder.getRefType(builder.getIntegerType(8)); in getLlvmMemcpy()
30 return builder.addNamedFunction(builder.getUnknownLoc(), in getLlvmMemcpy()
35 auto ptrTy = builder.getRefType(builder.getIntegerType(8)); in getLlvmMemmove()
40 return builder.addNamedFunction(builder.getUnknownLoc(), in getLlvmMemmove()
45 auto ptrTy = builder.getRefType(builder.getIntegerType(8)); in getLlvmMemset()
50 return builder.addNamedFunction(builder.getUnknownLoc(), in getLlvmMemset()
55 auto ptrTy = builder.getRefType(builder.getIntegerType(8)); in getRealloc()
63 auto ptrTy = builder.getRefType(builder.getIntegerType(8)); in getLlvmStackSave()
72 auto ptrTy = builder.getRefType(builder.getIntegerType(8)); in getLlvmStackRestore()
84 return builder.addNamedFunction(builder.getUnknownLoc(), in getLlvmInitTrampoline()
[all …]
H A DCharacter.cpp214 auto len = builder.createConvert(loc, builder.getCharacterLengthType(), in createEmbox()
272 auto i = builder.createConvert(loc, builder.getIndexType(), index); in createElementAddr()
390 auto ref = builder.createConvert(loc, builder.getRefType(sourceTy), in createTempFrom()
453 auto lhsLen = builder.createConvert(loc, builder.getCharacterLengthType(), in createConcatenate()
455 auto rhsLen = builder.createConvert(loc, builder.getCharacterLengthType(), in createConcatenate()
649 auto zero = builder.getIntegerAttr(builder.getIndexType(), 0); in createSingletonFromCode()
660 auto zero = builder.getIntegerAttr(builder.getIndexType(), 0); in extractCodeFromSingleton()
703 {builder.getIntegerAttr(builder.getIndexType(), 0)})); in extractCharacterProcedureTuple()
712 {builder.getIntegerAttr(builder.getIndexType(), 1)})); in extractCharacterProcedureTuple()
729 {builder.getIntegerAttr(builder.getIndexType(), 0)})); in createCharacterProcedureTuple()
[all …]
H A DMutableBox.cpp100 : builder{builder}, loc{loc}, box{box} { in MutablePropertyReader()
186 fir::FirOpBuilder &builder; member in __anone969b6080111::MutablePropertyReader
197 : builder{builder}, loc{loc}, box{box} {} in MutablePropertyWriter()
224 builder.create<fir::StoreOp>(loc, builder.createNullConstant(loc, nullTy), in setUnallocatedStatus()
282 builder.create<fir::StoreOp>(loc, builder.createConvert(loc, type, val), in updateMutableProperties()
293 builder.createIntegerConstant(loc, builder.getIndexType(), 1); in updateMutableProperties()
312 fir::FirOpBuilder &builder; member in __anone969b6080111::MutablePropertyWriter
335 auto zero = builder.createIntegerConstant(loc, builder.getIndexType(), 0); in createUnallocatedBox()
565 return builder.createConvert(loc, builder.getRefType(ty), addr); in associateMutableBoxWithRemap()
746 builder in genReallocIfNeeded()
[all …]
/llvm-project-15.0.7/mlir/lib/Dialect/Math/Transforms/
H A DPolynomialApproximation.cpp178 return builder.create<arith::BitcastOp>(builder.getF32Type(), i32Value); in f32FromBits()
202 return max(builder, min(builder, value, upperBound), lowerBound); in clamp()
277 return broadcast(builder, f32Cst(builder, 0.0f), shape); in makePolynomialCalculation()
374 auto one = broadcast(builder, f32Cst(builder, 1.0f), shape); in matchAndRewrite()
386 auto n1 = broadcast(builder, f32Cst(builder, 0.14418283f), shape); in matchAndRewrite()
387 auto n2 = broadcast(builder, f32Cst(builder, -0.34999234f), shape); in matchAndRewrite()
388 auto n3 = broadcast(builder, f32Cst(builder, -0.01067831f), shape); in matchAndRewrite()
389 auto n4 = broadcast(builder, f32Cst(builder, 1.00209986f), shape); in matchAndRewrite()
436 auto zero = broadcast(builder, f32Cst(builder, 0.0f), shape); in matchAndRewrite()
437 auto pi = broadcast(builder, f32Cst(builder, 3.14159265359f), shape); in matchAndRewrite()
[all …]
/llvm-project-15.0.7/mlir/lib/Conversion/LLVMCommon/
H A DMemRefBuilder.cpp63 descr.setAllocatedPtr(builder, loc, memory); in fromStaticShape()
64 descr.setAlignedPtr(builder, loc, memory); in fromStaticShape()
101 return builder.create<LLVM::ConstantOp>( in createIndexAttrConstant()
102 loc, resultType, builder.getIntegerAttr(builder.getIndexType(), value)); in createIndexAttrConstant()
107 return builder.create<LLVM::ExtractValueOp>( in offset()
123 setOffset(builder, loc, in setConstantOffset()
166 setSize(builder, loc, pos, in setConstantSize()
187 setStride(builder, loc, pos, in setConstantStride()
236 results.push_back(d.offset(builder, loc)); in unpack()
331 results.push_back(d.rank(builder, loc)); in unpack()
[all …]
/llvm-project-15.0.7/flang/unittests/Optimizer/Builder/
H A DFIRBuilderTest.cpp47 auto zero1 = builder.createIntegerConstant(loc, builder.getIndexType(), 0); in createCondition()
48 auto zero2 = builder.createIntegerConstant(loc, builder.getIndexType(), 0); in createCondition()
109 builder.createIntegerConstant(loc, builder.getIndexType(), 0); in TEST_F()
120 builder.createIntegerConstant(loc, builder.getIndexType(), 0); in TEST_F()
166 auto ty = builder.getVarLenSeqTy(builder.getI64Type()); in TEST_F()
246 fir::factory::locationToLineNo(builder, loc, builder.getI64Type()); in TEST_F()
249 builder, builder.getUnknownLoc(), builder.getI64Type()); in TEST_F()
258 auto seqTy = builder.getVarLenSeqTy(builder.getI64Type(), 10); in TEST_F()
357 auto c10 = builder.createIntegerConstant(loc, builder.getI64Type(), 10); in TEST_F()
367 auto c10 = builder.createIntegerConstant(loc, builder.getI64Type(), 10); in TEST_F()
[all …]
/llvm-project-15.0.7/mlir/lib/Dialect/SparseTensor/Transforms/
H A DCodegenUtils.h40 Type getOverheadType(Builder &builder, OverheadType ot);
49 Type getPointerOverheadType(Builder &builder,
53 Type getIndexOverheadType(Builder &builder,
85 Attribute getOneAttr(Builder &builder, Type tp);
112 auto zeroa = builder.getArrayAttr({zeroe, zeroe}); in constantZero()
115 return builder.create<arith::ConstantOp>(loc, tp, builder.getZeroAttr(tp)); in constantZero()
124 auto zeroa = builder.getArrayAttr({onee, zeroe}); in constantOne()
127 return builder.create<arith::ConstantOp>(loc, tp, getOneAttr(builder, tp)); in constantOne()
163 return constantI32(builder, loc, in constantOverheadTypeEncoding()
184 return constantI32(builder, loc, in constantPrimaryTypeEncoding()
[all …]
/llvm-project-15.0.7/flang/lib/Optimizer/Builder/Runtime/
H A DTransformational.cpp34 builder.create<fir::CallOp>(loc, cshiftFunc, args); in genCshift()
38 void fir::runtime::genCshiftVector(fir::FirOpBuilder &builder, in genCshiftVector() argument
50 builder.create<fir::CallOp>(loc, cshiftFunc, args); in genCshiftVector()
67 builder.create<fir::CallOp>(loc, eoshiftFunc, args); in genEoshift()
86 builder.create<fir::CallOp>(loc, eoshiftFunc, args); in genEoshiftVector()
101 builder.create<fir::CallOp>(loc, func, args); in genMatmul()
116 builder.create<fir::CallOp>(loc, packFunc, args); in genPack()
132 builder.create<fir::CallOp>(loc, func, args); in genReshape()
147 builder.create<fir::CallOp>(loc, func, args); in genSpread()
160 builder.create<fir::CallOp>(loc, func, args); in genTranspose()
[all …]
H A DReduction.cpp399 builder.create<fir::CallOp>(loc, func, args); in genReduction2Args()
417 builder.create<fir::CallOp>(loc, func, args); in genReduction3Args()
434 builder.create<fir::CallOp>(loc, func, args); in genReduction4Args()
451 builder.create<fir::CallOp>(loc, func, args); in genReduction5Args()
512 builder.create<fir::CallOp>(loc, func, args); in genCountDim()
546 auto dim = builder.createIntegerConstant(loc, builder.getIndexType(), 0); in genMaxval()
662 auto dim = builder.createIntegerConstant(loc, builder.getIndexType(), 0); in genMinval()
716 auto dim = builder.createIntegerConstant(loc, builder.getIndexType(), 0); in genProduct()
797 loc, builder); in genDotProduct()
800 loc, builder); in genDotProduct()
[all …]
H A DCharacter.cpp37 builder.create<fir::CallOp>(loc, func, args); in genCharacterSearch()
75 builder.create<fir::CallOp>(loc, adjustFunc, args); in genAdjust()
82 genAdjust(builder, loc, resultBox, stringBox, adjustFunc); in genAdjustL()
89 genAdjust(builder, loc, resultBox, stringBox, adjustFunc); in genAdjustR()
101 loc, builder); in genCharCompare()
105 loc, builder); in genCharCompare()
109 loc, builder); in genCharCompare()
134 builder.create<fir::StoreOp>(loc, base, mem); in genCharCompare()
192 builder.create<fir::CallOp>(loc, repeatFunc, args); in genRepeat()
205 builder.create<fir::CallOp>(loc, trimFunc, args); in genTrim()
[all …]
H A DRagged.cpp21 auto i32Ty = builder.getIntegerType(32); in genRaggedArrayAllocate()
23 auto i64Ty = builder.getIntegerType(64); in genRaggedArrayAllocate()
27 auto i1Ty = builder.getIntegerType(1); in genRaggedArrayAllocate()
33 auto one = builder.createIntegerConstant(loc, i32Ty, 1); in genRaggedArrayAllocate()
37 auto heap = builder.create<fir::LoadOp>(loc, ptr); in genRaggedArrayAllocate()
38 auto cmp = builder.genIsNullAddr(loc, heap); in genRaggedArrayAllocate()
39 builder.genIfThen(loc, cmp) in genRaggedArrayAllocate()
50 builder.create<fir::StoreOp>(loc, castVal, addr); in genRaggedArrayAllocate()
54 builder.create<fir::CallOp>(loc, func, args); in genRaggedArrayAllocate()
63 loc, builder); in genRaggedArrayDeallocate()
[all …]
H A DInquiry.cpp17 mlir::Value fir::runtime::genLboundDim(fir::FirOpBuilder &builder, in genLboundDim() argument
21 fir::runtime::getRuntimeFunc<mkRTKey(LboundDim)>(loc, builder); in genLboundDim()
23 auto sourceFile = fir::factory::locationToFilename(builder, loc); in genLboundDim()
25 fir::factory::locationToLineNo(builder, loc, fTy.getInput(3)); in genLboundDim()
38 fir::runtime::getRuntimeFunc<mkRTKey(Ubound)>(loc, builder); in genUbound()
40 auto sourceFile = fir::factory::locationToFilename(builder, loc); in genUbound()
45 builder.create<fir::CallOp>(loc, uboundFunc, args).getResult(0); in genUbound()
50 mlir::Value fir::runtime::genSizeDim(fir::FirOpBuilder &builder, in genSizeDim() argument
54 fir::runtime::getRuntimeFunc<mkRTKey(SizeDim)>(loc, builder); in genSizeDim()
66 mlir::Value fir::runtime::genSize(fir::FirOpBuilder &builder, in genSize() argument
[all …]
H A DNumeric.cpp210 mlir::Value fir::runtime::genExponent(fir::FirOpBuilder &builder, in genExponent() argument
243 builder.createConvert(loc, funcTy.getInput(0), x)}; in genExponent()
249 mlir::Value fir::runtime::genFraction(fir::FirOpBuilder &builder, in genFraction() argument
268 builder.createConvert(loc, funcTy.getInput(0), x)}; in genFraction()
274 mlir::Value fir::runtime::genNearest(fir::FirOpBuilder &builder, in genNearest() argument
296 mlir::Value zero = builder.createRealZeroConstant(loc, sTy); in genNearest()
297 auto cmp = builder.create<mlir::arith::CmpFOp>( in genNearest()
332 builder.createConvert(loc, funcTy.getInput(0), x)}; in genRRSpacing()
338 mlir::Value fir::runtime::genScale(fir::FirOpBuilder &builder, in genScale() argument
376 mlir::Value xKind = builder.createIntegerConstant( in genSelectedIntKind()
[all …]
H A DCommand.cpp31 fir::runtime::getRuntimeFunc<mkRTKey(ArgumentCount)>(loc, builder); in genCommandArgumentCount()
32 return builder.create<fir::CallOp>(loc, argumentCountFunc).getResult(0); in genCommandArgumentCount()
35 mlir::Value fir::runtime::genArgumentValue(fir::FirOpBuilder &builder, in genArgumentValue() argument
41 fir::runtime::getRuntimeFunc<mkRTKey(ArgumentValue)>(loc, builder); in genArgumentValue()
47 mlir::Value fir::runtime::genArgumentLength(fir::FirOpBuilder &builder, in genArgumentLength() argument
51 fir::runtime::getRuntimeFunc<mkRTKey(ArgumentLength)>(loc, builder); in genArgumentLength()
53 builder, loc, argumentLengthFunc.getFunctionType(), number); in genArgumentLength()
54 return builder.create<fir::CallOp>(loc, argumentLengthFunc, args) in genArgumentLength()
59 fir::FirOpBuilder &builder, mlir::Location loc, mlir::Value name, in genEnvVariableValue() argument
70 return builder.create<fir::CallOp>(loc, valueFunc, args).getResult(0); in genEnvVariableValue()
[all …]
/llvm-project-15.0.7/flang/lib/Lower/
H A DRuntime.cpp32 builder.create<fir::UnreachableOp>(loc); in genUnreachable()
34 builder.getBlock()->splitBlock(builder.getInsertionPoint()); in genUnreachable()
35 builder.setInsertionPointToStart(newBlock); in genUnreachable()
61 loc, builder); in genStopStatement()
71 loc, builder); in genStopStatement()
108 genUnreachable(builder, loc); in genStopStatement()
118 genUnreachable(builder, loc); in genFailImageStatement()
274 builder.create<fir::CallOp>(loc, func); in genRandomSeed()
343 ifOp = builder.create<fir::IfOp>(loc, builder.genIsNotNullAddr(loc, arg), in genSystemClock()
346 ifOp = builder.create<fir::IfOp>( in genSystemClock()
[all …]
H A DIntrinsicCall.cpp148 ? builder.createIntegerConstant(loc, builder.getIndexType(), 0) in genFuncDim()
418 : builder{builder}, loc{loc}, stmtCtx{stmtCtx} {} in IntrinsicLibrary()
2837 trim = builder in genGetEnvironmentVariable()
3076 ? builder.createIntegerConstant(loc, builder.getI1Type(), 0) in genIndex()
3089 builder.getContext(), builder.getKindMap().defaultLogicalKind()); in genIndex()
3569 return builder.create<fir::IsPresentOp>(loc, builder.getI1Type(), in genPresent()
3725 ? builder.createIntegerConstant(loc, builder.getI1Type(), 0) in genScan()
3738 builder.getContext(), builder.getKindMap().defaultLogicalKind()); in genScan()
3894 return builder in genSize()
4362 ? builder.createIntegerConstant(loc, builder.getI1Type(), 0) in genVerify()
[all …]
H A DIO.cpp184 builder.create<fir::CallOp>( in genEndIO()
230 resTy = builder.getI1Type(); in makeNextConditionalOn()
347 listFunc(builder); in getNamelistGroup()
381 groupFunc(builder); in getNamelistGroup()
564 auto boolType = builder.getRefType(builder.getI1Type()); in boolRefToLogical()
684 return builder.createConvert(loc, builder.getIndexType(), v); in genIoLoop()
733 builder.createIntegerConstant(loc, builder.getI1Type(), 0); in genIoLoop()
1430 builder.createIntegerConstant(loc, builder.getIndexType(), 0)); in lowerReferenceAsStringSelect()
1805 loc, builder); in getBeginDataTransferFunc()
1827 loc, builder); in getBeginDataTransferFunc()
[all …]
H A DVectorSubscripts.cpp86 mlir::Type idxTy = builder.getIndexType(); in gen()
165 mlir::Type idxTy = builder.getIndexType(); in genRankedArrayRefSubscriptAndBase()
257 fir::FirOpBuilder &builder, mlir::Location loc, in loopOverElementsBase() argument
261 mlir::Value slice = createSlice(builder, loc); in loopOverElementsBase()
294 builder.create<fir::ResultOp>(loc, res); in loopOverElementsBase()
295 builder.setInsertionPointAfter(outerLoop); in loopOverElementsBase()
299 builder.setInsertionPointAfter(outerLoop); in loopOverElementsBase()
305 fir::FirOpBuilder &builder, mlir::Location loc, in loopOverElements() argument
324 mlir::Type idxTy = builder.getIndexType(); in createSlice()
353 mlir::Type idxTy = builder.getIndexType(); in genLoopBounds()
[all …]
/llvm-project-15.0.7/mlir/include/mlir/Conversion/LLVMCommon/
H A DMemRefBuilder.h48 Value allocatedPtr(OpBuilder &builder, Location loc);
53 Value alignedPtr(OpBuilder &builder, Location loc);
59 Value offset(OpBuilder &builder, Location loc);
96 static Value pack(OpBuilder &builder, Location loc,
154 Value rank(OpBuilder &builder, Location loc);
158 Value memRefDescPtr(OpBuilder &builder, Location loc);
166 static Value pack(OpBuilder &builder, Location loc,
210 static Value offset(OpBuilder &builder, Location loc,
224 static Value size(OpBuilder &builder, Location loc,
228 static void setSize(OpBuilder &builder, Location loc,
[all …]
/llvm-project-15.0.7/mlir/lib/Target/LLVMIR/Dialect/OpenACC/
H A DOpenACCToLLVMIRTranslation.cpp117 builder.CreateGEP(basePtr->getType(), null, builder.getInt32(1)); in getSizeInBytes()
126 processOperands(llvm::IRBuilderBase &builder, in processOperands() argument
167 {builder.getInt32(0), builder.getInt32(index)}); in processOperands()
175 {builder.getInt32(0), builder.getInt32(index)}); in processOperands()
178 builder.CreateStore(dataPtr, ptrCast); in processOperands()
183 {builder.getInt32(0), builder.getInt32(index)}); in processOperands()
184 builder.CreateStore(dataSize, sizeGEP); in processOperands()
390 auto afterDataRegion = builder.saveIP(); in convertDataOp()
394 builder.restoreIP(afterDataRegion); in convertDataOp()
414 builder.CreateBr(endDataBlock); in convertDataOp()
[all …]
/llvm-project-15.0.7/flang/include/flang/Optimizer/Builder/
H A DFactory.h74 auto insPt = builder.saveInsertionPoint(); in genCharacterCopy()
75 builder.setInsertionPointToStart(loop.getBody()); in genCharacterCopy()
88 : builder in genCharacterCopy()
92 builder.restoreInsertionPoint(insPt); in genCharacterCopy()
96 return builder.template create<mlir::arith::SubIOp>( in genCharacterCopy()
101 : builder in genCharacterCopy()
106 auto insPt = builder.saveInsertionPoint(); in genCharacterCopy()
107 builder.setInsertionPointToStart(loop.getBody()); in genCharacterCopy()
112 : builder in genCharacterCopy()
122 auto in = builder.template create<fir::CoordinateOp>( in genCharacterCopy()
[all …]
/llvm-project-15.0.7/llvm/examples/ExceptionDemo/
H A DExceptionDemo.cpp989 builder.SetInsertPoint(ret); in createFinallyBlock()
996 builder, in createFinallyBlock()
1000 llvm::SwitchInst *theSwitch = builder.CreateSwitch(builder.CreateLoad( in createFinallyBlock()
1036 builder.SetInsertPoint(ret); in createCatchBlock()
1190 builder.CreateRetVoid(); in createCatchWrappedInvokeFunction()
1209 builder.CreateResume(builder.CreateLoad(caughtResultStorage)); in createCatchWrappedInvokeFunction()
1245 builder.CreateLoad(builder.CreateStructGEP( in createCatchWrappedInvokeFunction()
1253 builder.CreateCondBr(builder.CreateICmpEQ(unwindExceptionClass, in createCatchWrappedInvokeFunction()
1292 builder.CreateStructGEP(builder.getInt8PtrTy(), typeInfoThrown, 0); in createCatchWrappedInvokeFunction()
1617 builder.getInt8PtrTy(), in createStandardUtilityFunctions()
[all …]
/llvm-project-15.0.7/flang/unittests/Optimizer/Builder/Runtime/
H A DCharacterTest.cpp34 auto loc = builder.getUnknownLoc(); in checkCharCompare1()
40 mlir::Value res = fir::runtime::genCharCompare(builder, loc, in checkCharCompare1()
53 checkCharCompare1(builder, charTy, fctName); in checkCharCompare1AllTypeForKind()
54 checkCharCompare1(builder, seqCharTy, fctName); in checkCharCompare1AllTypeForKind()
55 checkCharCompare1(builder, refCharTy, fctName); in checkCharCompare1AllTypeForKind()
56 checkCharCompare1(builder, boxCharTy, fctName); in checkCharCompare1AllTypeForKind()
57 checkCharCompare1(builder, boxTy, fctName); in checkCharCompare1AllTypeForKind()
71 auto loc = builder.getUnknownLoc(); in checkCharCompare2()
98 auto loc = builder.getUnknownLoc(); in checkGenIndex()
159 auto loc = builder.getUnknownLoc(); in checkGenScan()
[all …]
/llvm-project-15.0.7/mlir/lib/Target/LLVMIR/Dialect/OpenMP/
H A DOpenMPToLLVMIRTranslation.cpp100 if (builder.GetInsertBlock() == in findAllocaInsertPoint()
102 assert(builder.GetInsertPoint() == builder.GetInsertBlock()->end() && in findAllocaInsertPoint()
105 builder.getContext(), "entry", builder.GetInsertBlock()->getParent(), in findAllocaInsertPoint()
107 builder.CreateBr(entryBB); in findAllocaInsertPoint()
494 return builder.saveIP(); in makeReductionGen()
589 builder.restoreIP( in convertOmpOrderedRegion()
792 builder.restoreIP(ip); in convertOmpWsLoop()
849 builder.restoreIP(afterIP); in convertOmpWsLoop()
934 builder.restoreIP(ip); in convertOmpSimdLoop()
976 builder.restoreIP(afterIP); in convertOmpSimdLoop()
[all …]
/llvm-project-15.0.7/mlir/unittests/IR/
H A DInterfaceTest.cpp29 auto op1 = builder.create<test::SideEffectOp>(builder.getUnknownLoc(), in TEST()
31 auto op2 = builder.create<test::SideEffectOp>(builder.getUnknownLoc(), in TEST()
33 auto op3 = builder.create<test::SideEffectOp>(builder.getUnknownLoc(), in TEST()
48 OpBuilder builder(&context); in TEST() local
51 auto attr1 = builder.getArrayAttr({}); in TEST()
52 auto attr2 = builder.getI32ArrayAttr({0}); in TEST()
53 auto attr3 = builder.getI32ArrayAttr({1}); in TEST()
66 OpBuilder builder(&context); in TEST() local
68 auto type1 = builder.getType<test::TestTypeWithLayoutType>(1); in TEST()
69 auto type2 = builder.getType<test::TestTypeWithLayoutType>(2); in TEST()
[all …]

12345678910>>...19