Skip to content

Commit 1778938

Browse files
authored
Revert "[MLIR][OpenMP] Add MLIR Lowering Support for dist_schedule (#152736)"
This reverts commit 47ae3ea.
1 parent 920a091 commit 1778938

File tree

10 files changed

+93
-464
lines changed

10 files changed

+93
-464
lines changed

flang/docs/OpenMPSupport.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -42,24 +42,24 @@ Note : No distinction is made between the support in Parser/Semantics, MLIR, Low
4242
| target update construct | P | device clause not supported |
4343
| declare target directive | P | |
4444
| teams construct | Y | |
45-
| distribute construct | P | |
46-
| distribute simd construct | P | linear clauses are not supported |
47-
| distribute parallel loop construct | P | |
48-
| distribute parallel loop simd construct | P | linear clauses are not supported |
45+
| distribute construct | P | dist_schedule clause not supported |
46+
| distribute simd construct | P | dist_schedule and linear clauses are not supported |
47+
| distribute parallel loop construct | P | dist_schedule clause not supported |
48+
| distribute parallel loop simd construct | P | dist_schedule and linear clauses are not supported |
4949
| depend clause | Y | |
5050
| declare reduction construct | N | |
5151
| atomic construct extensions | Y | |
5252
| cancel construct | Y | |
5353
| cancellation point construct | Y | |
5454
| parallel do simd construct | P | linear clause not supported |
5555
| target teams construct | P | device clause not supported |
56-
| teams distribute construct | P | |
57-
| teams distribute simd construct | P | linear clause is not supported |
58-
| target teams distribute construct | P | device clause is not supported |
59-
| teams distribute parallel loop construct | P | |
60-
| target teams distribute parallel loop construct | P | device clause is not supported |
61-
| teams distribute parallel loop simd construct | P | linear clause is not supported |
62-
| target teams distribute parallel loop simd construct | P | device and linear clauses are not supported |
56+
| teams distribute construct | P | dist_schedule clause not supported |
57+
| teams distribute simd construct | P | dist_schedule and linear clauses are not supported |
58+
| target teams distribute construct | P | device and dist_schedule clauses are not supported |
59+
| teams distribute parallel loop construct | P | dist_schedule clause not supported |
60+
| target teams distribute parallel loop construct | P | device and dist_schedule clauses are not supported |
61+
| teams distribute parallel loop simd construct | P | dist_schedule and linear clauses are not supported |
62+
| target teams distribute parallel loop simd construct | P | device, dist_schedule and linear clauses are not supported |
6363

6464
## Extensions
6565
### ATOMIC construct

llvm/include/llvm/Frontend/OpenMP/OMP.td

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -490,8 +490,7 @@ def OMP_SCHEDULE_Dynamic : EnumVal<"dynamic", 3, 1> {}
490490
def OMP_SCHEDULE_Guided : EnumVal<"guided", 4, 1> {}
491491
def OMP_SCHEDULE_Auto : EnumVal<"auto", 5, 1> {}
492492
def OMP_SCHEDULE_Runtime : EnumVal<"runtime", 6, 1> {}
493-
def OMP_SCHEDULE_Distribute : EnumVal<"distribute", 7, 1> {}
494-
def OMP_SCHEDULE_Default : EnumVal<"default", 8, 0> { let isDefault = 1; }
493+
def OMP_SCHEDULE_Default : EnumVal<"default", 7, 0> { let isDefault = 1; }
495494
def OMPC_Schedule : Clause<[Spelling<"schedule">]> {
496495
let clangClass = "OMPScheduleClause";
497496
let flangClass = "OmpScheduleClause";
@@ -502,7 +501,6 @@ def OMPC_Schedule : Clause<[Spelling<"schedule">]> {
502501
OMP_SCHEDULE_Guided,
503502
OMP_SCHEDULE_Auto,
504503
OMP_SCHEDULE_Runtime,
505-
OMP_SCHEDULE_Distribute,
506504
OMP_SCHEDULE_Default
507505
];
508506
}

llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h

Lines changed: 7 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1133,17 +1133,11 @@ class OpenMPIRBuilder {
11331133
/// \param NeedsBarrier Indicates whether a barrier must be inserted after
11341134
/// the loop.
11351135
/// \param LoopType Type of workshare loop.
1136-
/// \param HasDistSchedule Defines if the clause being lowered is
1137-
/// dist_schedule as this is handled slightly differently
1138-
/// \param DistScheduleSchedType Defines the Schedule Type for the Distribute
1139-
/// loop. Defaults to None if no Distribute loop is present.
11401136
///
11411137
/// \returns Point where to insert code after the workshare construct.
11421138
InsertPointOrErrorTy applyStaticWorkshareLoop(
11431139
DebugLoc DL, CanonicalLoopInfo *CLI, InsertPointTy AllocaIP,
1144-
omp::WorksharingLoopType LoopType, bool NeedsBarrier,
1145-
bool HasDistSchedule = false,
1146-
omp::OMPScheduleType DistScheduleSchedType = omp::OMPScheduleType::None);
1140+
omp::WorksharingLoopType LoopType, bool NeedsBarrier);
11471141

11481142
/// Modifies the canonical loop a statically-scheduled workshare loop with a
11491143
/// user-specified chunk size.
@@ -1156,22 +1150,13 @@ class OpenMPIRBuilder {
11561150
/// \param NeedsBarrier Indicates whether a barrier must be inserted after the
11571151
/// loop.
11581152
/// \param ChunkSize The user-specified chunk size.
1159-
/// \param SchedType Optional type of scheduling to be passed to the init
1160-
/// function.
1161-
/// \param DistScheduleChunkSize The size of dist_shcedule chunk considered
1162-
/// as a unit when
1163-
/// scheduling. If \p nullptr, defaults to 1.
1164-
/// \param DistScheduleSchedType Defines the Schedule Type for the Distribute
1165-
/// loop. Defaults to None if no Distribute loop is present.
11661153
///
11671154
/// \returns Point where to insert code after the workshare construct.
1168-
InsertPointOrErrorTy applyStaticChunkedWorkshareLoop(
1169-
DebugLoc DL, CanonicalLoopInfo *CLI, InsertPointTy AllocaIP,
1170-
bool NeedsBarrier, Value *ChunkSize,
1171-
omp::OMPScheduleType SchedType =
1172-
omp::OMPScheduleType::UnorderedStaticChunked,
1173-
Value *DistScheduleChunkSize = nullptr,
1174-
omp::OMPScheduleType DistScheduleSchedType = omp::OMPScheduleType::None);
1155+
InsertPointOrErrorTy applyStaticChunkedWorkshareLoop(DebugLoc DL,
1156+
CanonicalLoopInfo *CLI,
1157+
InsertPointTy AllocaIP,
1158+
bool NeedsBarrier,
1159+
Value *ChunkSize);
11751160

11761161
/// Modifies the canonical loop to be a dynamically-scheduled workshare loop.
11771162
///
@@ -1250,10 +1235,6 @@ class OpenMPIRBuilder {
12501235
/// \param LoopType Information about type of loop worksharing.
12511236
/// It corresponds to type of loop workshare OpenMP pragma.
12521237
/// \param NoLoop If true, no-loop code is generated.
1253-
/// \param HasDistSchedule Defines if the clause being lowered is
1254-
/// dist_schedule as this is handled slightly differently
1255-
///
1256-
/// \param DistScheduleChunkSize The chunk size for dist_schedule loop
12571238
///
12581239
/// \returns Point where to insert code after the workshare construct.
12591240
LLVM_ABI InsertPointOrErrorTy applyWorkshareLoop(
@@ -1265,8 +1246,7 @@ class OpenMPIRBuilder {
12651246
bool HasOrderedClause = false,
12661247
omp::WorksharingLoopType LoopType =
12671248
omp::WorksharingLoopType::ForStaticLoop,
1268-
bool NoLoop = false, bool HasDistSchedule = false,
1269-
Value *DistScheduleChunkSize = nullptr);
1249+
bool NoLoop = false);
12701250

12711251
/// Tile a loop nest.
12721252
///

0 commit comments

Comments
 (0)