Lines Matching defs:tp
46 OverheadType overheadTypeEncoding(Type tp);
158 TypedAttr getOneAttr(Builder &builder, Type tp);
198 /// type, but returns it as type `memref<? x $tp>` (rather than as type
199 /// `memref<$sz x $tp>`).
200 Value genAlloca(OpBuilder &builder, Location loc, Value sz, Type tp);
203 /// type, and returns it as type `memref<? x $tp>` (staticShape=false) or
204 /// `memref<$sz x $tp>` (staticShape=true).
205 Value genAlloca(OpBuilder &builder, Location loc, unsigned sz, Type tp,
209 /// of the given type, and returns the `memref<$tp>`.
210 Value genAllocaScalar(OpBuilder &builder, Location loc, Type tp);
213 /// and returns it as type `memref<? x $tp>` (rather than specifying the
309 inline Value constantZero(OpBuilder &builder, Location loc, Type tp) {
310 if (auto ctp = dyn_cast<ComplexType>(tp)) {
313 return builder.create<complex::ConstantOp>(loc, tp, zeroa);
315 return builder.create<arith::ConstantOp>(loc, tp, builder.getZeroAttr(tp));
320 inline Value constantOne(OpBuilder &builder, Location loc, Type tp) {
321 if (auto ctp = dyn_cast<ComplexType>(tp)) {
325 return builder.create<complex::ConstantOp>(loc, tp, zeroa);
327 return builder.create<arith::ConstantOp>(loc, tp, getOneAttr(builder, tp));
402 Type tp = cast<ComplexType>(complexAttr.getType()).getElementType();
405 builder.getArrayAttr({FloatAttr::get(tp, complexAttr.getReal()),
406 FloatAttr::get(tp, complexAttr.getImag())}));