Skip to content

Commit 26b38f9

Browse files
committed
Merge from branch sycl
# Conflicts: # clang/include/clang/Basic/DiagnosticSemaKinds.td
2 parents 5e8004d + 24726df commit 26b38f9

File tree

20,079 files changed

+1156528
-371901
lines changed

Some content is hidden

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

20,079 files changed

+1156528
-371901
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: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
* @bader
22

3-
clang/ @erichkeane @Fznamznon
3+
clang/ @Fznamznon @premanandrao @elizabethandrews
44

55
clang/**/Driver @mdtoguchi @AGindinson
66

@@ -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,9 +78,11 @@ 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

8185
sycl/doc/extensions/ @mkinsner @jbrodman
8286

8387
xpti/ @tovinkere @andykaylor
88+
xptifw/ @tovinkere @andykaylor

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
/GRTAGS
3636
/GSYMS
3737
/GTAGS
38+
/ID
3839
.gitusers
3940
autom4te.cache
4041
cscope.files

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: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,25 @@
44

55
Intel staging area for llvm.org contribution.
66
Home for Intel LLVM-based projects:
7-
- oneAPI Data Parallel C++ compiler - see **sycl** branch. More information on
8-
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)
11-
127

8+
* oneAPI Data Parallel C++ compiler - see **sycl** branch. More information on
9+
oneAPI and DPC++ is available at
10+
[https://www.oneapi.com/](https://www.oneapi.com/)
11+
* [![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)
12+
[![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)
1313

1414
## License
15+
1516
See [LICENSE.txt](sycl/LICENSE.TXT) for details.
1617

1718
## Contributing
19+
1820
See [CONTRIBUTING.md](CONTRIBUTING.md) for details.
1921

2022
## Sub-projects Documentation
21-
- oneAPI Data Parallel C++ compiler - See
22-
[GetStartedGuide.md](sycl/doc/GetStartedGuide.md)
23+
24+
* oneAPI Data Parallel C++ compiler - See
25+
[DPC++ Documentation](https://intel.github.io/llvm-docs/)
2326

2427
## DPC++ extensions
2528

@@ -28,4 +31,3 @@ SYCL\* standards. DPC++ extends these standards with a number of extensions,
2831
which can be found in [sycl/doc/extensions](sycl/doc/extensions) directory.
2932

3033
\*Other names and brands may be claimed as the property of others.
31-

buildbot/check.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def do_check(args):
3030
args.test_suite,
3131
"-j", str(cpu_count)]
3232

33-
print(cmake_cmd)
33+
print("[Cmake Command]: {}".format(" ".join(cmake_cmd)))
3434

3535
env_tmp=os.environ
3636
env_tmp["LIT_ARGS"]="\"{}\"".format("-v")

buildbot/compile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def do_compile(args):
3232
"deploy-opencl-aot",
3333
"-j", str(cpu_count)]
3434

35-
print(cmake_cmd)
35+
print("[Cmake Command]: {}".format(" ".join(cmake_cmd)))
3636

3737
subprocess.check_call(cmake_cmd, cwd=abs_obj_dir)
3838

buildbot/configure.py

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,15 @@
11
import argparse
22
import os
3+
import platform
34
import subprocess
45
import sys
5-
import platform
66

77
def do_configure(args):
8-
ret = False
9-
108
# Get absolute path to source directory
11-
if args.src_dir:
12-
abs_src_dir = os.path.abspath(args.src_dir)
13-
else:
14-
abs_src_dir = os.path.abspath(os.path.join(__file__, "../.."))
9+
abs_src_dir = os.path.abspath(args.src_dir if args.src_dir else os.path.join(__file__, "../.."))
1510
# Get absolute path to build directory
16-
if args.obj_dir:
17-
abs_obj_dir = os.path.abspath(args.obj_dir)
18-
else:
19-
abs_obj_dir = os.path.join(abs_src_dir, "build")
11+
abs_obj_dir = os.path.abspath(args.obj_dir) if args.obj_dir else os.path.join(abs_src_dir, "build")
12+
# Create build directory if it doesn't exist
2013
if not os.path.isdir(abs_obj_dir):
2114
os.makedirs(abs_obj_dir)
2215

@@ -37,10 +30,7 @@ def do_configure(args):
3730
llvm_enable_sphinx = 'OFF'
3831
llvm_build_shared_libs = 'OFF'
3932

40-
if platform.system() == 'Linux':
41-
icd_loader_lib = os.path.join(icd_loader_lib, "libOpenCL.so")
42-
else:
43-
icd_loader_lib = os.path.join(icd_loader_lib, "OpenCL.lib")
33+
icd_loader_lib = os.path.join(icd_loader_lib, "libOpenCL.so" if platform.system() == 'Linux' else "OpenCL.lib")
4434

4535
if args.cuda:
4636
llvm_targets_to_build += ';NVPTX'
@@ -92,14 +82,22 @@ def do_configure(args):
9282
"-DOpenCL_INCLUDE_DIR={}".format(ocl_header_dir),
9383
"-DOpenCL_LIBRARY={}".format(icd_loader_lib)])
9484

85+
if args.l0_headers and args.l0_loader:
86+
cmake_cmd.extend([
87+
"-DL0_INCLUDE_DIR={}".format(args.l0_headers),
88+
"-DL0_LIBRARY={}".format(args.l0_loader)])
89+
elif args.l0_headers or args.l0_loader:
90+
sys.exit("Please specify both Level Zero headers and loader or don't specify "
91+
"none of them to let download from github.com")
92+
9593
# Add additional CMake options if provided
9694
if args.cmake_opt:
9795
cmake_cmd += args.cmake_opt
9896

9997
# Add path to root CMakeLists.txt
10098
cmake_cmd.append(llvm_dir)
10199

102-
print(cmake_cmd)
100+
print("[Cmake Command]: {}".format(" ".join(cmake_cmd)))
103101

104102
try:
105103
subprocess.check_call(cmake_cmd, cwd=abs_obj_dir)
@@ -109,21 +107,24 @@ def do_configure(args):
109107
os.remove(cmake_cache)
110108
subprocess.check_call(cmake_cmd, cwd=abs_obj_dir)
111109

112-
ret = True
113-
return ret
110+
return True
114111

115112
def main():
116113
parser = argparse.ArgumentParser(prog="configure.py",
117114
description="Generate build files from CMake configuration files",
118115
formatter_class=argparse.RawTextHelpFormatter)
116+
# CI system options
119117
parser.add_argument("-n", "--build-number", metavar="BUILD_NUM", help="build number")
120118
parser.add_argument("-b", "--branch", metavar="BRANCH", help="pull request branch")
121119
parser.add_argument("-d", "--base-branch", metavar="BASE_BRANCH", help="pull request base branch")
122120
parser.add_argument("-r", "--pr-number", metavar="PR_NUM", help="pull request number")
123121
parser.add_argument("-w", "--builder-dir", metavar="BUILDER_DIR",
124122
help="builder directory, which is the directory contains source and build directories")
123+
# User options
125124
parser.add_argument("-s", "--src-dir", metavar="SRC_DIR", help="source directory (autodetected by default)")
126125
parser.add_argument("-o", "--obj-dir", metavar="OBJ_DIR", help="build directory. (<src>/build by default)")
126+
parser.add_argument("--l0-headers", metavar="L0_HEADER_DIR", help="directory with Level Zero headers")
127+
parser.add_argument("--l0-loader", metavar="L0_LOADER", help="path to the Level Zero loader")
127128
parser.add_argument("-t", "--build-type",
128129
metavar="BUILD_TYPE", default="Release", help="build type: Debug, Release")
129130
parser.add_argument("--cuda", action='store_true', help="switch from OpenCL to CUDA")

buildbot/dependency.conf

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
[VERSIONS]
2+
# https://github.com/intel/llvm/releases/download/2020-WW20/oclcpuexp-2020.10.6.0.4_rel.tar.gz
3+
ocl_cpu_rt_ver=2020.10.6.0.04
4+
# https://github.com/intel/llvm/releases/download/2020-WW20/win-oclcpuexp-2020.10.6.0.4_rel.zip
5+
ocl_cpu_rt_ver_win=2020.10.6.0.04
6+
# Same GPU driver supports Level Zero and OpenCL:
7+
# https://github.com/intel/compute-runtime/releases/tag/20.21.16886
8+
ocl_gpu_rt_ver=20.21.16886
9+
# Same GPU driver supports Level Zero and OpenCL:
10+
# https://downloadmirror.intel.com/29616/a08/igfx_win10_100.8280.zip
11+
ocl_gpu_rt_ver_win=27.20.100.8280
12+
intel_sycl_ver=build
13+
# https://github.com/oneapi-src/oneTBB/releases/download/v2020.2/tbb-2020.2-lin.tgz
14+
tbb_ver=20200121_111047
15+
# https://github.com/oneapi-src/oneTBB/releases/download/v2020.2/tbb-2020.2-win.zip
16+
tbb_ver_win=20200124_000000
17+
# TODO: provide URL for Linux OpenCL emulator of FPGA device
18+
fpga_ver=20200216_000000
19+
# TODO: provide URL for Windows OpenCL emulator of FPGA device
20+
fpga_ver_win=20200216_000000
21+
22+
[DRIVER VERSIONS]
23+
cpu_driver_lin=2020.10.6.0.04
24+
cpu_driver_win=2020.10.6.0.04
25+
gpu_driver_lin=20.21.16886
26+
gpu_driver_win=27.20.100.8280
27+
fpga_driver_lin=2020.9.2.0
28+
fpga_driver_win=2020.9.2.0

buildbot/dependency.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ def do_dependency(args):
7373
"-DCMAKE_INSTALL_PREFIX={}".format(install_dir),
7474
"-DOPENCL_ICD_LOADER_HEADERS_DIR={}".format(ocl_header_dir),
7575
".." ]
76+
77+
print("[Cmake Command]: {}".format(" ".join(cmake_cmd)))
78+
7679
subprocess.check_call(cmake_cmd, cwd=icd_build_dir)
7780

7881
env_tmp=os.environ

clang-tools-extra/clang-apply-replacements/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@ set(LLVM_LINK_COMPONENTS
44

55
add_clang_library(clangApplyReplacements
66
lib/Tooling/ApplyReplacements.cpp
7+
)
78

8-
LINK_LIBS
9+
clang_target_link_libraries(clangApplyReplacements
10+
PRIVATE
911
clangAST
1012
clangBasic
1113
clangRewrite

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

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

56
add_clang_library(clangChangeNamespace
67
ChangeNamespace.cpp
8+
)
79

8-
LINK_LIBS
10+
clang_target_link_libraries(clangChangeNamespace
11+
PRIVATE
912
clangAST
1013
clangASTMatchers
1114
clangBasic

0 commit comments

Comments
 (0)