-
Notifications
You must be signed in to change notification settings - Fork 11k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[OpenMP] Replace predetermined shared for const variable
The following appears in OpenMP 3.1 sec. 2.9.1.1 as a predetermined data-sharing attribute: > Variables with const-qualified type having no mutable member are > shared. It does not appear in OpenmP 4.0, 4.5, or 5.0. This patch removes the implementation of that attribute when the requested OpenMP version is greater than 3.1. One effect of that removal is that `default(none)` affects const variables without mutable members. Also, without this patch, if a const variable without mutable members was explicitly lastprivate or private, it was an error because it was predetermined shared. Now, clang instead complains that it's const without mutable fields, which is a more intelligible diagnostic. That should be fine for all of the above versions because they all have something like the following, which is quoted from OpenMP 5.0 sec. 2.19.3: > A variable that is privatized must not have a const-qualified type > unless it is of class type with a mutable member. This restriction does > not apply to the firstprivate clause. reduction and linear clauses already have separate checks for const variables. Future patches will merge the implementations. Reviewed By: ABataev Differential Revision: https://reviews.llvm.org/D56113 llvm-svn: 350439
- Loading branch information
1 parent
79d4851
commit e6234d1
Showing
40 changed files
with
439 additions
and
376 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.