Skip to content

Commit d77ae42

Browse files
committed
Revert "[compiler-rt] Use just built libatomic if available"
This reverts commit 02fa9fc. Commit message and content does not match. Revert to commit with a proper commit message.
1 parent 02fa9fc commit d77ae42

File tree

6 files changed

+9
-25
lines changed

6 files changed

+9
-25
lines changed

flang/docs/OpenACC.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,3 @@
1818
* An `!$acc routine` with no parallelism clause is treated as if the `seq`
1919
clause was present.
2020
* `!$acc end loop` does not trigger a parsing error and is just ignored.
21-
* The restriction on `!$acc data` required clauses is emitted as a portability
22-
warning instead of an error as other compiler accepts it.

flang/lib/Lower/OpenACC.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1937,9 +1937,6 @@ static void genACCDataOp(Fortran::lower::AbstractConverter &converter,
19371937
addOperands(operands, operandSegments, waitOperands);
19381938
addOperands(operands, operandSegments, dataClauseOperands);
19391939

1940-
if (dataClauseOperands.empty() && !hasDefaultNone && !hasDefaultPresent)
1941-
return;
1942-
19431940
auto dataOp = createRegionOp<mlir::acc::DataOp, mlir::acc::TerminatorOp>(
19441941
builder, currentLocation, operands, operandSegments);
19451942

flang/lib/Semantics/check-acc-structure.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,8 @@ void AccStructureChecker::Leave(const parser::OpenACCBlockConstruct &x) {
147147
CheckNoBranching(block, GetContext().directive, blockDir.source);
148148
break;
149149
case llvm::acc::Directive::ACCD_data:
150-
// Restriction - 2.6.5 pt 1
151-
// Only a warning is emitted here for portability reason.
152-
CheckRequireAtLeastOneOf(/*warnInsteadOfError=*/true);
150+
// Restriction - line 1249-1250
151+
CheckRequireAtLeastOneOf();
153152
// Restriction is not formally in the specification but all compilers emit
154153
// an error and it is likely to be omitted from the spec.
155154
CheckNoBranching(block, GetContext().directive, blockDir.source);

flang/lib/Semantics/check-directive-structure.h

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ class DirectiveStructureChecker : public virtual BaseChecker {
331331
// Check that only clauses in set are after the specific clauses.
332332
void CheckOnlyAllowedAfter(C clause, common::EnumSet<C, ClauseEnumSize> set);
333333

334-
void CheckRequireAtLeastOneOf(bool warnInsteadOfError = false);
334+
void CheckRequireAtLeastOneOf();
335335

336336
void CheckAllowed(C clause);
337337

@@ -422,24 +422,18 @@ DirectiveStructureChecker<D, C, PC, ClauseEnumSize>::ClauseSetToString(
422422
// directive.
423423
template <typename D, typename C, typename PC, std::size_t ClauseEnumSize>
424424
void DirectiveStructureChecker<D, C, PC,
425-
ClauseEnumSize>::CheckRequireAtLeastOneOf(bool warnInsteadOfError) {
425+
ClauseEnumSize>::CheckRequireAtLeastOneOf() {
426426
if (GetContext().requiredClauses.empty())
427427
return;
428428
for (auto cl : GetContext().actualClauses) {
429429
if (GetContext().requiredClauses.test(cl))
430430
return;
431431
}
432432
// No clause matched in the actual clauses list
433-
if (warnInsteadOfError)
434-
context_.Say(GetContext().directiveSource,
435-
"At least one of %s clause should appear on the %s directive"_port_en_US,
436-
ClauseSetToString(GetContext().requiredClauses),
437-
ContextDirectiveAsFortran());
438-
else
439-
context_.Say(GetContext().directiveSource,
440-
"At least one of %s clause must appear on the %s directive"_err_en_US,
441-
ClauseSetToString(GetContext().requiredClauses),
442-
ContextDirectiveAsFortran());
433+
context_.Say(GetContext().directiveSource,
434+
"At least one of %s clause must appear on the %s directive"_err_en_US,
435+
ClauseSetToString(GetContext().requiredClauses),
436+
ContextDirectiveAsFortran());
443437
}
444438

445439
template <typename D, typename C, typename PC, std::size_t ClauseEnumSize>

flang/test/Lower/OpenACC/acc-data.f90

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,5 @@ subroutine acc_data
188188
! CHECK: acc.terminator
189189
! CHECK: } attributes {defaultAttr = #acc<defaultvalue present>}
190190

191-
!$acc data
192-
!$acc end data
193-
! CHECK-NOT: acc.data
194-
195191
end subroutine acc_data
196192

flang/test/Semantics/OpenACC/acc-data.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ program openacc_data_validity
132132
!ERROR: At least one of COPYOUT, DELETE, DETACH clause must appear on the EXIT DATA directive
133133
!$acc exit data
134134

135-
!PORTABILITY: At least one of ATTACH, COPY, COPYIN, COPYOUT, CREATE, DEFAULT, DEVICEPTR, NO_CREATE, PRESENT clause should appear on the DATA directive
135+
!ERROR: At least one of ATTACH, COPY, COPYIN, COPYOUT, CREATE, DEFAULT, DEVICEPTR, NO_CREATE, PRESENT clause must appear on the DATA directive
136136
!$acc data
137137
!$acc end data
138138

0 commit comments

Comments
 (0)