Skip to content

Commit 25a3ba3

Browse files
committed
Revert "[flang][OpenMP] Decompose compound constructs, do recursive lowering (#90098)"
It breaks some builds, e.g. https://lab.llvm.org/buildbot/#/builders/268/builds/13909 This reverts commit ca1bd59.
1 parent 27595c4 commit 25a3ba3

File tree

16 files changed

+452
-3226
lines changed

16 files changed

+452
-3226
lines changed

flang/lib/Lower/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ add_flang_library(FortranLower
2727
OpenMP/ClauseProcessor.cpp
2828
OpenMP/Clauses.cpp
2929
OpenMP/DataSharingProcessor.cpp
30-
OpenMP/Decomposer.cpp
3130
OpenMP/OpenMP.cpp
3231
OpenMP/ReductionProcessor.cpp
3332
OpenMP/Utils.cpp

flang/lib/Lower/OpenMP/Clauses.cpp

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1227,27 +1227,4 @@ List<Clause> makeClauses(const parser::OmpClauseList &clauses,
12271227
return makeClause(s, semaCtx);
12281228
});
12291229
}
1230-
1231-
bool transferLocations(const List<Clause> &from, List<Clause> &to) {
1232-
bool allDone = true;
1233-
1234-
for (Clause &clause : to) {
1235-
if (!clause.source.empty())
1236-
continue;
1237-
auto found =
1238-
llvm::find_if(from, [&](const Clause &c) { return c.id == clause.id; });
1239-
// This is not completely accurate, but should be good enough for now.
1240-
// It can be improved in the future if necessary, but in cases of
1241-
// synthesized clauses getting accurate location may be impossible.
1242-
if (found != from.end()) {
1243-
clause.source = found->source;
1244-
} else {
1245-
// Found a clause that won't have "source".
1246-
allDone = false;
1247-
}
1248-
}
1249-
1250-
return allDone;
1251-
}
1252-
12531230
} // namespace Fortran::lower::omp

flang/lib/Lower/OpenMP/Clauses.h

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,11 @@
2323

2424
namespace Fortran::lower::omp {
2525
using namespace Fortran;
26+
using SomeType = evaluate::SomeType;
2627
using SomeExpr = semantics::SomeExpr;
2728
using MaybeExpr = semantics::MaybeExpr;
2829

29-
// evaluate::SomeType doesn't provide == operation. It's not really used in
30-
// flang's clauses so far, so a trivial implementation is sufficient.
31-
struct TypeTy : public evaluate::SomeType {
32-
bool operator==(const TypeTy &t) const { return true; }
33-
};
34-
30+
using TypeTy = SomeType;
3531
using IdTy = semantics::Symbol *;
3632
using ExprTy = SomeExpr;
3733

@@ -226,8 +222,6 @@ using When = tomp::clause::WhenT<TypeTy, IdTy, ExprTy>;
226222
using Write = tomp::clause::WriteT<TypeTy, IdTy, ExprTy>;
227223
} // namespace clause
228224

229-
using tomp::type::operator==;
230-
231225
struct CancellationConstructType {
232226
using EmptyTrait = std::true_type;
233227
};
@@ -250,7 +244,6 @@ using ClauseBase = tomp::ClauseT<TypeTy, IdTy, ExprTy,
250244
MemoryOrder, Threadprivate>;
251245

252246
struct Clause : public ClauseBase {
253-
// "source" will be ignored by tomp::type::operator==.
254247
parser::CharBlock source;
255248
};
256249

@@ -265,8 +258,6 @@ Clause makeClause(const Fortran::parser::OmpClause &cls,
265258

266259
List<Clause> makeClauses(const parser::OmpClauseList &clauses,
267260
semantics::SemanticsContext &semaCtx);
268-
269-
bool transferLocations(const List<Clause> &from, List<Clause> &to);
270261
} // namespace Fortran::lower::omp
271262

272263
#endif // FORTRAN_LOWER_OPENMP_CLAUSES_H

flang/lib/Lower/OpenMP/Decomposer.cpp

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

flang/lib/Lower/OpenMP/Decomposer.h

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

0 commit comments

Comments
 (0)