Skip to content

Commit 67e1e98

Browse files
Revert "[Clang] [OpenMP] Add support for '#pragma omp stripe'. (#119891)"
This reverts commit 070f84e. Buildbot failure: https://lab.llvm.org/buildbot/#/builders/51/builds/10694
1 parent 2cf6663 commit 67e1e98

File tree

29 files changed

+32
-2404
lines changed

29 files changed

+32
-2404
lines changed

clang/bindings/python/clang/cindex.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1410,9 +1410,6 @@ def is_unexposed(self):
14101410
# OpenMP scope directive.
14111411
OMP_SCOPE_DIRECTIVE = 306
14121412

1413-
# OpenMP stripe directive.
1414-
OMP_STRIPE_DIRECTIVE = 310
1415-
14161413
# OpenACC Compute Construct.
14171414
OPEN_ACC_COMPUTE_DIRECTIVE = 320
14181415

clang/docs/OpenMPSupport.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -374,8 +374,6 @@ implementation.
374374
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
375375
| Loop transformation constructs | :none:`unclaimed` | :none:`unclaimed` | |
376376
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
377-
| loop stripe transformation | :good:`done` | https://github.com/llvm/llvm-project/pull/119891 |
378-
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
379377
| work distribute construct | :none:`unclaimed` | :none:`unclaimed` | |
380378
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
381379
| task_iteration | :none:`unclaimed` | :none:`unclaimed` | |

clang/docs/ReleaseNotes.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,6 @@ Python Binding Changes
291291
OpenMP Support
292292
--------------
293293
- Added support 'no_openmp_constructs' assumption clause.
294-
- Added support for 'omp stripe' directive.
295294

296295
Improvements
297296
^^^^^^^^^^^^

clang/include/clang-c/Index.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2158,10 +2158,6 @@ enum CXCursorKind {
21582158
*/
21592159
CXCursor_OMPAssumeDirective = 309,
21602160

2161-
/** OpenMP assume directive.
2162-
*/
2163-
CXCursor_OMPStripeDirective = 310,
2164-
21652161
/** OpenACC Compute Construct.
21662162
*/
21672163
CXCursor_OpenACCComputeConstruct = 320,

clang/include/clang/AST/RecursiveASTVisitor.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3056,9 +3056,6 @@ DEF_TRAVERSE_STMT(OMPSimdDirective,
30563056
DEF_TRAVERSE_STMT(OMPTileDirective,
30573057
{ TRY_TO(TraverseOMPExecutableDirective(S)); })
30583058

3059-
DEF_TRAVERSE_STMT(OMPStripeDirective,
3060-
{ TRY_TO(TraverseOMPExecutableDirective(S)); })
3061-
30623059
DEF_TRAVERSE_STMT(OMPUnrollDirective,
30633060
{ TRY_TO(TraverseOMPExecutableDirective(S)); })
30643061

clang/include/clang/AST/StmtOpenMP.h

Lines changed: 2 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -994,9 +994,7 @@ class OMPLoopTransformationDirective : public OMPLoopBasedDirective {
994994
static bool classof(const Stmt *T) {
995995
Stmt::StmtClass C = T->getStmtClass();
996996
return C == OMPTileDirectiveClass || C == OMPUnrollDirectiveClass ||
997-
C == OMPReverseDirectiveClass || C == OMPInterchangeDirectiveClass ||
998-
C == OMPStripeDirectiveClass;
999-
;
997+
C == OMPReverseDirectiveClass || C == OMPInterchangeDirectiveClass;
1000998
}
1001999
};
10021000

@@ -5562,7 +5560,7 @@ class OMPTileDirective final : public OMPLoopTransformationDirective {
55625560
: OMPLoopTransformationDirective(OMPTileDirectiveClass,
55635561
llvm::omp::OMPD_tile, StartLoc, EndLoc,
55645562
NumLoops) {
5565-
setNumGeneratedLoops(2 * NumLoops);
5563+
setNumGeneratedLoops(3 * NumLoops);
55665564
}
55675565

55685566
void setPreInits(Stmt *PreInits) {
@@ -5623,82 +5621,6 @@ class OMPTileDirective final : public OMPLoopTransformationDirective {
56235621
}
56245622
};
56255623

5626-
/// This represents the '#pragma omp stripe' loop transformation directive.
5627-
class OMPStripeDirective final : public OMPLoopTransformationDirective {
5628-
friend class ASTStmtReader;
5629-
friend class OMPExecutableDirective;
5630-
5631-
/// Default list of offsets.
5632-
enum {
5633-
PreInitsOffset = 0,
5634-
TransformedStmtOffset,
5635-
};
5636-
5637-
explicit OMPStripeDirective(SourceLocation StartLoc, SourceLocation EndLoc,
5638-
unsigned NumLoops)
5639-
: OMPLoopTransformationDirective(OMPStripeDirectiveClass,
5640-
llvm::omp::OMPD_stripe, StartLoc, EndLoc,
5641-
NumLoops) {
5642-
setNumGeneratedLoops(2 * NumLoops);
5643-
}
5644-
5645-
void setPreInits(Stmt *PreInits) {
5646-
Data->getChildren()[PreInitsOffset] = PreInits;
5647-
}
5648-
5649-
void setTransformedStmt(Stmt *S) {
5650-
Data->getChildren()[TransformedStmtOffset] = S;
5651-
}
5652-
5653-
public:
5654-
/// Create a new AST node representation for '#pragma omp stripe'.
5655-
///
5656-
/// \param C Context of the AST.
5657-
/// \param StartLoc Location of the introducer (e.g. the 'omp' token).
5658-
/// \param EndLoc Location of the directive's end (e.g. the tok::eod).
5659-
/// \param Clauses The directive's clauses.
5660-
/// \param NumLoops Number of associated loops (number of items in the
5661-
/// 'sizes' clause).
5662-
/// \param AssociatedStmt The outermost associated loop.
5663-
/// \param TransformedStmt The loop nest after striping, or nullptr in
5664-
/// dependent contexts.
5665-
/// \param PreInits Helper preinits statements for the loop nest.
5666-
static OMPStripeDirective *
5667-
Create(const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
5668-
ArrayRef<OMPClause *> Clauses, unsigned NumLoops, Stmt *AssociatedStmt,
5669-
Stmt *TransformedStmt, Stmt *PreInits);
5670-
5671-
/// Build an empty '#pragma omp stripe' AST node for deserialization.
5672-
///
5673-
/// \param C Context of the AST.
5674-
/// \param NumClauses Number of clauses to allocate.
5675-
/// \param NumLoops Number of associated loops to allocate.
5676-
static OMPStripeDirective *
5677-
CreateEmpty(const ASTContext &C, unsigned NumClauses, unsigned NumLoops);
5678-
5679-
/// Gets/sets the associated loops after striping.
5680-
///
5681-
/// This is in de-sugared format stored as a CompoundStmt.
5682-
///
5683-
/// \code
5684-
/// for (...)
5685-
/// ...
5686-
/// \endcode
5687-
///
5688-
/// Note that if the generated loops a become associated loops of another
5689-
/// directive, they may need to be hoisted before them.
5690-
Stmt *getTransformedStmt() const {
5691-
return Data->getChildren()[TransformedStmtOffset];
5692-
}
5693-
5694-
/// Return preinits statement.
5695-
Stmt *getPreInits() const { return Data->getChildren()[PreInitsOffset]; }
5696-
5697-
static bool classof(const Stmt *T) {
5698-
return T->getStmtClass() == OMPStripeDirectiveClass;
5699-
}
5700-
};
5701-
57025624
/// This represents the '#pragma omp unroll' loop transformation directive.
57035625
///
57045626
/// \code

clang/include/clang/Basic/StmtNodes.td

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,6 @@ def OMPParallelDirective : StmtNode<OMPExecutableDirective>;
231231
def OMPSimdDirective : StmtNode<OMPLoopDirective>;
232232
def OMPLoopTransformationDirective : StmtNode<OMPLoopBasedDirective, 1>;
233233
def OMPTileDirective : StmtNode<OMPLoopTransformationDirective>;
234-
def OMPStripeDirective : StmtNode<OMPLoopTransformationDirective>;
235234
def OMPUnrollDirective : StmtNode<OMPLoopTransformationDirective>;
236235
def OMPReverseDirective : StmtNode<OMPLoopTransformationDirective>;
237236
def OMPInterchangeDirective : StmtNode<OMPLoopTransformationDirective>;

clang/include/clang/Sema/SemaOpenMP.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -440,9 +440,6 @@ class SemaOpenMP : public SemaBase {
440440
StmtResult ActOnOpenMPTileDirective(ArrayRef<OMPClause *> Clauses,
441441
Stmt *AStmt, SourceLocation StartLoc,
442442
SourceLocation EndLoc);
443-
StmtResult ActOnOpenMPStripeDirective(ArrayRef<OMPClause *> Clauses,
444-
Stmt *AStmt, SourceLocation StartLoc,
445-
SourceLocation EndLoc);
446443
/// Called on well-formed '#pragma omp unroll' after parsing of its clauses
447444
/// and the associated statement.
448445
StmtResult ActOnOpenMPUnrollDirective(ArrayRef<OMPClause *> Clauses,

clang/include/clang/Serialization/ASTBitCodes.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1939,7 +1939,6 @@ enum StmtCode {
19391939
STMT_OMP_PARALLEL_DIRECTIVE,
19401940
STMT_OMP_SIMD_DIRECTIVE,
19411941
STMT_OMP_TILE_DIRECTIVE,
1942-
STMP_OMP_STRIPE_DIRECTIVE,
19431942
STMT_OMP_UNROLL_DIRECTIVE,
19441943
STMT_OMP_REVERSE_DIRECTIVE,
19451944
STMT_OMP_INTERCHANGE_DIRECTIVE,

clang/lib/AST/StmtOpenMP.cpp

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -417,27 +417,6 @@ OMPTileDirective::Create(const ASTContext &C, SourceLocation StartLoc,
417417
return Dir;
418418
}
419419

420-
OMPStripeDirective *
421-
OMPStripeDirective::Create(const ASTContext &C, SourceLocation StartLoc,
422-
SourceLocation EndLoc, ArrayRef<OMPClause *> Clauses,
423-
unsigned NumLoops, Stmt *AssociatedStmt,
424-
Stmt *TransformedStmt, Stmt *PreInits) {
425-
OMPStripeDirective *Dir = createDirective<OMPStripeDirective>(
426-
C, Clauses, AssociatedStmt, TransformedStmtOffset + 1, StartLoc, EndLoc,
427-
NumLoops);
428-
Dir->setTransformedStmt(TransformedStmt);
429-
Dir->setPreInits(PreInits);
430-
return Dir;
431-
}
432-
433-
OMPStripeDirective *OMPStripeDirective::CreateEmpty(const ASTContext &C,
434-
unsigned NumClauses,
435-
unsigned NumLoops) {
436-
return createEmptyDirective<OMPStripeDirective>(
437-
C, NumClauses, /*HasAssociatedStmt=*/true, TransformedStmtOffset + 1,
438-
SourceLocation(), SourceLocation(), NumLoops);
439-
}
440-
441420
OMPTileDirective *OMPTileDirective::CreateEmpty(const ASTContext &C,
442421
unsigned NumClauses,
443422
unsigned NumLoops) {

0 commit comments

Comments
 (0)