Skip to content

Commit b3ebb95

Browse files
committed
Merge branch 'sycl' into always_select_binary
2 parents 3627035 + 9e79d31 commit b3ebb95

File tree

11,538 files changed

+615788
-199393
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

11,538 files changed

+615788
-199393
lines changed

.arclint

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"linters": {
3+
"clang-format": {
4+
"type": "script-and-regex",
5+
"script-and-regex.script": "bash utils/arcanist/clang-format.sh",
6+
"script-and-regex.regex": "/^(?P<severity>[[:alpha:]]+)\n(?P<message>[^\n]+)\n(====|(?P<line>\\d),(?P<char>\\d)\n(?P<original>.*)>>>>\n(?P<replacement>.*)<<<<\n)$/s",
7+
"include": [
8+
"(\\.(cc|cpp|h)$)"
9+
]
10+
}
11+
}
12+
}

.github/CODEOWNERS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ sycl/include/CL/sycl/intel/fpga_reg.hpp @MrSidims
6363
sycl/include/CL/sycl/intel/pipes.hpp @MrSidims
6464
sycl/include/CL/sycl/pipes.hpp @MrSidims
6565

66+
# Reduction extension
67+
sycl/include/CL/sycl/intel/reduction.hpp @v-klochkov
68+
6669
# Function pointers
6770
sycl/include/CL/sycl/intel/function_pointer.hpp @AlexeySachkov
6871
sycl/source/function_pointer.cpp @AlexeySachkov
@@ -75,6 +78,7 @@ sycl/source/half_type.cpp @AlexeySachkov
7578
sycl/include/CL/sycl/swizzles.def @turinevgeny
7679
sycl/include/CL/sycl/types.hpp @turinevgeny
7780

81+
sycl/plugins/cuda/ @intel/llvm-reviewers-cuda
7882

7983
sycl/doc/ @pvchupin @kbobrovs
8084

CONTRIBUTING.md

Lines changed: 25 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,15 @@
11
# Contributing
22

33
## License
4-
Intel Project for LLVM\* technology is licensed under the terms of the
5-
Apache-2.0 with LLVM-exception license ([LICENSE.txt](llvm/LICENSE.TXT))
6-
to ensure our ability to contribute this project to the LLVM project
7-
under the same license.
84

9-
By contributing to this project, you agree to the Apache-2.0 with
10-
LLVM-exception license and copyright terms there in and release your
11-
contribution under these terms.
5+
Intel Project for LLVM\* technology is licensed under the terms of the Apache
6+
License v2.0 with LLVM Exceptions license ([LICENSE.txt](llvm/LICENSE.TXT)) to
7+
ensure our ability to contribute this project to the LLVM project under the
8+
same license.
129

13-
## Sign your work
14-
Please use the sign-off line at the end of your contribution. Your
15-
signature certifies that you wrote the contribution or otherwise have
16-
the right to pass it on as an open-source contribution, and that you
17-
agree to provide your contribution under the terms of the licenses
18-
noted above. The rules are pretty simple: if you can certify the
19-
below (from [developercertificate.org](http://developercertificate.org)):
20-
21-
```
22-
Developer Certificate of Origin
23-
Version 1.1
24-
25-
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
26-
660 York Street, Suite 102,
27-
San Francisco, CA 94110 USA
28-
29-
Everyone is permitted to copy and distribute verbatim copies of this
30-
license document, but changing it is not allowed.
31-
32-
Developer's Certificate of Origin 1.1
33-
34-
By making a contribution to this project, I certify that:
35-
36-
(a) The contribution was created in whole or in part by me and I
37-
have the right to submit it under the open source license
38-
indicated in the file; or
39-
40-
(b) The contribution is based upon previous work that, to the best
41-
of my knowledge, is covered under an appropriate open source
42-
license and I have the right under that license to submit that
43-
work with modifications, whether created in whole or in part
44-
by me, under the same open source license (unless I am
45-
permitted to submit under a different license), as indicated
46-
in the file; or
47-
48-
(c) The contribution was provided directly to me by some other
49-
person who certified (a), (b) or (c) and I have not modified
50-
it.
51-
52-
(d) I understand and agree that this project and the contribution
53-
are public and that a record of the contribution (including all
54-
personal information I submit with it, including my sign-off) is
55-
maintained indefinitely and may be redistributed consistent with
56-
this project or the open source license(s) involved.
57-
```
58-
59-
Then you just add a line to every git commit message:
60-
61-
Signed-off-by: Joe Smith <[email protected]>
62-
63-
Use your real name (sorry, no pseudonyms or anonymous contributions.)
64-
65-
If you set your `user.name` and `user.email` git configs, you can sign your
66-
commit automatically with `git commit -s`.
10+
By contributing to this project, you agree to the Apache License v2.0 with LLVM
11+
Exceptions and copyright terms there in and release your contribution under
12+
these terms.
6713

6814
## Contribution process
6915

@@ -77,12 +23,25 @@ for more information.
7723
- Create a personal fork of the project on GitHub
7824
- For the DPC++ Compiler project, use **sycl** branch as baseline for your
7925
changes. See [Get Started Guide](sycl/doc/GetStartedGuide.md).
80-
- Prepare your patch (follow
81-
[LLVM coding standards](https://llvm.org/docs/CodingStandards.html)).
82-
[clang-format](https://clang.llvm.org/docs/ClangFormat.html) and [clang-tidy](
83-
https://clang.llvm.org/extra/clang-tidy/) tools can be integrated into your
84-
workflow to ensure formatting and stylistic compliance of your changes.
26+
- Prepare your patch
27+
- follow [LLVM coding standards](https://llvm.org/docs/CodingStandards.html)
28+
- [clang-format](https://clang.llvm.org/docs/ClangFormat.html) and
29+
[clang-tidy](https://clang.llvm.org/extra/clang-tidy/) tools can be
30+
integrated into your workflow to ensure formatting and stylistic
31+
compliance of your changes.
32+
- use
33+
```
34+
./clang/tools/clang-format/git-clang-format `git merge-base origin/sycl HEAD`
35+
```
36+
to check the format of your current changes against the `origin/sycl`
37+
branch.
38+
- `-f` to also correct unstaged changes
39+
- `--diff` to only print the diff without applying
8540
- Build the project and run all tests.
41+
- complete test suite: `python buildbot/check.py`
42+
- sycl test suite `python buildbot/check.py -t test-sycl`
43+
- run only "mytest" test `python buildbot/check.py -t test-sycl-mytest`
44+
- if necessary, use `-o $LLVM_BUILD_DIR` to specify the llvm build directory
8645
8746
### Commit message
8847
@@ -114,5 +73,4 @@ Project maintainers merge pull requests using one of the following options:
11473
- [Create a merge commit] Used for LLVM pull-down PRs to preserve hashes of the
11574
commits pulled from the LLVM community repository
11675
117-
11876
*Other names and brands may be claimed as the property of others.

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ Intel staging area for llvm.org contribution.
66
Home for Intel LLVM-based projects:
77
- oneAPI Data Parallel C++ compiler - see **sycl** branch. More information on
88
oneAPI and DPC++ is available at
9-
([https://www.oneapi.com/](https://www.oneapi.com/))
10-
- [![Linux Post Commit Checks](https://github.com/intel/llvm/workflows/Linux%20Post%20Commit%20Checks/badge.svg)](https://github.com/intel/llvm/actions?query=workflow%3A%22Linux+Post+Commit+Checks%22) [![Generate Doxygen documentation](https://github.com/intel/llvm/workflows/Generate%20Doxygen%20documentation/badge.svg)](https://github.com/intel/llvm/actions?query=workflow%3A%22Generate+Doxygen+documentation%22)
9+
[https://www.oneapi.com/](https://www.oneapi.com/)
10+
- [![Linux Post Commit Checks](https://github.com/intel/llvm/workflows/Linux%20Post%20Commit%20Checks/badge.svg)](https://github.com/intel/llvm/actions?query=workflow%3A%22Linux+Post+Commit+Checks%22)
11+
[![Generate Doxygen documentation](https://github.com/intel/llvm/workflows/Generate%20Doxygen%20documentation/badge.svg)](https://github.com/intel/llvm/actions?query=workflow%3A%22Generate+Doxygen+documentation%22)
1112

1213

1314

clang-tools-extra/clang-change-namespace/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
set(LLVM_LINK_COMPONENTS
2-
support
2+
FrontendOpenMP
3+
Support
34
)
45

56
add_clang_library(clangChangeNamespace

clang-tools-extra/clang-change-namespace/ChangeNamespace.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -832,7 +832,7 @@ void ChangeNamespaceTool::replaceQualifiedSymbolInDeclContext(
832832
std::string AliasName = NamespaceAlias->getNameAsString();
833833
std::string AliasQualifiedName =
834834
NamespaceAlias->getQualifiedNameAsString();
835-
// We only consider namespace aliases define in the global namepspace or
835+
// We only consider namespace aliases define in the global namespace or
836836
// in namespaces that are directly visible from the reference, i.e.
837837
// ancestor of the `OldNs`. Note that declarations in ancestor namespaces
838838
// but not visible in the new namespace is filtered out by

clang-tools-extra/clang-change-namespace/ChangeNamespace.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ namespace change_namespace {
2727
// reference needs to be fully-qualified, this adds a "::" prefix to the
2828
// namespace specifiers unless the new namespace is the global namespace.
2929
// For classes, only classes that are declared/defined in the given namespace in
30-
// speficifed files will be moved: forward declarations will remain in the old
30+
// specified files will be moved: forward declarations will remain in the old
3131
// namespace.
3232
// For example, changing "a" to "x":
3333
// Old code:
@@ -138,7 +138,7 @@ class ChangeNamespaceTool : public ast_matchers::MatchFinder::MatchCallback {
138138
llvm::Regex FilePatternRE;
139139
// Information about moved namespaces grouped by file.
140140
// Since we are modifying code in old namespaces (e.g. add namespace
141-
// spedifiers) as well as moving them, we store information about namespaces
141+
// specifiers) as well as moving them, we store information about namespaces
142142
// to be moved and only move them after all modifications are finished (i.e.
143143
// in `onEndOfTranslationUnit`).
144144
std::map<std::string, std::vector<MoveNamespace>> MoveNamespaces;

clang-tools-extra/clang-change-namespace/tool/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..)
22

33
set(LLVM_LINK_COMPONENTS
4+
FrontendOpenMP
45
Support
56
)
67

clang-tools-extra/clang-doc/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
set(LLVM_LINK_COMPONENTS
22
support
33
BitstreamReader
4+
FrontendOpenMP
45
)
56

67
add_clang_library(clangDoc

clang-tools-extra/clang-doc/Generators.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ void Generator::addInfoToIndex(Index &Idx, const doc::Info *Info) {
8282
// pointing.
8383
auto It = std::find(I->Children.begin(), I->Children.end(), R.USR);
8484
if (It != I->Children.end()) {
85-
// If it is found, just change I to point the namespace refererence found.
85+
// If it is found, just change I to point the namespace reference found.
8686
I = &*It;
8787
} else {
8888
// If it is not found a new reference is created

clang-tools-extra/clang-doc/Representation.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ void Info::mergeBase(Info &&Other) {
187187
// Unconditionally extend the description, since each decl may have a comment.
188188
std::move(Other.Description.begin(), Other.Description.end(),
189189
std::back_inserter(Description));
190-
std::sort(Description.begin(), Description.end());
190+
llvm::sort(Description);
191191
auto Last = std::unique(Description.begin(), Description.end());
192192
Description.erase(Last, Description.end());
193193
}
@@ -202,7 +202,7 @@ void SymbolInfo::merge(SymbolInfo &&Other) {
202202
DefLoc = std::move(Other.DefLoc);
203203
// Unconditionally extend the list of locations, since we want all of them.
204204
std::move(Other.Loc.begin(), Other.Loc.end(), std::back_inserter(Loc));
205-
std::sort(Loc.begin(), Loc.end());
205+
llvm::sort(Loc);
206206
auto Last = std::unique(Loc.begin(), Loc.end());
207207
Loc.erase(Last, Loc.end());
208208
mergeBase(std::move(Other));
@@ -314,7 +314,7 @@ bool Index::operator<(const Index &Other) const {
314314
}
315315

316316
void Index::sort() {
317-
std::sort(Children.begin(), Children.end());
317+
llvm::sort(Children);
318318
for (auto &C : Children)
319319
C.sort();
320320
}

clang-tools-extra/clang-doc/Serialize.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ populateParentNamespaces(llvm::SmallVector<Reference, 4> &Namespaces,
3636
// <root>/A/B
3737
//
3838
// namespace A {
39-
// namesapce B {
39+
// namespace B {
4040
//
4141
// class C {};
4242
//

clang-tools-extra/clang-include-fixer/IncludeFixer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class IncludeFixerActionFactory : public clang::tooling::ToolAction {
6262
};
6363

6464
/// Create replacements, which are generated by clang-format, for the
65-
/// missing header and mising qualifiers insertions. The function uses the
65+
/// missing header and missing qualifiers insertions. The function uses the
6666
/// first header for insertion.
6767
///
6868
/// \param Code The source code.

clang-tools-extra/clang-include-fixer/IncludeFixerContext.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class IncludeFixerContext {
3737

3838
/// The qualifiers of the scope in which SymbolIdentifier lookup
3939
/// occurs. It is represented as a sequence of names and scope resolution
40-
/// operatiors ::, ending with a scope resolution operator (e.g. a::b::).
40+
/// operators ::, ending with a scope resolution operator (e.g. a::b::).
4141
/// Empty if SymbolIdentifier is not in a specific scope.
4242
std::string ScopedQualifiers;
4343

clang-tools-extra/clang-include-fixer/SymbolIndexManager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ using find_all_symbols::SymbolAndSignals;
2525
// related to the given source file.
2626
static double similarityScore(llvm::StringRef FileName,
2727
llvm::StringRef Header) {
28-
// Compute the maximum number of common path segements between Header and
28+
// Compute the maximum number of common path segments between Header and
2929
// a suffix of FileName.
3030
// We do not do a full longest common substring computation, as Header
3131
// specifies the path we would directly #include, so we assume it is rooted

clang-tools-extra/clang-include-fixer/find-all-symbols/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
set(LLVM_LINK_COMPONENTS
22
Support
3+
FrontendOpenMP
34
)
45

56
add_clang_library(findAllSymbols

clang-tools-extra/clang-include-fixer/find-all-symbols/FindAllSymbols.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ void FindAllSymbols::registerMatchers(MatchFinder *MatchFinder) {
128128
auto HasNSOrTUCtxMatcher =
129129
hasDeclContext(anyOf(namespaceDecl(), translationUnitDecl()));
130130

131-
// We need seperate rules for C record types and C++ record types since some
131+
// We need separate rules for C record types and C++ record types since some
132132
// template related matchers are inapplicable on C record declarations.
133133
//
134134
// Matchers specific to C++ code.

clang-tools-extra/clang-include-fixer/find-all-symbols/PathConfig.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
//===----------------------------------------------------------------------===//
99

1010
#include "PathConfig.h"
11+
#include "llvm/ADT/SmallString.h"
1112
#include "llvm/Support/Path.h"
1213

1314
namespace clang {

clang-tools-extra/clang-include-fixer/find-all-symbols/tool/run-find-all-symbols.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def find_compilation_database(path):
4646

4747

4848
def MergeSymbols(directory, args):
49-
"""Merge all symbol files (yaml) in a given directaory into a single file."""
49+
"""Merge all symbol files (yaml) in a given directory into a single file."""
5050
invocation = [args.binary, '-merge-dir='+directory, args.saving_path]
5151
subprocess.call(invocation)
5252
print 'Merge is finished. Saving results in ' + args.saving_path

clang-tools-extra/clang-include-fixer/tool/clang-include-fixer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ def main():
146146
help='clang-include-fixer input format.')
147147
parser.add_argument('-input', default='',
148148
help='String to initialize the database.')
149-
# Don't throw exception when parsing unknown arguements to make the script
149+
# Don't throw exception when parsing unknown arguments to make the script
150150
# work in neovim.
151151
# Neovim (at least v0.2.1) somehow mangles the sys.argv in a weird way: it
152152
# will pass additional arguments (e.g. "-c script_host.py") to sys.argv,

clang-tools-extra/clang-move/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
set(LLVM_LINK_COMPONENTS
22
support
3+
FrontendOpenMP
34
)
45

56
add_clang_library(clangMove

clang-tools-extra/clang-move/Move.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ class FindAllIncludes : public PPCallbacks {
145145
ClangMoveTool *const MoveTool;
146146
};
147147

148-
/// Add a declatration being moved to new.h/cc. Note that the declaration will
148+
/// Add a declaration being moved to new.h/cc. Note that the declaration will
149149
/// also be deleted in old.h/cc.
150150
void MoveDeclFromOldFileToNewFile(ClangMoveTool *MoveTool, const NamedDecl *D) {
151151
MoveTool->getMovedDecls().push_back(D);
@@ -453,7 +453,7 @@ createInsertedReplacements(const std::vector<std::string> &Includes,
453453
}
454454

455455
// Return a set of all decls which are used/referenced by the given Decls.
456-
// Specically, given a class member declaration, this method will return all
456+
// Specifically, given a class member declaration, this method will return all
457457
// decls which are used by the whole class.
458458
llvm::DenseSet<const Decl *>
459459
getUsedDecls(const HelperDeclRefGraph *RG,
@@ -767,7 +767,7 @@ void ClangMoveTool::removeDeclsInOldFiles() {
767767
// FIXME: Minimize the include path like clang-include-fixer.
768768
std::string IncludeNewH =
769769
"#include \"" + Context->Spec.NewHeader + "\"\n";
770-
// This replacment for inserting header will be cleaned up at the end.
770+
// This replacement for inserting header will be cleaned up at the end.
771771
auto Err = FileAndReplacements.second.add(
772772
tooling::Replacement(FilePath, UINT_MAX, 0, IncludeNewH));
773773
if (Err)
@@ -810,7 +810,7 @@ void ClangMoveTool::moveDeclsToNewFiles() {
810810
std::vector<const NamedDecl *> ActualNewCCDecls;
811811

812812
// Filter out all unused helpers in NewCCDecls.
813-
// We only move the used helpers (including transively used helpers) and the
813+
// We only move the used helpers (including transitively used helpers) and the
814814
// given symbols being moved.
815815
for (const auto *D : NewCCDecls) {
816816
if (llvm::is_contained(HelperDeclarations, D) &&

clang-tools-extra/clang-query/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
set(LLVM_LINK_COMPONENTS
22
lineeditor
33
support
4+
FrontendOpenMP
45
)
56

67
add_clang_library(clangQuery

clang-tools-extra/clang-reorder-fields/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
set(LLVM_LINK_COMPONENTS support)
1+
set(LLVM_LINK_COMPONENTS
2+
FrontendOpenMP
3+
support
4+
)
25

36
add_clang_library(clangReorderFields
47
ReorderFieldsAction.cpp

clang-tools-extra/clang-reorder-fields/ReorderFieldsAction.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ findMembersUsedInInitExpr(const CXXCtorInitializer *Initializer,
116116

117117
/// Reorders fields in the definition of a struct/class.
118118
///
119-
/// At the moment reodering of fields with
119+
/// At the moment reordering of fields with
120120
/// different accesses (public/protected/private) is not supported.
121121
/// \returns true on success.
122122
static bool reorderFieldsInDefinition(
@@ -133,7 +133,7 @@ static bool reorderFieldsInDefinition(
133133
for (const auto *Field : Definition->fields()) {
134134
const auto FieldIndex = Field->getFieldIndex();
135135
if (Field->getAccess() != Fields[NewFieldsOrder[FieldIndex]]->getAccess()) {
136-
llvm::errs() << "Currently reodering of fields with different accesses "
136+
llvm::errs() << "Currently reordering of fields with different accesses "
137137
"is not supported\n";
138138
return false;
139139
}

0 commit comments

Comments
 (0)