Skip to content

Commit 7bbd7e9

Browse files
committed
Revert "[fir] Add Character helper"
This reverts commit e4ce922. Buildbots not happy with the tests.
1 parent b471e25 commit 7bbd7e9

File tree

10 files changed

+0
-1206
lines changed

10 files changed

+0
-1206
lines changed

flang/include/flang/Optimizer/Builder/Character.h

Lines changed: 0 additions & 192 deletions
This file was deleted.

flang/include/flang/Optimizer/Builder/FIRBuilder.h

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -47,22 +47,9 @@ class FirOpBuilder : public mlir::OpBuilder {
4747
return getRegion().getParentOfType<mlir::ModuleOp>();
4848
}
4949

50-
/// Get the current Function
51-
mlir::FuncOp getFunction() {
52-
return getRegion().getParentOfType<mlir::FuncOp>();
53-
}
54-
5550
/// Get a reference to the kind map.
5651
const fir::KindMapping &getKindMap() { return kindMap; }
5752

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-
6653
/// Safely create a reference type to the type `eleTy`.
6754
mlir::Type getRefType(mlir::Type eleTy);
6855

@@ -104,45 +91,6 @@ class FirOpBuilder : public mlir::OpBuilder {
10491
return createRealConstant(loc, realType, 0u);
10592
}
10693

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-
14694
/// Create a global value.
14795
fir::GlobalOp createGlobal(mlir::Location loc, mlir::Type type,
14896
llvm::StringRef name,

flang/include/flang/Optimizer/Dialect/FIROpsSupport.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,6 @@ constexpr llvm::StringRef getContiguousAttrName() { return "fir.contiguous"; }
6464
/// Attribute to mark Fortran entities with the OPTIONAL attribute.
6565
constexpr llvm::StringRef getOptionalAttrName() { return "fir.optional"; }
6666

67-
/// Attribute to mark Fortran entities with the TARGET attribute.
68-
static constexpr llvm::StringRef getTargetAttrName() { return "fir.target"; }
69-
7067
/// Tell if \p value is:
7168
/// - a function argument that has attribute \p attributeName
7269
/// - or, the result of fir.alloca/fir.allocamem op that has attribute \p

flang/include/flang/Optimizer/Dialect/FIRType.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -161,12 +161,6 @@ inline mlir::Type unwrapSequenceType(mlir::Type t) {
161161
return t;
162162
}
163163

164-
inline mlir::Type unwrapRefType(mlir::Type t) {
165-
if (auto eleTy = dyn_cast_ptrEleTy(t))
166-
return eleTy;
167-
return t;
168-
}
169-
170164
#ifndef NDEBUG
171165
// !fir.ptr<X> and !fir.heap<X> where X is !fir.ptr, !fir.heap, or !fir.ref
172166
// is undefined and disallowed.

flang/lib/Optimizer/Builder/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
get_property(dialect_libs GLOBAL PROPERTY MLIR_DIALECT_LIBS)
2-
32
add_flang_library(FIRBuilder
43
BoxValue.cpp
5-
Character.cpp
64
DoLoopHelper.cpp
75
FIRBuilder.cpp
86

0 commit comments

Comments
 (0)