@@ -47,22 +47,9 @@ class FirOpBuilder : public mlir::OpBuilder {
47
47
return getRegion ().getParentOfType <mlir::ModuleOp>();
48
48
}
49
49
50
- // / Get the current Function
51
- mlir::FuncOp getFunction () {
52
- return getRegion ().getParentOfType <mlir::FuncOp>();
53
- }
54
-
55
50
// / Get a reference to the kind map.
56
51
const fir::KindMapping &getKindMap () { return kindMap; }
57
52
58
- // / Get the entry block of the current Function
59
- mlir::Block *getEntryBlock () { return &getFunction ().front (); }
60
-
61
- // / Get the block for adding Allocas. If OpenMP is enabled then get the
62
- // / the alloca block from an Operation which can be Outlined. Otherwise
63
- // / use the entry block of the current Function
64
- mlir::Block *getAllocaBlock ();
65
-
66
53
// / Safely create a reference type to the type `eleTy`.
67
54
mlir::Type getRefType (mlir::Type eleTy);
68
55
@@ -104,45 +91,6 @@ class FirOpBuilder : public mlir::OpBuilder {
104
91
return createRealConstant (loc, realType, 0u );
105
92
}
106
93
107
- // / Create a slot for a local on the stack. Besides the variable's type and
108
- // / shape, it may be given name, pinned, or target attributes.
109
- mlir::Value allocateLocal (mlir::Location loc, mlir::Type ty,
110
- llvm::StringRef uniqName, llvm::StringRef name,
111
- bool pinned, llvm::ArrayRef<mlir::Value> shape,
112
- llvm::ArrayRef<mlir::Value> lenParams,
113
- bool asTarget = false );
114
- mlir::Value allocateLocal (mlir::Location loc, mlir::Type ty,
115
- llvm::StringRef uniqName, llvm::StringRef name,
116
- llvm::ArrayRef<mlir::Value> shape,
117
- llvm::ArrayRef<mlir::Value> lenParams,
118
- bool asTarget = false );
119
-
120
- // / Create a temporary. A temp is allocated using `fir.alloca` and can be read
121
- // / and written using `fir.load` and `fir.store`, resp. The temporary can be
122
- // / given a name via a front-end `Symbol` or a `StringRef`.
123
- mlir::Value createTemporary (mlir::Location loc, mlir::Type type,
124
- llvm::StringRef name = {},
125
- mlir::ValueRange shape = {},
126
- mlir::ValueRange lenParams = {},
127
- llvm::ArrayRef<mlir::NamedAttribute> attrs = {});
128
-
129
- // / Create an unnamed and untracked temporary on the stack.
130
- mlir::Value createTemporary (mlir::Location loc, mlir::Type type,
131
- mlir::ValueRange shape) {
132
- return createTemporary (loc, type, llvm::StringRef{}, shape);
133
- }
134
-
135
- mlir::Value createTemporary (mlir::Location loc, mlir::Type type,
136
- llvm::ArrayRef<mlir::NamedAttribute> attrs) {
137
- return createTemporary (loc, type, llvm::StringRef{}, {}, {}, attrs);
138
- }
139
-
140
- mlir::Value createTemporary (mlir::Location loc, mlir::Type type,
141
- llvm::StringRef name,
142
- llvm::ArrayRef<mlir::NamedAttribute> attrs) {
143
- return createTemporary (loc, type, name, {}, {}, attrs);
144
- }
145
-
146
94
// / Create a global value.
147
95
fir::GlobalOp createGlobal (mlir::Location loc, mlir::Type type,
148
96
llvm::StringRef name,
0 commit comments