Skip to content

Commit 4dba6e7

Browse files
author
Alexander Batashev
committed
Merge remote-tracking branch 'upstream/sycl' into sub_group_info_rework
* upstream/sycl: (616 commits) [SYCL][L0] Implement robust error handling in level_zero plugin (intel#2870) [SYCL][NFC] Code clean up (phase 5) revealed by self build. (intel#2907) [Driver][NFC] Remove unused variable (intel#2908) [Github Action] Enable automatic sync for main branch from llvm-project to llvm (intel#2904) [ESIMD][NFC] Remove unnecessary macro checks (intel#2900) [SYCL] Fix handling of multiple usages of composite spec constants (intel#2894) [SYCL] Adjust parallel-for range global size to improve group size selection (intel#2703) [SYCL] Add template parameter support for no_global_work_offset attribute (intel#2839) [SYCL] Support LLVM FP intrinsic in llvm-spirv and FE (intel#2880) [SYCL]Link Libm FP64 SYCL device library by default (intel#2892) [SYCL][NFC] Code clean up (phase 4) revealed by self build. (intel#2878) [SYCL][NFC] Code clean up (phase 3) revealed by self build. (intel#2865) [SYCL] Fix backend selection for SYCL_DEVICE_TYPE=* (intel#2890) [SYCL] Fix spec constants support in integration header (intel#2896) [Driver] Update unbundling of offload libraries to use archive type (intel#2883) [SYCL][NFC] Clang format SYCL.cpp (intel#2891) [CODEOWNERS] Add code owners for DPC++ tools (intel#2884) [XPTIFW] Enable in-tree builds (intel#2849) [SYCL] Don't dump IR and dot files by default in the LowerWGScope pass (intel#2887) [SYCL] Use llvm-link's only-needed option to link device libs (intel#2783) ...
2 parents 3044724 + 65c719d commit 4dba6e7

File tree

2,056 files changed

+146635
-26277
lines changed

Some content is hidden

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

2,056 files changed

+146635
-26277
lines changed

.github/CODEOWNERS

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,27 @@
11
* @bader
22

3+
# Front-end compiler
34
clang/ @Fznamznon @premanandrao @elizabethandrews
45

6+
# Driver
57
clang/**/Driver @mdtoguchi @AGindinson
68

9+
# LLVM-SPIRV translator
710
llvm-spirv/ @AlexeySotkin @AlexeySachkov
811

12+
# OpenCL "offline" compiler
913
opencl-aot/ @dm-vodopyanov @AlexeySachkov @romanovvlad
1014

15+
# Device library
1116
libdevice/ @vzakhari
1217

13-
sycl/ @intel/llvm-reviewers-runtime
14-
18+
# Documentation
1519
sycl/ReleaseNotes.md @pvchupin
20+
sycl/doc/ @pvchupin @kbobrovs
21+
sycl/doc/extensions/ @intel/dpcpp-specification-reviewers
22+
23+
# DPC++ runtime library
24+
sycl/ @intel/llvm-reviewers-runtime
1625

1726
# USM
1827
sycl/include/CL/sycl/detail/clusm.hpp @jbrodman
@@ -41,6 +50,9 @@ sycl/source/detail/plugin.hpp @smaslov-intel
4150
sycl/source/detail/posix_pi.cpp @smaslov-intel
4251
sycl/source/detail/windows_pi.cpp @smaslov-intel
4352

53+
# CUDA plugin
54+
sycl/plugins/cuda/ @intel/llvm-reviewers-cuda
55+
4456
# Stream
4557
sycl/include/CL/sycl/detail/stream_impl.hpp @againull
4658
sycl/include/CL/sycl/stream.hpp @againull
@@ -78,11 +90,22 @@ sycl/source/half_type.cpp @AlexeySachkov
7890
sycl/include/CL/sycl/swizzles.def @turinevgeny
7991
sycl/include/CL/sycl/types.hpp @turinevgeny
8092

81-
sycl/plugins/cuda/ @intel/llvm-reviewers-cuda
82-
83-
sycl/doc/ @pvchupin @kbobrovs
84-
85-
sycl/doc/extensions/ @intel/dpcpp-specification-reviewers
86-
93+
# XPTI instrumentation utilities
8794
xpti/ @tovinkere @andykaylor
8895
xptifw/ @tovinkere @andykaylor
96+
97+
# DPC++ tools
98+
llvm/tools/file-table-tform/ @kbobrovs @AlexeySachkov
99+
llvm/tools/llvm-foreach/ @AlexeySachkov @Fznamznon
100+
llvm/tools/llvm-no-spir-kernel/ @AGindinson @AlexeySachkov
101+
llvm/tools/sycl-post-link/ @kbobrovs @AlexeySachkov
102+
103+
# Clang offload tools
104+
clang/tools/clang-offload-bundler/ @kbobrovs @sndmitriev
105+
clang/tools/clang-offload-wrapper/ @sndmitriev @kbobrovs
106+
107+
# Explicit SIMD
108+
SYCLLowerIR/ @kbobrovs
109+
esimd/ @kbobrovs
110+
sycl/include/CL/sycl/INTEL/esimd.hpp @kbobrovs
111+
sycl/doc/extensions/ExplicitSIMD/ @kbobrovs

.github/workflows/main-branch-sync.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,14 @@ jobs:
1212
- name: Checkout Code
1313
uses: actions/checkout@v2
1414
with:
15+
# persist-credentials: false allows us to use our own credentials for
16+
# pushing to the repository. Otherwise, the default github actions token
17+
# is used.
18+
persist-credentials: false
1519
fetch-depth: 0
1620

1721
- name: Update branch
1822
env:
1923
LLVMBOT_TOKEN: ${{ secrets.LLVMBOT_MAIN_SYNC }}
2024
run: |
21-
git push https://[email protected]/${{ github.repository }} HEAD:temp-test-main
25+
git push https://[email protected]/${{ github.repository }} HEAD:main

.github/workflows/sync-main.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: automatic sync main branch from llvm-project to llvm
2+
3+
on:
4+
schedule:
5+
- cron: '/10 * * * *'
6+
jobs:
7+
sync:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
with:
12+
# persist-credentials: false allows us to use our own credentials for
13+
# pushing to the repository. Otherwise, the default github actions token
14+
# is used.
15+
persist-credentials: false
16+
fetch-depth: 0
17+
path: src
18+
- name: Sync
19+
env:
20+
BRANCH: main
21+
SYNC_REPO: https://github.com/llvm/llvm-project
22+
LLVMBOT_TOKEN: ${{ secrets.LLVM_MAIN_SYNC_BBSYCL_TOKEN }}
23+
run: |
24+
cd $GITHUB_WORKSPACE/src
25+
branch_exist=`git ls-remote --heads origin $BRANCH | wc -l`
26+
if [ $branch_exist -ne 0 ]; then
27+
git checkout $BRANCH
28+
git pull --ff --ff-only $SYNC_REPO $BRANCH
29+
if [ $? -ne 0 ]; then
30+
echo "failed to pull from $SYNC_REPO $BRANCH, abort"
31+
exit 1
32+
fi
33+
git_status=`git rev-list --count --left-right origin/$BRANCH...$BRANCH`
34+
if [ "0 0" == "$git_status" ] ; then
35+
echo "no change, skip"
36+
elif [[ "$git_status" = 0* ]] ; then
37+
git push https://[email protected]/${{ github.repository }} ${BRANCH}
38+
else
39+
echo "$BRANCH branch invalid state"
40+
exit 1
41+
fi
42+
else
43+
git remote add upstream $SYNC_REPO
44+
git fetch upstream
45+
git checkout -B $BRANCH upstream/$BRANCH
46+
git push https://[email protected]/${{ github.repository }} ${BRANCH}
47+
fi
48+
echo "sync finished"

buildbot/configure.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,12 @@ def do_configure(args):
1717
sycl_dir = os.path.join(abs_src_dir, "sycl")
1818
spirv_dir = os.path.join(abs_src_dir, "llvm-spirv")
1919
xpti_dir = os.path.join(abs_src_dir, "xpti")
20+
xptifw_dir = os.path.join(abs_src_dir, "xptifw")
2021
libdevice_dir = os.path.join(abs_src_dir, "libdevice")
2122
ocl_header_dir = os.path.join(abs_obj_dir, "OpenCL-Headers")
2223
icd_loader_lib = os.path.join(abs_obj_dir, "OpenCL-ICD-Loader", "build")
2324
llvm_targets_to_build = 'X86'
24-
llvm_enable_projects = 'clang;llvm-spirv;sycl;opencl-aot;xpti;libdevice'
25+
llvm_enable_projects = 'clang;llvm-spirv;sycl;opencl-aot;xpti;xptifw;libdevice'
2526
libclc_targets_to_build = ''
2627
sycl_build_pi_cuda = 'OFF'
2728
sycl_werror = 'ON'
@@ -63,10 +64,12 @@ def do_configure(args):
6364
"-DCMAKE_BUILD_TYPE={}".format(args.build_type),
6465
"-DLLVM_ENABLE_ASSERTIONS={}".format(llvm_enable_assertions),
6566
"-DLLVM_TARGETS_TO_BUILD={}".format(llvm_targets_to_build),
66-
"-DLLVM_EXTERNAL_PROJECTS=sycl;llvm-spirv;opencl-aot;xpti;libdevice",
67+
"-DLLVM_EXTERNAL_PROJECTS=sycl;llvm-spirv;opencl-aot;xpti;xptifw;libdevice",
6768
"-DLLVM_EXTERNAL_SYCL_SOURCE_DIR={}".format(sycl_dir),
6869
"-DLLVM_EXTERNAL_LLVM_SPIRV_SOURCE_DIR={}".format(spirv_dir),
6970
"-DLLVM_EXTERNAL_XPTI_SOURCE_DIR={}".format(xpti_dir),
71+
"-DXPTI_SOURCE_DIR={}".format(xpti_dir),
72+
"-DLLVM_EXTERNAL_XPTIFW_SOURCE_DIR={}".format(xptifw_dir),
7073
"-DLLVM_EXTERNAL_LIBDEVICE_SOURCE_DIR={}".format(libdevice_dir),
7174
"-DLLVM_ENABLE_PROJECTS={}".format(llvm_enable_projects),
7275
"-DLIBCLC_TARGETS_TO_BUILD={}".format(libclc_targets_to_build),

buildbot/dependency.conf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
ocl_cpu_rt_ver=2020.11.11.0.04
44
# https://github.com/intel/llvm/releases/download/2020-WW45/win-oclcpuexp-2020.11.11.0.04_rel.zip
55
ocl_cpu_rt_ver_win=2020.11.11.0.04
6-
# Same GPU driver supports Level Zero and OpenCL:
7-
# https://github.com/intel/compute-runtime/releases/tag/20.45.18403
8-
ocl_gpu_rt_ver=20.45.18403
9-
# Same GPU driver supports Level Zero and OpenCL:
6+
# Same GPU driver supports Level Zero and OpenCL
7+
# https://github.com/intel/compute-runtime/releases/tag/20.46.18421
8+
ocl_gpu_rt_ver=20.46.18421
9+
# Same GPU driver supports Level Zero and OpenCL
1010
# https://downloadmirror.intel.com/29988/a08/igfx_win10_100.8935.zip
1111
ocl_gpu_rt_ver_win=27.20.100.8935
1212
intel_sycl_ver=build
@@ -25,7 +25,7 @@ fpga_ver_win=20201022_000005
2525
[DRIVER VERSIONS]
2626
cpu_driver_lin=2020.11.11.0.04
2727
cpu_driver_win=2020.11.11.0.04
28-
gpu_driver_lin=20.45.18403
28+
gpu_driver_lin=20.46.18421
2929
gpu_driver_win=27.20.100.8935
3030
fpga_driver_lin=2020.11.11.0.04
3131
fpga_driver_win=2020.11.11.0.04

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -691,11 +691,10 @@ void ClangMoveTool::addIncludes(llvm::StringRef IncludeHeader, bool IsAngled,
691691
llvm::StringRef FileName,
692692
CharSourceRange IncludeFilenameRange,
693693
const SourceManager &SM) {
694-
SmallVector<char, 128> HeaderWithSearchPath;
694+
SmallString<128> HeaderWithSearchPath;
695695
llvm::sys::path::append(HeaderWithSearchPath, SearchPath, IncludeHeader);
696696
std::string AbsoluteIncludeHeader =
697-
MakeAbsolutePath(SM, llvm::StringRef(HeaderWithSearchPath.data(),
698-
HeaderWithSearchPath.size()));
697+
MakeAbsolutePath(SM, HeaderWithSearchPath);
699698
std::string IncludeLine =
700699
IsAngled ? ("#include <" + IncludeHeader + ">\n").str()
701700
: ("#include \"" + IncludeHeader + "\"\n").str();

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ add_subdirectory(altera)
5555
add_subdirectory(boost)
5656
add_subdirectory(bugprone)
5757
add_subdirectory(cert)
58+
add_subdirectory(concurrency)
5859
add_subdirectory(cppcoreguidelines)
5960
add_subdirectory(darwin)
6061
add_subdirectory(fuchsia)
@@ -81,6 +82,7 @@ set(ALL_CLANG_TIDY_CHECKS
8182
clangTidyBoostModule
8283
clangTidyBugproneModule
8384
clangTidyCERTModule
85+
clangTidyConcurrencyModule
8486
clangTidyCppCoreGuidelinesModule
8587
clangTidyDarwinModule
8688
clangTidyFuchsiaModule

clang-tools-extra/clang-tidy/ClangTidyForceLinker.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ extern volatile int CERTModuleAnchorSource;
4545
static int LLVM_ATTRIBUTE_UNUSED CERTModuleAnchorDestination =
4646
CERTModuleAnchorSource;
4747

48+
// This anchor is used to force the linker to link the ConcurrencyModule.
49+
extern volatile int ConcurrencyModuleAnchorSource;
50+
static int LLVM_ATTRIBUTE_UNUSED ConcurrencyModuleAnchorDestination =
51+
ConcurrencyModuleAnchorSource;
52+
4853
// This anchor is used to force the linker to link the CppCoreGuidelinesModule.
4954
extern volatile int CppCoreGuidelinesModuleAnchorSource;
5055
static int LLVM_ATTRIBUTE_UNUSED CppCoreGuidelinesModuleAnchorDestination =

clang-tools-extra/clang-tidy/abseil/StringFindStrContainsCheck.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ using ::clang::transformer::cat;
2929
using ::clang::transformer::change;
3030
using ::clang::transformer::makeRule;
3131
using ::clang::transformer::node;
32+
using ::clang::transformer::RewriteRule;
3233

3334
static const char DefaultStringLikeClasses[] = "::std::basic_string;"
3435
"::std::basic_string_view;"
@@ -69,7 +70,7 @@ MakeRule(const LangOptions &LangOpts,
6970
hasArgument(1, cxxDefaultArgExpr())),
7071
onImplicitObjectArgument(expr().bind("string_being_searched")));
7172

72-
tooling::RewriteRule rule = applyFirst(
73+
RewriteRule rule = applyFirst(
7374
{makeRule(binaryOperator(hasOperatorName("=="),
7475
hasOperands(ignoringParenImpCasts(StringNpos),
7576
ignoringParenImpCasts(StringFind))),
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
set(LLVM_LINK_COMPONENTS
2+
FrontendOpenMP
3+
Support
4+
)
5+
6+
add_clang_library(clangTidyConcurrencyModule
7+
ConcurrencyTidyModule.cpp
8+
MtUnsafeCheck.cpp
9+
10+
LINK_LIBS
11+
clangTidy
12+
clangTidyUtils
13+
)
14+
15+
clang_target_link_libraries(clangTidyConcurrencyModule
16+
PRIVATE
17+
clangAnalysis
18+
clangAST
19+
clangASTMatchers
20+
clangBasic
21+
clangLex
22+
clangSerialization
23+
clangTooling
24+
)
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
//===--- ConcurrencyTidyModule.cpp - clang-tidy ---------------------------===//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
9+
#include "../ClangTidy.h"
10+
#include "../ClangTidyModule.h"
11+
#include "../ClangTidyModuleRegistry.h"
12+
#include "MtUnsafeCheck.h"
13+
14+
namespace clang {
15+
namespace tidy {
16+
namespace concurrency {
17+
18+
class ConcurrencyModule : public ClangTidyModule {
19+
public:
20+
void addCheckFactories(ClangTidyCheckFactories &CheckFactories) override {
21+
CheckFactories.registerCheck<concurrency::MtUnsafeCheck>(
22+
"concurrency-mt-unsafe");
23+
}
24+
};
25+
26+
} // namespace concurrency
27+
28+
// Register the ConcurrencyTidyModule using this statically initialized variable.
29+
static ClangTidyModuleRegistry::Add<concurrency::ConcurrencyModule>
30+
X("concurrency-module", "Adds concurrency checks.");
31+
32+
// This anchor is used to force the linker to link in the generated object file
33+
// and thus register the ConcurrencyModule.
34+
volatile int ConcurrencyModuleAnchorSource = 0;
35+
36+
} // namespace tidy
37+
} // namespace clang

0 commit comments

Comments
 (0)