Skip to content

Commit 4482e5d

Browse files
authored
Merge branch 'users/kparzysz/spr/d01-flang-depend-update' into users/kparzysz/spr/d02-flang-omp-hint
2 parents eff3d01 + 1672f0b commit 4482e5d

File tree

5 files changed

+11
-17
lines changed

5 files changed

+11
-17
lines changed

flang/examples/FeatureList/FeatureList.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -473,8 +473,8 @@ struct NodeVisitor {
473473
READ_FEATURE(OmpDependClause::InOut)
474474
READ_FEATURE(OmpDependClause::Sink)
475475
READ_FEATURE(OmpDependClause::Source)
476-
READ_FEATURE(OmpDependenceType)
477-
READ_FEATURE(OmpDependenceType::Type)
476+
READ_FEATURE(OmpTaskDependenceType)
477+
READ_FEATURE(OmpTaskDependenceType::Type)
478478
READ_FEATURE(OmpDependSinkVec)
479479
READ_FEATURE(OmpDependSinkVecLength)
480480
READ_FEATURE(OmpEndAllocators)

flang/include/flang/Semantics/symbol.h

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@
2424
#include <set>
2525
#include <vector>
2626

27-
#include "llvm/Support/Signals.h"
28-
2927
namespace llvm {
3028
class raw_ostream;
3129
}
@@ -755,9 +753,9 @@ class Symbol {
755753
// OpenMP miscellaneous flags
756754
OmpCommonBlock, OmpReduction, OmpAligned, OmpNontemporal, OmpAllocate,
757755
OmpDeclarativeAllocateDirective, OmpExecutableAllocateDirective,
758-
OmpDependClause, OmpDeclareSimd, OmpDeclareTarget, OmpThreadprivate,
759-
OmpDeclareReduction, OmpFlushed, OmpCriticalLock, OmpIfSpecified, OmpNone,
760-
OmpPreDetermined, OmpImplicit);
756+
OmpDeclareSimd, OmpDeclareTarget, OmpThreadprivate, OmpDeclareReduction,
757+
OmpFlushed, OmpCriticalLock, OmpIfSpecified, OmpNone, OmpPreDetermined,
758+
OmpImplicit);
761759
using Flags = common::EnumSet<Flag, Flag_enumSize>;
762760

763761
const Scope &owner() const { return *owner_; }
@@ -978,7 +976,6 @@ template <std::size_t BLOCK_SIZE> class Symbols {
978976
}
979977

980978
private:
981-
static int counter;
982979
using blockType = std::array<Symbol, BLOCK_SIZE>;
983980
std::list<blockType *> blocks_;
984981
std::size_t nextIndex_{0};
@@ -997,8 +994,6 @@ template <std::size_t BLOCK_SIZE> class Symbols {
997994
}
998995
};
999996

1000-
template <std::size_t BLOCK_SIZE> int Symbols<BLOCK_SIZE>::counter;
1001-
1002997
// Define a few member functions here in the header so that they
1003998
// can be used by lib/Evaluate without inducing a dependence cycle
1004999
// between the two shared libraries.

flang/lib/Lower/OpenMP/Clauses.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -597,10 +597,9 @@ Depend make(const parser::OmpClause::Depend &inp,
597597
[&](const wrapped::InOut &s) -> Variant {
598598
auto &t0 = std::get<parser::OmpTaskDependenceType>(s.t);
599599
auto &t1 = std::get<parser::OmpObjectList>(s.t);
600-
return Depend::DepType{
601-
{/*TaskDependenceType=*/convert1(t0.v),
602-
/*Iterator=*/std::nullopt,
603-
/*LocatorList=*/makeObjects(t1, semaCtx)}};
600+
return Depend::DepType{{/*TaskDependenceType=*/convert1(t0.v),
601+
/*Iterator=*/std::nullopt,
602+
/*LocatorList=*/makeObjects(t1, semaCtx)}};
604603
},
605604
},
606605
inp.v.u)};

flang/lib/Semantics/resolve-directives.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
#include <map>
2626
#include <sstream>
2727

28-
#include "llvm/Support/Signals.h"
2928
template <typename T>
3029
static Fortran::semantics::Scope *GetScope(
3130
Fortran::semantics::SemanticsContext &context, const T &x) {
@@ -443,7 +442,8 @@ class OmpAttributeVisitor : DirectiveAttributeVisitor<llvm::omp::Directive> {
443442
// Iterate over elements of x, and resolve any common blocks that
444443
// are still unresolved.
445444
for (const parser::OmpObject &obj : x.v) {
446-
if (auto *name{std::get_if<parser::Name>(&obj.u)}) {
445+
auto *name{std::get_if<parser::Name>(&obj.u)};
446+
if (name && !name->symbol) {
447447
Resolve(*name, currScope().MakeCommonBlock(name->source));
448448
}
449449
}

llvm/include/llvm/Frontend/OpenMP/ClauseT.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ struct DependT {
503503
using LocatorList = ObjectListT<I, E>;
504504
using TaskDependenceType = tomp::type::TaskDependenceType;
505505

506-
struct DepType { // The form with task dependence type.
506+
struct DepType { // The form with task dependence type.
507507
using TupleTrait = std::true_type;
508508
// Empty LocatorList means "omp_all_memory".
509509
std::tuple<TaskDependenceType, OPT(Iterator), LocatorList> t;

0 commit comments

Comments
 (0)